Results 1 to 7 of 7
  1. #1
    Join Date
    Apr 2004
    Location
    Paris
    Posts
    48

    Exclamation Unanswered: How Can I set exclusive use of database ?

    How Can I set exclusive use of database ?

    even if I have only 1 user ( "sa" ) and single-user mode database configured, I still have this error and I really need to know how to set exclusive use of database !!

    thx

  2. #2
    Join Date
    Jun 2003
    Posts
    140

    Re: How Can I set exclusive use of database ?

    Make sure there are no processes running in master..sysprocesses
    before loading your db
    execute this query to verify

    select suser_name(suid),* from master..sysprocesses where
    db_name(dbid)="yourdbname"

    kill the process if you see as a result of this query and load the db

    However if u dont get any result of this query and still facing same problem while loading the db then it may be possible that the
    "keep count" counter that keeps track of how many users are using the database did not get decremented in which case i think u need to reboot the server
    Last edited by perl; 04-21-04 at 21:02.

  3. #3
    Join Date
    Apr 2004
    Location
    Paris
    Posts
    48
    you were right, there was still some processes running or sleeping.

    So I rebooted my server as you told me.

    I tried the load command again and this is what I get :

    1> load database donateur_log from "e:\sybase\data\donateur_dat"
    2> go
    Backup Server session id is: 13. Use this value when executing the
    'sp_volchanged' system stored procedure after fulfilling any volume change
    request from the Backup Server.
    Backup Server: 4.10.2.1: Label validation error: first label not VOL1.
    Backup Server: 6.31.2.1: Volume rejected.
    Backup Server: 1.14.2.2: Unrecoverable I/O or volume error. This DUMP or LOAD
    session must exit.
    Backup Server: 6.32.2.3: e:\sybase\data\donateur_dat: volume not valid or not
    requested (server: , session id: 13.)
    Backup Server: 1.14.2.4: Unrecoverable I/O or volume error. This DUMP or LOAD
    session must exit.
    Msg 8009, Level 16, State 1:
    Line 1:
    Error encountered by Backup Server. Please refer to Backup Server messages for
    details.


    (this is after my reboot) :
    1> select suser_name(suid), * from master..sysprocesses where db_name(dbid)="donateur_log"
    2> go
    spid kpid enginenum status
    suid hostname program_name hostprocess cmd
    cpu physical_io memusage blocked dbid uid gid
    tran_name
    time_blocked network_pktsz fid execlass
    priority affinity id stmtnum
    linenum origsuid
    ------------------------------ ------ ----------- ----------- ------------


    (0 rows affected)

    1> sp_helpserver
    2> go
    name network_name
    security_mechanism
    status

    id
    ------------------------------ ------------------------------
    SYB_BACKUP TEST_BS
    NULL
    timeouts, no net password encryption, rpc security model A

    1

    TEST_XP TEST_XP
    NULL
    timeouts, no net password encryption

    2
    (return status = 0)

    1> sp_helpdb
    2> go
    name db_size owner dbid
    created
    status

    ------------------------ ------------- ------------------------ ------
    donateur_log 2.0 MB sa 5
    Apr 20, 2004
    dbo use only, single user

    master 5.0 MB sa 1
    Jan 01, 1900
    no options set

    model 2.0 MB sa 3
    Jan 01, 1900
    no options set

    sybsystemprocs 60.0 MB sa 4
    Apr 16, 2004
    trunc log on chkpt

    tempdb 2.0 MB sa 2
    Apr 22, 2004
    select into/bulkcopy/pllsort

    test1 2.0 MB sa 6
    Apr 19, 2004
    don't recover, offline


    (1 row affected)
    (return status = 0)

    Please tell me if something is wrong that I would need to reconfigure or if you want me to check sthg (some options, I don't know)

    I'm sure I miss something I haven't tried, there must be a way to have this load command eventually work on my server !!
    Please heeeeeeeeeeeeeeeeeeelp !!

  4. #4
    Join Date
    Jun 2003
    Posts
    140
    There can be no. of reasons for this error but most comman are

    -> make sure if Backup Server is running
    -> make sure server is able to communicate to backup server
    login to the server and give following cmd
    exec SYB_BACKUP...sp_who
    and make sure this is suceessful

    and also make sure you are loading dump of the same platform, i.e
    if dump was taken on windows env. it will be loaded only to windows server

  5. #5
    Join Date
    Apr 2004
    Location
    Paris
    Posts
    48
    this is what it says :

    1> exec SYB_BACKUP...sp_who
    2> go
    spid status loginame hostname blk cmd
    ----------- ---------- ------------ ------------ --- ----------------
    0 runnable NULL NULL 0 NULL
    2 sleeping NULL NULL 0 CONNECT HANDLER
    3 sleeping NULL NULL 0 DEFERRED HANDLER
    15 runnable NULL NULL 0 SITE HANDLER
    16 runnable sa WinNT 0 NULL

    (5 rows affected)

    My server is running under win NT and I have one user declared that is "sa".
    What do you conclude ?

  6. #6
    Join Date
    Jun 2003
    Posts
    140
    the proc gets executed successfully means backup server is able to communicate , where did u take the dump from ? from which OS ?
    also see if you are able to run "Dump database" command or not

  7. #7
    Join Date
    Apr 2004
    Location
    Paris
    Posts
    48
    ok it was not the same version
    I had a newer one on the server.

    so I reinstalled the right one (11.5)

    I don't know if it's gonna solve my problem but I really hope so !!!

    tomorrow I'll try the load command with a test database.

    thanks for your advice.

Posting Permissions

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