- 论坛徽章:
- 0
|
需要配置OCS的配置,配置服务器的名字,就跟oracle的tnsname.ora一样:
Using dscp to configure an OCS server definition
The follwing instructions describe how to use the Sybase dscp utility, which is provided with OCS, to create a server definition. For more information about dscp and its definition options, please see the Configuration Guide Open Client and Open Server 15.0 for UNIX, specifically Chapter 7, "Using dscp," and Appendix A, "Utility Commands Reference."
Before you can use dscp, you need to set the Sybase environment variables. Change to the $SYBASE directory and run the Sybase environment variable script (SYBASE.(c)sh). The script will set the $SYBASE and $SYBASE_OCS variables as well as others. For example, for a C shell environment, enter the following command:
source SYBASE.cshOpen the dscp utility by changing to the $SYBASE/bin directory, entering the following command and pressing Enter:
dscpThe dscp command prompt (>>) should return. To see a list of dscp commands, enter a question mark (?) at the command prompt.
To open the default session, enter the following at the command prompt and press Enter.
openThe status of the command returns, which should be "ok" and then the prompt changes, for example, to "Session 1 InterfacesDriver>> ".
Add the new server by entering "add <server_name>" and pressing Enter. For example, to create an OCS server definition for the Sybase IQ demo database, enter the following and press Enter.
add asiqdemoThe following prompts will return to gather connection information about the target database server. Enter the information appropriate for each prompt and press Enter in between:
Service: [ASE] - press Enter to accept this default value for all supported Sybase databases, even IQ.
Transport Type: [tcp] - press Enter to accept this default value.
Transport Address: - enter the target Sybase database server host machine name, a space, and the port number, and then press Enter. For example, enter "test_host 2638", for a Sybase IQ host machine named "test_host" with the default Sybase IQ demo database port of 2638. Note that dscp allows you to enter multiple entries for the address information. Thus, the Transport Type: [tcp] prompt returns again followed by the Transport Address prompt. You can either add additional entries or leave the both prompts blank and press Enter after each. Then dscp will continue with the remaining prompts.
Security Mechanism[]: - for the sake of this sample configuration leave this prompt blank and press Enter. Then do so for the remaining parameters: HA Failoverserver, Retry Count and Retry Delay. When you press Enter after the last prompt, dscp returns the message "Added <server_name>", for example, "Added asiqdemo." Then it returns to the dscp command prompt: Session 1 InterfacesDriver>>.
You can view information about the server definition you just added by entering "read <server_name>" and pressing Enter. This command returns the following information for the Sybase IQ asiqdemo sample information:
DIT base for objects: interfaces
Distinguish name: asiqdemo
Server Entry Version: 1
Server Name: asiqdemo
Server Service: SQL Server
Server Status: 4 (Unknown)
Server Address:
Transport Type: tcp
Transport Address: test_host 2638
Then dscp returns to the command prompt.
To make any modifications, you can enter "mod <server_name>" and dscp will prompt you with the parameters like it does when you are adding a new server definition. Note that if you enter into the modification mode and do not make any changes to the properties, dscp will return a message after the last parameter prompt saying "Error in modifying <server_name>."
To exit the dscp utility, type "quit" or "exit" and press Enter. The regular UNIX command prompt returns.
The Sybase OCS configuration is ready for client connectivity. |
|