Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    3

    Question Unanswered: Sybase - How to load DB in offline mode

    Hi,

    How to load Sybase database in offline mode?
    Tried the sp_dboption single user and get the following error.
    Error :"Database in use.A user with System Administrator (SA) role must have exclusive use of database to run load".

    Thanks in advance,
    gvr

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Before you start the load
    exec sp_who
    and issue a kill command for each spid where dbname=the dbname you are trying to load

  3. #3
    Join Date
    Feb 2007
    Posts
    3
    Hi ,

    The database load is part of the BCM and the load takes place automatically.
    I can add the kill command in the script,but is it possible to put the database offline and avoid Kill command.

    Thankyou.

  4. #4
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    No, but what do you expect a "database offline" command to do?
    Wait forever before going offline if a user didn't logout

  5. #5
    Join Date
    Feb 2007
    Posts
    3
    Let me describe the whole scenario:

    There is a master database. In that we have -
    dump
    dump.agc
    dump.procs

    We want to -
    " use master
    go
    load database agc from "/var/spool........"
    go
    "
    but when we load the database we get the below error.
    " Msg 3101, Level 16, State 1:
    Server 'SYBASE', Line 1:
    Database in use. A user with System Administrator (SA) role must have exclusive use of database to run load. "

    We want to run the command in any case.

  6. #6
    Join Date
    Mar 2007
    Posts
    72

    loadin database

    Hi,
    You cannot load database whilst its in use, meaning users are logged on, hence sybase forces users to log out or you kill them. write a small shell that can do this for you everytime you try to load databases.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •