Well sometimes sp_reanmedb may not work you know because if
some one is using the db it will not accept this command so
what do you think you can do in such cases?
Answers were Sorted based on User's Feedback
Answer / kumar
In This case you take following action
1. Alter DataBase <dbname> set single_user with rollback
immediate
2. Sp_renamedb 'olddb','newdb'
3. Alter DataBase <dbname> set multi_user
By
Kumar.T
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / guest
In such cases we can first bring to db to single user using
sp_dboptions and then we can rename that db and then we can
rerun the sp_dboptions command to remove the single user mode.
| Is This Answer Correct ? | 2 Yes | 0 No |
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?
What are key, name and value columns of an attribute? : sql server analysis services, ssas
One table Test with single column. These are the values in the table a b c d e f g h I need a query (without using any variable) with output as - a b c d e f g h
If we drop a table, does it also drop related objects like constraints, indexes, columns, defaults, views, and stored procedures?
what command is used to create a table by copying the structure of another table?
What objects does the fn_my_permissions function reports on? : sql server security
What is the stuff and how does it differ from the replace function?
What types of integrity are enforced by a foreign-key constraint
What is order of B+tree?
Mention the differences between local and global temporary tables.
When we should use @@error?
Explain magic tables in sql server?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)