Re: renaming database

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 07/09/04


Date: Fri, 9 Jul 2004 07:21:00 +0530

hi dave,

make sure no-one else is connected to the database, including you.

you can try:
use master
go
exec sp_renamedb .............
--or (if sql 2000) you can try

alter database old_Database_name modify name = new_database_name

--if, still you get errors you can run following command,to disconnect other
users:
--note:it will rollback existing transaction

alter database <db_name> set single_user with rollback IMMEDIATE

-- 
Vishal Parkar
vgparkar@yahoo.co.in | vgparkar@hotmail.com


Relevant Pages

  • Re: XA installation instructions
    ... with the [SQLJDBCXAUser] role, you have to define the role in each database, ... SQL JDBC extended stored procedures which reside in master. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: SQL Server down
    ... Looks like you had a corruption in the master database. ... your SQL instance will not start no matter how hard the cluster tries to ... You may want to try to bring up the SQL instance without the ...
    (microsoft.public.sqlserver.clustering)
  • Re: Connecting to a remote sbs from a website?
    ... Your solution only works if your web app doesn't need to write data to the database. ... SQL server has always supported SQL authentication which does NOT require an SBS username/password. ... And if you aren't, somebody will find a way to break you, regardless of how well you think you've secured your master database. ...
    (microsoft.public.windows.server.sbs)
  • Re: Unable to connect to server
    ... that explains it - the definition for each database on a SQL Server is ... maintained in the Master database. ...
    (microsoft.public.sqlserver.security)
  • Re: The "Best Practice" for securing my vb.net/SQL connection.
    ... calls upon the stored procedures to access the tables in SQL 2005. ... The database will house mostly encrypted ... Create a master SP that has the rights to execute the existing app SPs. ...
    (microsoft.public.dotnet.languages.vb)