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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 SQL Server Reinstallation

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-17 : 11:13:15
Bob writes "SQL Server has been installed on drive S:, I would like to reinstall the product to drive C:. I feel like I have researched the issue, but can not find details.

There are some primary data files located on the S: drive (master, model, msdb, and some user database primary files).

Is there a suggested method, like detach, copy files to new location, reinstall SQL Server, and attach? Any suggestions would be most appreciated.

Thanks

Bob"

penumatsa
Constraint Violating Yak Guru

289 Posts

Posted - 2002-01-17 : 15:52:39
Look for the sp_attach_db stored procedure in BOL. You can detach the database, install SQL Server and attach the database.

suresh penumatsa
Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-01-17 : 16:00:10
I don't believe that will work for they system databases.

I think the easiest way would be to uninstall/reinstall, then sp_attachdb you user databases. You can move the system DBs, but it is not as easy as the user DBs.

-Chad

Go to Top of Page

penumatsa
Constraint Violating Yak Guru

289 Posts

Posted - 2002-01-18 : 08:09:17
I should have been more specific. This store procedure works for the user DB's. I agree with Chad in regards to the system tables.

suresh penumatsa
Go to Top of Page

JamesH
Posting Yak Master

149 Posts

Posted - 2002-01-18 : 08:25:20
I would also generate scripts for all of your SQLAgent Jobs and any DTS jobs that you might have, it's not fun to find out that you forgot them. I have been upgrading some servers to Win2K and SQL2K with pretty good success by sp_detach_db, scripting the jobs and DTS packages, upgrading the o/s, service packing the o/s. Re-installing SQL2000, applying SP2, and then sp_attach_db's and running the scripts for the jobs/DTS Packages.

JamesH

Go to Top of Page

rsm
Starting Member

1 Post

Posted - 2002-01-18 : 09:50:20
Thanks everyone. This is Bob, but I changed my login. This definately helps, I was worried about deleting my data files on a reinstall. I would have lost my DTS and SQLServer Agent jobs also.

I take it if I detach my user databases, uninstall SQL Server, reinstall on the correct drive, attach my user databases, run the scripts to create my DTS and SQLServer Agent jobs I should be in good shape.

Users need to be scripted also, correct?

Once again, thanks so much, hopefully I will get better at SQL Server so that I can help in the forums too.

Bob

Go to Top of Page

chadmat
The Chadinator

1974 Posts

Posted - 2002-01-19 : 20:57:43
users are stored in the database, but you will need to recreate the logins once you reinstall, they are stored in master.

Most likely this will result in orphaned users, use sp_change_users_login to fix orphaned users.

HTH
-Chad

Go to Top of Page
   

- Advertisement -