SQL server 2005 Data needs to be moved

rwperkins
rwperkins used Ask the Experts™
on
I have a SQL server that I installed last year. When I created it, I placed two partitions on the hard drive. 1 for the OS and the 2nd for the databases.

I must have did something wrong when creating the databases or during the installation because the databases are on the OS partition.

What is the proper way to move these databases and not lose any information and security?
What is the best way to ensure this does not happen again?
Should I call in an expert to resolve??  

Thanks for your inputs!!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
SQL Server DBA & Architect, EE Solution Guide
Awarded 2009
Distinguished Expert 2018
Commented:
You need to Detach and attach the databases

http://msdn.microsoft.com/en-us/library/ms187858.aspx
To move your databases to another partition, you can follow the instructions sent by rrjegan17.

To prevent the creation of new databases into a OS partition, you can do 2 simple tasks:

1 - Change the "Database default locations", in the "Database settings" - "Server Properties". See attached file.

OR

2 - Always verify the filename and path when to create a new database. See
attached file.



server-properties.png
new-database.png

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial