![]() | ![]() |
Home |
|
|
Utility Guide |
|
| Chapter 4 Using dsedit |
Chapter 4
This chapter explains how to use the dsedit utility to edit the Adaptive Server interfaces file.
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.
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 promptEnter:
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. |
Go to the %SYBASE%\bin\ directory.
Double-click on the DSEDIT.exe file.
Choose Sybase for Windows NT from the Start menu.
Choose dsedit from the Sybase for Windows NT menu. The Select Directory Service dialog box appears.
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 variableLog in to the remote machine.
Enter:
setenv DISPLAY your_machine_name:0.0
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.
The Select Directory Service dialog box allows you to open a session with a directory service. You can open a session with:
Any directory service that has a driver listed in the libtcl.cfg file
The sql.ini file
Double-click on the local name of the directory service you want to connect to, as listed in the DS Name box, or
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 file
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."
dsedit allows you to have multiple sessions open at one time.
Choose Open Directory Service from the File menu.
The Select Directory Service box appears.
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 sessionsIf you have multiple sessions open at one time, you need to activate a session before you can work in it.
Activate a session by either:
Clicking in the session window
Choosing the session from the Windows menu
The dsedit title bar shows which session is active.
Select Sybase Interfaces File.
Click OK.
Select Sybase Interfaces File.
Edit the displayed file name.
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.
Add new server entry - displays the Server Entry Editor window, where you specify the name and network addresses for a new server entry.
Modify server entry - lets you view and modify the network addresses for a selected server entry. To view or modify a server entry, select the server in the list, then click Modify server entry to display the server's attributes in the Server Entry Editor window.
Copy server entry - lets you copy one or more entries to another interfaces file.
Close Session - closes the session window and writes changes to the interfaces file.
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:
Server name - if you are adding a server entry, type the name of the new server. If you are editing a server entry, you can edit the name field to rename the server. The new name cannot already exist in the interfaces file.
Available network transports - a list of the network addresses where the server accepts client connections.
To create a new address, click Add network transport. See "Modifying server entries in Windows NT".
To edit an existing address, click Modify network transport. See "Modifying server entries in Windows NT".
To remove a selected network address, click Delete network transport.
To rearrange the order of addresses in the list, click Move network transport up or Move network transport down.
OK - commits your changes and closes the window. Changes to the interfaces file are not applied until you close the session using the Close Session button in the Directory Service Session screen.
Cancel - closes the window and discards any edits.
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.
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.
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:
| 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:
| N/A |
Choose Server Object | Add.
Type a server name in the Server Name box.
Click OK.
The server entry appears in the Server box. To specify an address for the server, you must modify the entry.
You can modify any attribute of a server entry.
Click on a server entry in the Server box.
Choose Server Object | Modify Attribute.
Click on the attribute you want to modify in the Attributes box.
A dialog box appears that shows the current value of the attribute.
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.
Click OK.
Click on a server entry in the Server box.
Choose Server Object | Rename.
Type a new name for the server entry in the Server Name box.
Click OK.
Click on a server entry in the Server box.
Choose Server Object | Delete.
Click on one or more server entries in the Server box.
Use the Shift key to select multiple entries.
Click the Copy button (below the menu bar), or choose Edit | Copy.
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.
Open a session with the directory service or sql.ini file that you want the entries copied to.
To open a session, choose File | Open Directory Service. See "To open additional sessions" for more information.
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.
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.
Activate the session where you want to paste the server entries.
See "To switch between sessions" for instructions for activating a session.
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.
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 entryClick on Add new server entry.
Specify the name and network addresses for a new server entry.
Click on Modify server entry.
Modify the attributes as desired.
Use one of the following methods to select the entries to copy:
To copy a single entry, click it once.
To copy a range of consecutive entries, click the first entry in the range, press and hold down Shift, and click the last entry in the range. You can also select "backwards" by clicking the last entry, holding down Shift, and clicking the first entry.
To select multiple, nonconsecutive entries, press and hold down the Ctrl key while you click each entry.
Click Copy server entry.
Select the Sybase interfaces file from the list.
Edit the displayed file name.
Click OK.
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:
Transport type - specifies the protocol and interface for the address. For all platforms except Digital UNIX, values are tcp, tli tcp, tli spx, and spx. For Digital UNIX, values are decnet, tcp, and tli tcp.
Address information - depending on the transport type, different address components are required. The following sections discuss address formats in detail.
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:
All pre-10.0 clients on platforms that use tli-formatted interfaces entries
Adaptive Server or Replication Server version 11.0.x or earlier on platforms that use tli-formatted interfaces entries
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 addressesSPX/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:
Host address - an eight-digit hexadecimal value representing the IP address of the computer on which the server runs. Each component of the dot-separated decimal IP address format maps to one byte in the hex address format. For example, if your host's IP address is 128.15.15.14, enter "800F0F0E" as the SPX/IPX host address value.
Port number - the port number, expressed as a four-digit hexadecimal number.
Endpoint - the path for the device file that points to the SPX device driver. Defaults to /dev/mspx on Solaris and /dev/nspx on any other platform. If necessary, adjust the path so that it is correct for the machine on which the server runs. The default path is based on the platform on which you are running dsedit.
To indicate an SPX/IPX address, choose tli spx or spx from the Transport Type menu.
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.
Click on one or more server entries in the Server box.
Use the Shift key to select multiple entries.
Click the Copy button (below the menu bar), or choose Edit | Copy.
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.
Open a session with the directory service or sql.ini file that you want the entries copied to.
To open a session, choose File | Open Directory Service. See "To open additional sessions" for more information.
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.
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.
Activate the session where you want to paste the server entries.
See "To switch to another open session" for instructions for activating a session.
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.
Use one of the following methods to select the entries to copy:
To copy a single entry - click it once.
To copy a range of consecutive entries - click the first entry in the range, press and hold down Shift, and click the last entry in the range. You can also select "backwards" by clicking the last entry, holding down Shift, and clicking the first entry.
To select multiple, nonconsecutive entries - press and hold down the Ctrl key while you click each entry.
Click Copy server entry.
Select the Sybase interfaces file from the list.
Edit the displayed file name.
Click OK.
This section lists some common dsedit problems and describes how to correct them.
Check for the following:
The SYBASE environment variable is not set or points to the wrong directory.
(UNIX platforms) X-Windows is not configured correctly. If you are running dsedit on a remote host, make sure that X-Windows clients on the remote host can connect to the X-Windows server on your own machine. See your X-Windows documentation for more troubleshooting information. If X-Windows is not available, use dscp instead of dsedit.
(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:
The value for the DISPLAY environment variable is not entered correctly or is not set.
Solution: Enter the DISPLAY environment variable correctly.
You are not authorized to open windows on the machine to which DISPLAY refers.
Solution: Run the command 'xhost +' on the display machine.
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.
|
|