ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
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?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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?
Answer
# 1
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 ?    1 Yes 0 No
Guest
 
  Re: 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?
Answer
# 2
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 ?    0 Yes 0 No
Kumar
 
 
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
what is index seek and index scan?  2
What is the difference between Userdefined function and stored procedure? Explain and give the example also  4
how to know Who Is Blocking Your SQL Server?  2
What are functions  3
How to Run a Query on a Remote SQL Server?  2
WHAT IS TRIGGERS IN SQL? AND WHAT IS THE BENIFIT?  5
what is IDE,DMV in sql server? Value-Labs1
how to replace double quotes by single quotes in sql server CAC2
What is the difference between SSAS 2000 and SSAS 2005? APX1
what is the output for this query select * from employee where 1=1;  4
What all db objects can be found in MSDB database of a SQL Server instance? Accenture1
what are default? Is there a column to which a default cant be bound?  1
What are SQL Jobs, please mention the use of it and how to create them. 247Customer1
Can you have a nested transaction? HCL3
How do you persist objects, permissions in tempdb  1
how many type of subquery?  2
in tabase table having a column in it empname field is there which having 5 duplicate values is there i want deleted all the duplicates i want showing only one name only.  7
Difference between Function and Stored Procedure? C1-India4
Wht is SQL Injection Attack ?  1
How to get the count of distinct records. Please give me the query? Value-Labs5
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com