How to start SAP ASE database server in single mode ?

To start a SAP ASE database server in single user mode follow the below steps :

1) Go to $SYBASE/$SYBASE_ASE/install directory.
2) make a copy of your RUN_servername file for the backup purpose.
3) edit the copied file and add -m flag at the end of the file and save it as m_RUN_servername. Like below

#!/bin/sh
#
# SAP ASE page size (KB):       4k
# Master device path:   /sybase/ase157/data/master.dat
# Error log path:       /sybase/ase157/ASE-16_0/install/sybase16.log
# Configuration file path:      /sybase/ase157/ASE-16_0/sybase16.cfg
# Directory for shared memory files:    /sybase/ase157/ASE-16_0
# License properties file:      /sybase/ase157/ASE-16_0/sysam/sybase16.properties
# Interfaces file directory:    /sybase/ase157
# SAP Adaptive Server Enterprise name:  sybase16
#
/sybase/ase157/ASE-16_0/bin/dataserver \
-d/sybase/ase157/data/master.dat \
-e/sybase/ase157/ASE-16_0/install/sybase16.log \
-c/sybase/ase157/ASE-16_0/sybase16.cfg \
-M/sybase/ase157/ASE-16_0 \
-N/sybase/ase157/ASE-16_0/sysam/sybase16.properties \
-i/sybase/ase157 \
-ssybase16 \
-m

4) shutdown the server(ASE database).
5) start the server with m_RUN_servername file.

eg.

% startserver -f m_RUN_servername

OR

% startserver -f RUN_servername -m

above command will also start the database server in single user mode.

And you can verify that from the logs you will get a message like,

00:0006:00000:00001:2015/12/22 21:20:16.52 server  *** WARNING ******************
00:0006:00000:00001:2015/12/22 21:20:16.52 server  ASE booted single user mode – updates allowed to system catalogs
00:0006:00000:00001:2015/12/22 21:20:16.52 server  *** WARNING ******************

This means that server is successfully started in single user mode.

if you will still try to connect to the server using Interactive SQL then you will omit the error like below

 

1

 

Advertisements