Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Install sql2005 wrongly in C drive and wanna move

Author  Topic 

nic829
Starting Member

3 Posts

Posted - 2008-10-15 : 06:15:18
Hi,



I was upgrading a instance from SQL2000 to SQL2005. During SQL2005 setup I accidently allow the files to be installed in C drive, but I should have them all installed in D drive.

My databases are still sits in D drive, but other files (Management studio, analysis service, etc.) all sits in C drive.

Is there anyway that I can move SQL2005 from C to D drive?

I thought of uninstalling current SQL2005, install it back and load current database to the new sql2005. However I dont have all the passwords of the users. Is there any method that I can solve the problem without removing current users?



Many Thanks,

Nicole

Sequin
Starting Member

25 Posts

Posted - 2008-10-15 : 10:00:03
If you just want to move the data files, open SQL Management studio and detach the database you wish to move. Then open up windows explorer and physically move the files (mdf, ldf etc) from the C: drive to the required folder on the D: drive.
Go back in to SQL Management studio and re-attach the database, browsing to the files in the new location. Your database will now be back up with the data stored in the new location with all of its previous permissions still there.

If you wish to move the whole SQL installation you will need to back up all of your system databases (Master, model etc), your actual database, uninstall, reinstall, and then restore the databases to the new drive. The first option is much easier!
Go to Top of Page

nic829
Starting Member

3 Posts

Posted - 2008-10-15 : 21:23:04
Thanks a lot Sequin, but sadly I have to take the second option :( My datafiles are already in D drive, just the binary files in C and must move them to D..

Just to check, if I restore the database after I install SQL on D drive, is the user login/password/permissions all still remain there?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-10-15 : 23:50:11
quote:
Originally posted by nic829

Thanks a lot Sequin, but sadly I have to take the second option :( My datafiles are already in D drive, just the binary files in C and must move them to D..

If your data files for all database including system DBS are in D Drive, then why you worry about binaries. It is not going to grow.

Just to check, if I restore the database after I install SQL on D drive, is the user login/password/permissions all still remain there?

First of all, you don't need to uninstall at all. But for your question, You should map database users with login.

Go to Top of Page
   

- Advertisement -