![]() | ![]() |
Home |
|
|
Configuring Adaptive Server Enterprise for UNIX Platforms |
|
| Chapter 6: Using dscp |
This chapter explains how to use dscp to configure the interfaces file. The following topics are included:
dscp is a command line utility that allows you to view and edit server entries in the interfaces file. After opening a session, you can check your configuration, view existing entries, create new entries, and modify entries as needed.
dscp allows you to perform functions by entering commands at the dscp prompt. Table 6-1 describes these commands:
Command | Description |
|---|---|
open [DSNAME] | Opens a session with the specified interfaces file. To open a session, specify "InterfacesDriver" as DSNAME. |
sess | Lists all open sessions. |
[switch] SESS | Makes session number SESS the current session. |
close [SESS] | Closes a session identified by the SESS number. If you do not specify SESS, closes the current session. |
list [all] | Lists the server entries for the current session. To list the names of the entries, use the list command. To list the attributes for each entry, use the list all command. |
read SERVERNAME | Prints the contents of server entry SERVERNAME to the screen. |
add SERVERNAME | Adds server entry SERVERNAME in the current session. dscp prompts you for information about SERVERNAME. Press Return to accept the default value, which is shown in brackets [ ]. |
addattr SERVERNAME | Adds an attribute to the server entry SERVERNAME in the current session. |
mod SERVERNAME | Modifies server entry SERVERNAME in the current session. dscp prompts you for information about SERVERNAME. Press Return to accept the default value, which is shown in brackets [ ]. |
del SERVERNAME | Deletes server entry SERVERNAME in the current session. |
delete-all | Deletes all server entries in the current session. |
copy NAME1 to | Copies server entry NAME1 in the current session to:
|
copyall to SESS | Copies all server entries in the current session to session SESS. |
config | Prints configuration information related to your Sybase environment to the screen. |
exit, quit | Exits dscp. |
help, ?, h | Displays the help screen. |
To start dscp, enter:
$SYBASE/bin/dscp
The dscp prompt, >>, appears.
To view the dscp help screen, enter one of these commands at the prompt:
help
h
?
Before you can view, add, or modify server entries, you must open a session.
Opening a dscp session allows you to interact with the interfaces file.
You can have multiple sessions open at one time.
To open a session, enter:
open DSNAME
at the prompt. To open a session with interfaces, enter:
open InterfacesDriver
at the prompt.
When you open a session, dscp tells you the session's number. For example, if you open a session using the open InterfacesDriver command, dscp returns the following message:
ok
Session 1 InterfacesDriver>>
To list all open sessions, enter:
sess
To switch to another open session, enter:
switch SESS
at the prompt.
where:
SESS is the session number.
For example, if you enter:
switch 3
you are switched to session 3. The switch keyword is optional. For example, entering:
3
also switches you to session 3.
To close a session, enter
close SESS
at the prompt.
where:
SESS is the session number.
For example, if you enter:
close 3
session 3 is closed. Use the sess command to list all open sessions.
If you do not specify SESS, the current session is closed.
Once you open a session, you can list, add, modify, and delete server entries associated with that session.
Note: When you add or modify a server entry, dscp automatically creates or modifies both master and query lines. The master line and the query line of an interfaces file entry contain identical information.
Each server entry is made up of a set of attributes. When you add or modify a server entry, dscp prompts you for information about each attribute. Table 6-2 describes each attribute:
Attribute | Type of Value | Default Value | Capable of being Modified when adding or modifying server entry |
|---|---|---|---|
Server Object Version | Integer | 110 | Adding Modifying |
Server Name | Character string | N/A | Adding Modifying |
Server Service | Character string | SQL SERVER | Adding Modifying |
Server Status | Integer | 4 Valid values are: Value Server status | Adding Modifying |
Transport Address
| Transport type: Transport address: | Transport type: tcp Transport address: None Valid values are: Transport type: Transport address: | Adding or modifying interfaces: |
Security Mechanism | Character string Note: You can add up to 20 security mechanism strings for each server entry. | None Valid values are Character strings associated with object identifiers defined in the user's objectid.dat. | Adding Modifying |
To list the names of server entries associated with a session, enter:
list
at the prompt.
To list the attributes of server entries associated with a session, enter:
list all
at the prompt.
See Table 6-2 for a description of server attributes.
To view the contents of a server entry, enter:
read SERVERNAME
at the prompt. For example, if you enter:
read myserver
the following information is displayed on the screen:
DIT base for object: interfaces
Distinguish name: myserver
Server Version: 1
Server Name: myserver
Server Service: SQL Server
Server Status: 4 (Unknown)
Server Address:
Transport Type: tcp
Transport Addr: victory 1824
Transport Type: tcp
Transport Addr: victory 1828
See Table 6-2 for a description of the server attributes listed above.
To add a server entry, enter:
add SERVERNAME
at the prompt. dscp prompts you for information about SERVERNAME. Enter a value for each attribute or press return to accept the default value, which is shown in brackets [ ].
For example, if you enter:
add myserver
dscp prompts you for information as follows:
Service: [SQL Server]
Transport Type: [tcp] tcp
Transport Address: victory 8001
Security Mechanism []:
To exit add mode, enter:
#done
at the prompt.
A server entry can have up to 20 transport type/address combinations associated with it.
See Table 6-2 for a description of the server attributes listed above.
To modify an existing server entry, enter:
mod SERVERNAME
at the prompt. dscp prompts you for information about SERVERNAME. Enter a value for each attribute or press return to accept the existing value, which is shown in brackets [ ].
For example, if you enter:
mod myserver
dscp prompts you for information as follows:
Version: [1]
Service: [SQL Server] Open Server
Status: [4]
Address:
Transport Type: [tcp]
Transport Address: [victory 1824] victory 1826
Transport Type: [tcp]
Transport Address: [victory 1828]
Transport Type: []
Security Mechanism []:
Note: dscp cannot modify the Version, Service, and Status entries.
To delete an address, enter:
#del
at the prompt. To exit modify mode, enter:
#done
at the prompt.
See Table 6-2 for a description of the server attributes listed above.
You can delete one entry or all entries associated with a session. To delete one entry, enter:
del SERVERNAME
at the prompt. For example, if you enter:
del myserver
dscp deletes the entry for "myserver." To delete all entries associated with a session, enter:
delete-all
at the prompt.
dscp allows you to copy server entries within a session and between sessions.
There are four options when copying a server entry. You can:
You can copy a server entry within a session, if you want to create a new server entry. To copy an entry within a session, enter:
copy NAME1 to NAME2
at the prompt. For example, if you enter:
copy myserver to my_server
dscp creates a new entry "my_server" identical to "myserver." You can then modify the new entry and leave the original intact.
There are two options for copying a server entry between sessions. You can:
To copy an entry to a different session and keep the servername, enter:
copy NAME1 to SESS
at the prompt.
where:
NAME1 is the current server name
SESS is the number of the session to which you want to copy the server entry.
For example, if you enter:
copy myserver to 2
dscp copies the "myserver" entry in the current session to session 2.
To copy an entry to a different session and give it a different name, enter:
copy NAME1 to SESS NAME2
at the prompt.
where:
NAME1 is the current server name.
SESS is the number of the session to which you want to copy the server entry.
NAME2 is the new server name.
For example, if you enter:
copy myserver to 2 my_server
dscp copies the "myserver" entry in the current session to session 2 and renames it "my_server."
To copy all entries in the current session to a different session, enter:
copyall SESS
at the prompt.
where:
SESS is the number of the session to which you want to copy all entries.
For example, if you enter:
copyall 2
dscp copies all entries in the current session to session 2.
To exit dscp, enter one of these commands:
exit
quit
at the prompt.
|
|