sqlserver 2005 reinstall | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sqlserver 2005 reinstall

hello, i stalled sqlserver 2005 on the server , but i did wrong by cretaing objects , users etc in master database instead of user database, is there a way i can reinstall the whole thing. how can i do that
The easiest thing is to first uninstall SQL Server 2005, then reinstall it. —————————–
Brad M. McGehee, SQL Server MVP
In one of my Development server also had this problem. WHat one of our lead did was he just created objects using Visio in Master Database. When we realised the mistake , we created a UserDatabase and Created all the object in that database using same Visio Version. And then we made a drop objects scrits from sys.tables,sys.views etc and ran that script in Master Database. We could have done this by deleting manually also. but by writing script like this , we were very clear that we were only droping those object that are created by Visio. Madhu
How hard it will be drop objects from MASTER and create them in user database? You can script all objects and choose the option to create the script with IF EXISTS…
You can run the IF EXISTS.. DROP …script in master and rest in user db… Note: Whenever you create an object use the first to line of the code change the db and check the db…to avoid these problems…
USE <user db>
IF DB_NAME() <USER DB> PRINT ‘Wrong db…’
Use the REBUILDDATABASE option in Setup.exe. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.