Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Chapter 5: Using dsedit [Table of Contents] Chapter 7: Localization

Configuring Adaptive Server Enterprise for UNIX Platforms

[-] Chapter 6: Using dscp

Chapter 6

Using dscp

This chapter explains how to use dscp to configure the interfaces file. The following topics are included:

About dscp

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:

Table 6-1: dscp and 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
{NAME2 | SESS | SESS NAME2}

Copies server entry NAME1 in the current session to:

  • Server entry NAME2 in the current session
  • Session SESS
  • Server entry NAME2 in session SESS

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.

Starting dscp

To start dscp, enter:

$SYBASE/bin/dscp

The dscp prompt, >>, appears.

Getting Help

To view the dscp help screen, enter one of these commands at the prompt:

help
h
?

Using a dscp Session

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.

Opening a Session

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>>

Listing Sessions

To list all open sessions, enter:

sess

Switching Between Open Sessions

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.

Closing a Session

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.

Adding and Modifying Server Entries

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:

Table 6-2: Server attributes

Attribute

Type of Value

Default Value

Capable of being Modified when adding or modifying server entry

Server Object Version

Integer

110

Adding
interfaces: No

Modifying
interfaces: No

Server Name

Character string

N/A

Adding
interfaces: N/A

Modifying
interfaces: No

Server Service

Character string

SQL SERVER

Adding
interfaces: Yes

Modifying
interfaces: No

Server Status

Integer

4

Valid values are:

Value Server status
1 Active
2 Stopped
3 Failed
4 Unknown

Adding
interfaces: No

Modifying
interfaces: No

Transport Address

  • Transport type
  • Transport address

Transport type:
Character string

Transport address:
Character string

Transport type: tcp

Transport address: None

Valid values are:

Transport type:
"tcp", "spx", "decnet", "tli tcp", "tli spx"

Transport address:
Character string in a format recognized by the specified transport type

Adding or modifying

interfaces:
Transport type: Yes
Transport address: Yes

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
interfaces: Yes

Modifying
interfaces: Yes

Listing Server Entries

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.

Viewing a Server Entry

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.

Adding a Server Entry

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.

Modifying a Server Entry

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.

Deleting Entries

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.

Copying Server Entries

dscp allows you to copy server entries within a session and between sessions.

There are four options when copying a server entry. You can:

Copying Entries Within a Session

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.

Copying Entries Between Sessions

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."

Copying All Entries to a Different Session

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.

Exiting dscp

To exit dscp, enter one of these commands:

exit
quit

at the prompt.


Chapter 5: Using dsedit [Table of Contents] Chapter 7: Localization