Wednesday 27 November 2019

Database in use. A user with System Administrator (SA) role must have exclusive use of database to run load

Facing the below error while doing the backup recovery in Sybase ASE

Database in use.  A user with System Administrator (SA) role must have exclusive
use of database to run load.


Reason :-
The Database must be in Single user mode while doing the Backup Recovery 

Solution :-
Edit the RUN_SID file

Location :-

Windows - <Drive>:\sybase\SID\ASE-16_0\install 
Unix        -   /sybase/SID/ASE-16_0/install

Current status of the file,

"D:\sybase\SID\ASE-16_0\bin\sqlsrvr.exe" -d"D:\sybase\SID\sybsystem\master.dat" -sSID -e"D:\sybase\SID\ASE-16_0\install\ES1.log" -c"D:\sybase\SID\SID.cfg" -N"D:\sybase\ES1\ASE-16_0\sysam\SID.properties" -i"D:\sybase\SID\ini" -M"D:\sybase\SID\ASE-16_0"

add -m parameter to the last entry of file like below,

"D:\sybase\SID\ASE-16_0\bin\sqlsrvr.exe" -d"D:\sybase\SID\sybsystem\master.dat" -sSID -e"D:\sybase\SID\ASE-16_0\install\ES1.log" -c"D:\sybase\SID\SID.cfg" -N"D:\sybase\ES1\ASE-16_0\sysam\SID.properties" -i"D:\sybase\SID\ini" -M"D:\sybase\SID\ASE-16_0" -m
  • Save the file,
  • Start the Database,
Now the DB will be in Single user Mode.

Restore the Database using below command from isql,

> load database SID from "backup location\backup file"  
> go

After successful restoration,

Execute below commands from isql,

> online database database_name 
> go
  • Stop the DB
Go to below location,

Windows - <Drive>:\sybase\SID\ASE-16_0\install 
Unix        -   /sybase/SID/ASE-16_0/install
  • Edit RUN_SID File,
  • Remove -m parameter
  • Save the file
  • Start the DB & Application
Thanks for reading, Please share your valuable feedback.  

Share this

2 Responses to "Database in use. A user with System Administrator (SA) role must have exclusive use of database to run load"