how to connect to server 2000 as a single user mode

  • I want to change some user database names on COB server, how can i connect to the server using the single user mode and change the database names while the others are connected to the server

  • This is the code snippet I saved. it works on sql 7 (I think should also work with sql 2000). Try it first in your test server

    USE master --use master db

    GO

    EXEC sp_dboption dbSVS, 'Single User', True --set db to single user

    EXEC sp_renamedb 'dbSVS', 'dmdbsvs' --change db_name

    EXEC sp_dboption dmdbsvs, 'Single User', False --change back db to multiple user

    GO

    "-=Still Learning=-"

    Lester Policarpio

  • This may give more clear picture =>

    http://www.kodyaz.com/articles/alter-single-user-multi-user-mode.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply