Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Detach databse" Option is grayed... 2

Status
Not open for further replies.

davidchardonnet

Programmer
Mar 21, 2001
167
FR
Hello,

I want to move my SQL Server database to another hard drive. I searched on this forum and I saw a thread where I read it was necessary to detach the database. But When I have a look at this option, it appears to be grayed, and inaccessible.

Do you know what I am missing to do that?

Thank you

David
 
Are you the database owner or sysadmin?

Try
sp_detach_db dbname
in query analyser and see what the response is.

And try not to rely on enterprise manager too much - you will gain a lot more by using t-sql.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Okay I could detach and move the files. Thanks!!
Now What do I have to do to attach it?
 
Look at
sp_attach_db
or
sp_attach_single_file_db
in bol.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
If you were able to detach with tsql but not enterprise manager, you were proably looking at a sql7 database with sql2k enterprise manager.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top