How to Start Adaptive Server in Single-User Mode

To start Adaptive Server in single-user mode, issue the following command:

% startserver -m -frunserver_filename

If this fails, do the following instead:

Edit a copy of the RUN_servername file for the Adaptive Server and add the -m option (on UNIX) or the /masterrecover option (on Digital OpenVMS) to the end of the dataserver line. On Novell NetWare, OS/2, and Windows NT, no RUN_servername file is used. Instead, specify the -m flag on the file server command line, as shown in the example below.

The following examples show the RUN_servername file edited to start an Adaptive Server named TEST in single-user mode:

On UNIX

#!/bin/sh
#
# Adaptive Server Information:
#  name: TEST
#  master device: /work/master.dat
#  master device size: 10752
#  errorlog: /usr/u/sybase/install/errorlog
#  interfaces: /usr/u/sybase/interfaces
#
/usr/u/sybase/bin/dataserver -d/work/master.dat 
-sTEST -e/usr/u/sybase/install/errorlog 
-i/usr/u/sybase/interfaces
-c/usr/u/sybase/TEST.cfg -m

On Digital OpenVMS

You do not need to edit the runserver file. Start Adaptive Server with the following command:

$ startserver /server=server_name /masterrecover

NoteCreate a separate runserver file for each Adaptive Server to start in single-user mode. Refer to “How to Start Adaptive Server with Trace Flags” for information about using runserver files.

Start Adaptive Server with the following command:

Operating System

Command

UNIX

startserver -frunserver_filename -m

Digital OpenVMS

startserver/server=server_name /masterrecover

Novell NetWare

load sqlsrvr -ddevice_name -m

OS/2

sqlsrvr -ddevice_name -m

Windows NT

See directions below.

Once Adaptive Server is running and recovery is complete on all databases, review the error log and verify that no errors occurred. If you have successfully started Adaptive Server in single-user mode, a message like the following should appear in the error log:

00:95/12/29 13:09:53.14 server *** WARNING ******************
00:95/12/29 13:09:53.17 server  Adaptive Server booted single user mode - 
updates allowed to system catalogs

On Windows NT

Follow these steps to start Adaptive Server in single-user mode on Windows NT:

  1. Log into Windows NT using an account with Windows NT administrator privileges.

  2. Double-click the Server Config icon in the Sybase for Windows NT program group.

  3. Select the Adaptive Server icon.

  4. Select Configure Adaptive Server.

  5. Select the name of the Adaptive Server to configure, and choose Continue.

  6. Enter “sa” for login name. (No password is required.)

  7. If the Adaptive Server is not running, Server Config asks you to start it now; choose Yes.

  8. Select the Command Line Option or the Command Line Parameters button.

    Server Config displays the Command Line Parameters dialog box.

  9. Edit the text in the Command Line Parameters dialog box to include the start-up parameter - m.

  10. Click OK.

  11. Choose Save at the Adaptive Server's configuration dialog box.

  12. Exit Server Config.