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

Chapter 3 Using bcp
to Transfer Data to and from Adaptive Server [Table of Contents] Chapter 5 Using dscp

Utility Guide

[-] Chapter 4 Using dsedit

Chapter 4

Using dsedit

This chapter explains how to use the dsedit utility to edit the Adaptive Server interfaces file.

Getting started with dsedit

dsedit is a graphical utility that lets you view and edit server entries in the interfaces file (sql.ini in Windows 98 and Windows NT). For a detailed description of dsedit syntax, see dsedit.

UNIX users: If your system does not have X-Windows, use dscp to configure server entries in the interfaces file. See Chapter 5, "Using dscp," for more information.

Starting dsedit

Windows NT

You can start dsedit from the command prompt, the Windows NT Explorer, or the Sybase for Windows NT program group.

To start dsedit from the command prompt
  1. Enter:

    dsedit

    You can specify the following command-line arguments:

    Argument

    Description

    -ddsname

    Specifies which directory service to connect to. dsname is the local name of the directory service, as listed in the libtcl.cfg file. If you do not specify the -ddsname argument, dsedit presents a list of directory service options in the first dialog box.

    -lpath

    Specifies the path to the libtcl.cfg file, if other than SYBASE_home\INI. Use this argument only if you want to use a libtcl.cfg file other than the one located in SYBASE_home\INI.

To start dsedit through the Windows NT Explorer
  1. Go to the %SYBASE%\bin\ directory.

  2. Double-click on the DSEDIT.exe file.

To start dsedit from the Sybase for Windows program group
  1. Choose Sybase for Windows NT from the Start menu.

  2. Choose dsedit from the Sybase for Windows NT menu. The Select Directory Service dialog box appears.

UNIX platforms

Before starting dsedit, make sure that you have write permission on the interfaces file.

If you are running dsedit from a remote machine, make sure that the DISPLAY environment variable is set so the dsedit screens will show on your machine instead of on the remote machine.

To set the DISPLAY environment variable
  1. Log in to the remote machine.

  2. Enter:

    setenv DISPLAY your_machine_name:0.0

To start dsedit
  1. Enter:

    $SYBASE/bin/dsedit

    The Select a Directory Service window appears. This window lets you open editing sessions for the interfaces file. The full path name of the default interfaces file is shown in the Interfaces File to Edit box. The full path name of the configuration file is shown below it.

Opening an editing session

Windows NT

The Select Directory Service dialog box allows you to open a session with a directory service. You can open a session with:

To open a session in Windows NT
  1. Double-click on the local name of the directory service you want to connect to, as listed in the DS Name box, or

  2. Click on the local name of the directory service you want to connect to, as listed in the DS Name box, and click the OK button.

    dsedit uses the SYBASE environment variable to locate the libtcl.cfg file. If the SYBASE environment variable is not set correctly, dsedit cannot locate the libtcl.cfg file.

    Figure 4-1: Using dsedit to edit an interfaces fileraster

    The session number and local name of the directory service appear in the header bar. In Figure 4-1, the session number and local directory service name are "DSEDIT1 - ntreg_dsa."

To open additional sessions

dsedit allows you to have multiple sessions open at one time.

  1. Choose Open Directory Service from the File menu.

    The Select Directory Service box appears.

  2. Double-click the local name of the directory service to which you want to be connected (or click on the directory service name and click OK).

Opening multiple sessions allows you to copy entries between directory services. See "Copying server entries" for more information.

To switch between sessions

If you have multiple sessions open at one time, you need to activate a session before you can work in it.

  1. Activate a session by either:

    The dsedit title bar shows which session is active.

UNIX platforms

To open the default interfaces file for editing
  1. Select Sybase Interfaces File.

  2. Click OK.

To open a file other than the default interfaces file
  1. Select Sybase Interfaces File.

  2. Edit the displayed file name.

  3. Click OK.

    The Directory Service Session window appears.

You can open multiple interfaces file sessions with different files.

The Directory Service Session screen displays the full path name of the interfaces file and lists the server entries contained within it.

For procedures on using these buttons, see "Modifying server entries in Windows NT".

Clicking the Add new server entry or Modify server entry button in the Session screen displays the Server Entry Editor window.

You use the Server Entry Editor window to view or edit server entries in an interfaces file:

Adding, viewing, and editing server entries

Once you are in an open session, you can add, modify, rename and delete server entries associated with that session, as well as copy server entries within a session and between sessions.

Modifying server entries in Windows NT

The server entries associated with the session appear in the Server box (see Figure 4-1). Click on a server entry to select it.

Each server entry is made up of a set of attributes. The attributes are described in Table 4-1.

Server attributes

Attribute name

Type of value

Description

Default value

Server Version

Integer

Version level of the server object definition. Sybase provides this attribute to identify future changes to the object definition.

110

Server Name

Character string

Server name.

N/A

Server Service

Character string

A description of the service provided by the server. This value can be any meaningful description.

Adaptive Server

Server Status

Integer

The operating status of the server. Values are:

  • Active

  • Stopped

  • Failed

  • Unknown

4

Security Mechanism

Character string

Object identifier strings (OID) that specify the security mechanisms supported by the server. This attribute is optional. If it is omitted, Open Server allows clients to connect with any security mechanism for which Open Server has a corresponding security driver.

N/A

Server Address

Character string

One or more addresses for the server.

The format of the address varies by protocol, and some protocols allow more than one format. The options are:

  • TCP/IP (two formats):

    • computer name,port number

    • ip-address,portnumber

  • Named Pipe

    pipe name: "\pipe" is a required prefix to all pipe names. Server pipes can be only local.

    • (Local) \pipe\sql\query

    • (Remote) \\computer_name\pipe\sql\query

  • IPX/SPX (three formats)

    • server name

    • net number,node number,socket number

    • server name, socket number

  • DECnet (four formats)

    • area number.node number,object name

    • area number.node number,object number

    • node name,object name

    • node name,object number

N/A

To add a server entry
  1. Choose Server Object | Add.

  2. Type a server name in the Server Name box.

  3. Click OK.

    The server entry appears in the Server box. To specify an address for the server, you must modify the entry.

To modify a server attribute

You can modify any attribute of a server entry.

  1. Click on a server entry in the Server box.

  2. Choose Server Object | Modify Attribute.

  3. Click on the attribute you want to modify in the Attributes box.

    A dialog box appears that shows the current value of the attribute.

  4. Type a new value for the attribute, or select a value from the drop-down list.

    See Table 4-1 for a description of each attribute.

  5. Click OK.

To rename a server entry
  1. Click on a server entry in the Server box.

  2. Choose Server Object | Rename.

  3. Type a new name for the server entry in the Server Name box.

  4. Click OK.

To delete a server entry
  1. Click on a server entry in the Server box.

  2. Choose Server Object | Delete.

To copy server entries within the current session
  1. Click on one or more server entries in the Server box.

    Use the Shift key to select multiple entries.

  2. Click the Copy button (below the menu bar), or choose Edit | Copy.

  3. Click the Paste button (below the menu bar), or choose Edit | Paste.

    dsedit appends the copied server entries with a version number of _n. You can rename the copied server entries Server Object | Rename option on. See "To rename a server entry" for more information.

To copy server entries between sessions
  1. Open a session with the directory service or sql.ini file that you want the entries copied to.

  2. To open a session, choose File | Open Directory Service. See "To open additional sessions" for more information.

  3. Click on one or more server entries in the Server box of the session that you want the entries copied from.

    Use the Shift key to select multiple entries.

  4. To copy the server entries, click the Copy button (below the menu bar), or choose Edit | Copy.

    To cut the server entries, click the Cut button (below the menu bar), or choose Edit | Cut.

  5. Activate the session where you want to paste the server entries.

    See "To switch between sessions" for instructions for activating a session.

  6. Click the Paste button (below the menu bar), or choose Edit | Paste.

You can rename the copied server entries using Server Object | Rename. See "To switch between sessions" for more information.

Modifying server entries in UNIX platforms

To perform the procedures in this section, open the interfaces session window using the instructions in "Opening an editing session".

After performing each procedure in this section, you must click on Close Session to apply your edits to the interfaces file. Clicking this button also closes the interfaces session window.

To add a new server entry
  1. Click on Add new server entry.

  2. Specify the name and network addresses for a new server entry.

To view or modify a server entry
  1. Click on Modify server entry.

  2. Modify the attributes as desired.

To copy a server entry to another interfaces file
  1. Use one of the following methods to select the entries to copy:

  2. Click Copy server entry.

  3. Select the Sybase interfaces file from the list.

  4. Edit the displayed file name.

  5. Click OK.

Adding or editing network transport addresses

The Network Transport Editor window allows you to view, edit, or create the transport addresses at which a server accepts client connections. This window displays the name of the server entry for the address and allows you to configure the following items:

TCP/IP addresses

The address information for a TCP/IP entry consists of a host name (or IP address) and a port number (entered as a decimal number). For tli tcp-formatted interfaces entries, the host's IP address and the port number are converted to the 16-byte hexadecimal representation required for tli tcp-formatted interfaces entries.

In interfaces entries, use tli tcp for:

Use tcp for other clients and servers.

To indicate a TCP/IP address, choose tcp or tli tcp from the Transport Type menu.

SPX/IPX addresses

SPX/IPX addresses allow Adaptive Server to listen for connections from client applications running on a Novell network. SPX/IPX addresses consist of the following information:

To indicate an SPX/IPX address, choose tli spx or spx from the Transport Type menu.

Copying server entries

dsedit allows you to copy server entries within a session and between sessions. This includes copying entries from a sql.ini file to a directory service.

Windows NT

To copy server entries within the current session
  1. Click on one or more server entries in the Server box.

    Use the Shift key to select multiple entries.

  2. Click the Copy button (below the menu bar), or choose Edit | Copy.

  3. Click the Paste button (below the menu bar), or choose Edit | Paste.

    dsedit appends the copied server entries with a version number of _n. You can rename the copied server entries using Server Object | Rename. See "To rename a server entry" for more information.

To copy server entries between sessions
  1. Open a session with the directory service or sql.ini file that you want the entries copied to.

  2. To open a session, choose File | Open Directory Service. See "To open additional sessions" for more information.

  3. Click on one or more server entries in the Server box of the session that you want the entries copied from.

    Use the Shift key to select multiple entries.

  4. To copy the server entries, click the Copy button (below the menu bar), or choose Edit | Copy.

    To cut the server entries, click the Cut button (below the menu bar), or choose Edit | Cut.

  5. Activate the session where you want to paste the server entries.

    See "To switch to another open session" for instructions for activating a session.

  6. Click the Paste button (below the menu bar), or choose Edit | Paste.

You can rename the copied server entries using the Rename command in the Server Object menu. See "To rename a server entry" for more information.

UNIX platforms

To copy a server entry to another interfaces file
  1. Use one of the following methods to select the entries to copy:

  2. Click Copy server entry.

  3. Select the Sybase interfaces file from the list.

  4. Edit the displayed file name.

  5. Click OK.

Troubleshooting dsedit

This section lists some common dsedit problems and describes how to correct them.

The dsedit utility does not start

Check for the following:

Error message: "Unable to open X display"

(UNIX platforms) dsedit might not work if the display machine is set up to reject X-Windows connections from remote hosts. If this is the problem, you see a message similar to the following:

Unable to open X display. Check the value of your $DISPLAY variable. If it is set correctly, use the 'xhost +' command on the display machine to authorize use of the X display. If no X display is available, run dscp instead of dsedit.

This error may be caused by either of the following situations:

Cannot add, modify, or delete server entries

Check for permissions problems with the interfaces file. To edit interfaces entries, you must have write permission on both the interfaces file and the Sybase installation directory.


How bcp differs from other utilities [Table of Contents] Chapter 5 Using dscp