SlideShare uma empresa Scribd logo
1 de 44
Rollout and Back out plan for new SQL
Server 2000 installation
Details Plan for SQL server Installation on a Standalone server discussing aspects of with
Pre/ Post considerations in brief with visual objects for real time implementation.


10/13/2011
TATA CONSULTANCY SERVICES LTD.
Supreme Mandal
System Engineer
Associated ID 473199


Version 1.01
INDEX
   -------------------------------------------------------------------------------------


SQL Server Installation Rollout Plan

     Pre-Installation checkup                   ……………………………………………….. 3

     Un-installation of SQL Server DB Engine ……………………………………………….. 7

     Re-installation of SQL Server              ……………………………………………….. 8

     Post -installation Checkup                 ……………………………………………….. 19

     Disaster Recovery                          ……………………………………………….. 23




SQL Server Installation Back out Plan

      Pre-Installation checkup                 …………………………………………………. 44




                             TATA CONSULTANCY SERVICES                             Page 2
SQL Server 2000 Installation Roll-Out Plan

          Pre Installation Checkup

   Step 1: The First and Foremost thing is that after log-in on Server we have to check the status SQL Server Service
Manger in the system-tray the usual green-arrow indicates that the service (sqlservervr.exe) is running.




     Step 2:-If the Abnormal Red square blip on system tray then definitely SQL Server Service is stopped




                                        TATA CONSULTANCY SERVICES                                                Page 3
Step 3:-Where the services means all three services (MSDTC, MS SQL Server, SQL Server Agent)




    Step 4:-We can stop SQL Server Service from Command Prompt




    Or from SQL Server Service Manger Residing in System Tray




    Step 5:- Detach Application database(s)

Our Next Step will be Detach the application database (i.e like Northwind) and prior to detach ensure that
"Update statistics prior to detach option" checkbox is checked


    Caution! Prior to detachment update statistics for db must be checked so after the reinstallation


                                      TATA CONSULTANCY SERVICES                                          Page 4
Of SQL Server database Engine when we would like to attach the database it will be in updated version thus
alleviating any user complaints




     Caution! Here we are not applying Conventional well –practiced Backup-Restore option though the
provision is there because after restoring the backup we have to re-check user access once again and that will
put extra burden on post-installation check–up list




                                      TATA CONSULTANCY SERVICES                                           Page 5
Step 6:-Database successfully detached




     Step 7:-Now if we return to Enterprise Manager, the Northwind database is no longer visible.
(If it is still visible for you right click on "Databases" and choose "refresh").




T-SQL Steps:

     In query analyzer, connect to the Northwind database and run sp_helpfile. This will give you the name and
paths for all of the files that you will need to attach. Note that the full path isn't shown in the image below due
to space constraints.




     Connect to the master database in Query Analyzer and detach the Northwind database.




                                        TATA CONSULTANCY SERVICES                                           Page 6
Note that the Northwind database is gone. You can't connect to it using the dropdown list of databases in
Query Analyzer




        Un-installation SQL Server database engine

       Things to consider before you remove Microsoft SQL Server 2000

     Caution!: You may have databases that you want to save in their present state. You may also want to save
changes that were made to the default databases. If either is true, before you follow the steps in this article,
make sure that you have a known good backup of the data or that you save a copy of all the data and log files in
a folder other than the MSSQL folder, because you must delete the MSSQL folder.

The files you must save include these database files that Microsoft SQL Server 2000 installs:

      Distmdl.*
      Master.*
      Mastlog.*
      Model.*
      Modellog.*
      Msdbdata.*
      Msdblog.*
      Northwnd.* (optional install)
      Pubs.*
      Pubs_log.*
      Tempdb.*
      Templog.

Warning If the SQL Server installation is also being used in conjunction with Microsoft SQL Server Reporting
Services, make sure that the following folders and the sub-folders are also saved or renamed:

      Default pathReporting Services
      Default pathMSSQLReporting Services
      Default pathSQL Server Instance nameReporting Services
      Default path80ToolsReport Designer


                                       TATA CONSULTANCY SERVICES                                         Page 7
Note Default path refers to %ProgramFiles%Microsoft SQL Server

Remove a default instance of SQL Server
To remove a default instance of SQL Server locate, and then delete these registry keys:

     HKEY_LOCAL_MACHINESOFTWAREMicrosoftSearch
     HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSSQLServer
     HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSQLSERVERAGENT

Remove a named instance of SQL Server
To remove a named instance of SQL Server, follow these steps:

Locate, and then delete these registry keys for a Named Instance, where InstanceName is the name of the instance that
you are removing.

     HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSSQLServer$InstanceName
     HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSQLSERVERAGENT$InstanceName


   In case of any error countered SQL Server 2000 Uninstall Option Does Not Remove All Files here
Microsoft provided the FIX http://support.microsoft.com/kb/815057




          Re-installation of SQL Server

     Step 1:-The Auto run setup.bat File is located in the CD




                                         TATA CONSULTANCY SERVICES                                               Page 8
Step 2:-Installation window launched




Step 3:-Welcome to setup Wizard




                                TATA CONSULTANCY SERVICES   Page 9
Step 5:-Choosing installation on local computer




Step 6:-Creating a new instance




                                  TATA CONSULTANCY SERVICES   Page 10
Step 7:-Furnishing User Information




Step 8:-Accepting End-User License Agreement




                               TATA CONSULTANCY SERVICES   Page 11
Step 9:-Installing both server and Client tool




   Step 10:-Choosing the Default Instance or you can opt for Named Instance




                                  TATA CONSULTANCY SERVICES                   Page 12
Step 11:-Checking Disk Cost before launching final installation




     Step 12:-Using local System Account On the following screen chooses “Use the same account for each
service. Auto start SQL Server service” and “Use the local system account”




                                    TATA CONSULTANCY SERVICES                                      Page 13
Step 13:-Choosing Windows Authentication Mode you can also opt for SQL Server Authentication which
can be referred as Mixed Mode authentication.

    In case security perspective it will be wise to make Windows Authentication which is bonded with Active
Directory credentials thus leveraging robust security for possible thwarting of SQL Injection attack on Web
server As well as Data server.




    Step 14:-Set up starts copying program files in default location i.e. C:Program FilesMicrosoft SQL Server




                                    TATA CONSULTANCY SERVICES                                          Page 14
Step 15:-If there is specific Service Pack like SP3 needed to be installed then it will be like below




                                  TATA CONSULTANCY SERVICES                                             Page 15
Step 16:-Choosing Windows Authentication over SQL Server Authentication




    Step 17:-SP3 will detect if there in case of any blank password set earlier and it will indicate this flaw




    Step 18:-Service pack Setup Upgrade Wizard last information page will appear and checkbox must be
checked.




                                      TATA CONSULTANCY SERVICES                                            Page 16
Step 19:-Error reporting assistance from Microsoft will appear as well.




                                 TATA CONSULTANCY SERVICES                Page 17
Step 20:-Set up starts copying files




    Before Final rolling out last warning for backing up master & msdb database will appear as a part of
absolute precaution measurement




    Step 21:-Set up finally Completed SP 3 on your machine




                                      TATA CONSULTANCY SERVICES                                        Page 18
Post Installtion Checkup
     Step 1:-Well, First and Foremost thing after just pressing Finish button you have to rush to System Root
Folder and search for setup.iss and sqlstp.log/sqlsp.log for details installation information.

In current Version of SQL Server like 2008 the path should be navigated to C:Program FilesMicrosoft SQL
Server100Setup BootstrapLog.

      Step 2:-Checking the Registry for some highly important piece of information like

You can find out the install paths from the registry key corresponding to each instance.
HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL Server{InstanceName} MSSQLServer
SetupSQLPath

The names of all SQL Server instances on a computer can be found from the InstalledInstances value
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server

Information related to SQL Server 2000 setup and minimal configuration information is stored
HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server


       Step 3:-Using Query Analyzer checking instance name and user logged in once again for confirmation



                                        TATA CONSULTANCY SERVICES                                      Page 19
Step 4:-Install the Service Pack, Hotfixes and Cumulative Updates


      Step 5:-Configure SQL Server Services including SQL Server VSS Writer which is not available from enterprise
manager.




       Step 6:-Each & Every aspects of SQL Server properties must be checked like Server Settings, Database
Settings, Replication, Physical Memory, Processor, Security and Connection including Startup parameter and
Network Configurations.

Also three auto start policy checkboxes must be checked if they are found unchecked




                                       TATA CONSULTANCY SERVICES                                           Page 20
Step 7:-Configure TempDB


        Step 8:-Set max degree of parallelism sp_configure option based on the number of physical CPU cores
installed and anticipated workload

      Step 9:-Set cost threshold of parallelism sp_configure option based on the anticipated load.


      Step 10:-Attaching SQL Server Application database

We could copy these detached files to another server and attach them there if we wished (assuming that the
server setups were the same), but we're not going to do that, we're just going to reattach them to the same
database. In Enterprise Manager, right click on "Databases" and choose "All Tasks" then "Attach Database"




                                     TATA CONSULTANCY SERVICES                                         Page 21
Step 10.1:-The "Attach Database" screen pops up. Hit the ellipses button to search for the .mdf (primary
data file) of the database to attach. Once selected, all files belonging to the database will appear. In our case, the
primary data file and the transaction log for the Northwind database are displayed. Choose the name of the
database to attach as, specify the database owner, then click the "OK" button. You will receive a notification
that the attaching of the database has gone successfully. Click OK to continue. If you go into Enterprise
Manager like in step 3, you will now see that Northwind appears in the database list (if it doesn't right click on
databases and choose "Refresh"). Our Detach/Attach operation is now complete.




T-SQL Step

In query analyzer, run the sp_attach_db stored procedure. Specify a database name and all file locations to pull
from. You will get a notification in the Query Analyzer results pane that the command has completed
successfully. The Northwind database will once again appear in the dropdown list databases that are available
for connection. The detach/attach operation is now complete.




                                        TATA CONSULTANCY SERVICES                                            Page 22
Disaster Recovery
      Corruption of Master and msdb database and recovery procedure
In case of corruption of master and msdb databases steps are discussed here for a preemptive operation of
probable disaster recovery technique

     Caution! Restoring Master Database
Recovering From a Situation Where SQL Server 2000 Won't Start Because the Master Database Has Been Lost


   You will need to have a backup device already created - for the exercise on creating a backup device, Get
backups of the system databases - the restore process will overwrite all of them, so it's a good idea to have a
backup


    Create a new database. In Enterprise Manager, right click on "Databases" and choose "New Database"




    The "Database Properties" screen pops up. Name your database "newdatabase" and click the "OK" button.
You don't even have to look at the Data Files or Transaction Log tabs, we'll just take the defaults.




                                      TATA CONSULTANCY SERVICES                                          Page 23
Create four backup devices. One for each of the following databases: model, master, msdb, newdatabase.
Remember where you are putting these backup devices on the file system, you will need to know the location
later. Below is how we set up our master backup device..




                                     TATA CONSULTANCY SERVICES                                       Page 24
Now back up each of the four databases mentioned in step 1 (master, model, msdb, newdatabase) to their
respective backup devices that we created earlier in this exercise. Be very careful not to back them all up to the
same device, match each database to its own backup device.


    We are now going to find all of the files belonging to the master database. Right click on the master
database and choose properties.




    Once on the properties screen, note the location of the data files and transaction log files by looking at the
corresponding tabs. We are going to delete these files to simulate a complete loss of the master database.




                                       TATA CONSULTANCY SERVICES                                           Page 25
Exit out of Enterprise Manager and Query Analyzer if they are open. Stop SQL Server by right clicking on
the SQL Server icon in the systray. You'll be prompted to make sure that this is what you want to do, click the
"Yes" button.




    At this point, you should probably make copies of the files we discovered in step 6 and rename them. That
way if the restore doesn't work the first time, you should be able to just put the files back and restart the
database. After you have made the copies, delete the master database files that we found in step 6.


    If you now attempted to start the database by right clicking on the SQL Server icon in the systray and
choosing "MSSQLServer-Start", nothing would happen. The master database is damaged, and you need the
master database to even start SQL Server.


    Due to the bug mentioned in the Setup portion of this exercise, we need to do a little manual labor. Find the
x86data directory on your installation CD and copy all files in this directory to a designated folder on your
hard drive. The folder I copied the files into is C:masterrecover. As you probably already know, when you
copy a file from CD to the hard drive, the file will be read only. The files must be made read-write for the
rebuild master utility to work. Highlight all of the files and right click. The properties screen will pop up.
Uncheck the "Read only" box in the attributes section.


     We are now going to rebuild the master database and then eventually bring back the backup that we created
earlier in this exercise. Go to the directory that contains the rebuildm.exe application and run it. It will be in the
Microsoft SQL Server80ToolsBinn directory.




                                        TATA CONSULTANCY SERVICES                                            Page 26
The Rebuild Master utility appears. Enter your server name and the directory on your hard drive where
you copied all of your files to. Then click the "Rebuild" button.


    You will get notifications about copies occurring and about server configuration. If all goes well, you will
eventually get the following prompt:




     For illustrative purposes, we are going to restart SQL Server. Right click on the SQL Server icon as shown
in step 7, only this time select "MSSQLServer - Start". Start Enterprise Manager and browse the databases.
Note that the "newdatabase" that we created earlier in this exercise is now gone. All of the system databases
shown have been copied directly off of the installation CD (via the directory that we copied these CD files to).
"newdatabase" that we created earlier isn't shown because the master database keeps track of all of the user
created databases, and the master database is contains only the information from the new installation. Also note
that all of the backup devices we created before are gone as well because we are dealing with a brand new
master database as well as a new msdb database, which keeps track of backup devices, backups, and jobs
among other things. We're going to have to restore master and msdb to get the newdatabase back and to get our
backup devices back.




    Exit Enterprise Manager and query analyzer if they are open. Start up SQL Server in single user mode as
shown below. The sqlservr.exe application should be located in the MSSQLbinn directory. Start the database
using the -c and -m options. Minimize this DOS window to keep it out of the way, but don't close it.




                                      TATA CONSULTANCY SERVICES                                          Page 27
-c option shortens startup time
       -m option starts up the database in single user mode. The database must be in single user mode to restore
       the master database.

For more information, on starting the database in single user mode, look in Books Online under "Startup
Options"


    Start up Enterprise Manager. Right click on the master database, then choose "All Tasks" and "Restore
Database".




   The Restore Database screen pops up. Click the "From Device" radio button and then click on the "Select
Devices..." button.




                                     TATA CONSULTANCY SERVICES                                         Page 28
The "Choose Restore Devices" screen pops up. We're going to restore from disk, to do this, we need to find
our file, click the "Add" button.




                                     TATA CONSULTANCY SERVICES                                         Page 29
The "Choose Restore Destination" screen is now shown. We can't choose a backup device because our
database in its current form doesn't recognize any of our backup devices, and it won't until we restore the msdb
database - which we will do later. For now, click the "File name:" radio button and click on the ellipses to
search for our master backup device.




    Find the master backup device you created very early in the exercise and click the "OK" button.



                                      TATA CONSULTANCY SERVICES                                          Page 30
You'll now progress back through the screens we've already been on. Click "OK" on the "Choose Restore
Destination" screen.




    Click "OK" on the "Choose Restore Devices" screen.


                                    TATA CONSULTANCY SERVICES                                      Page 31
Once we're back on the "Restore Database" screen, click on the "Options" tab.




                                 TATA CONSULTANCY SERVICES                      Page 32
You're just viewing the files that are going to be restored. Note that these files will overwrite our existing
data files, which is exactly what we want. Click the "OK" button.




     You'll see a restore progress screen. Once the restore is complete, you'll get the following notification - this
is not an error message. The database has been successfully restored and now you are no longer connected in
single user mode. You'll also receive a message indicating that your connection in Enterprise Manager has been
broken. Just close completely out of Enterprise Manager to avoid the annoying error messages.




                                       TATA CONSULTANCY SERVICES                                             Page 33
Start up SQL Server by right clicking on the icon and selecting "MSSQLServer - Start"


    Go into Enterprise Manager and browse the databases. The newdatabase has once again returned. We never
wiped out the data files for "newdatabase", but now we have restored our original master database which has all
requisite information to load the master database.




     Your next step will be to restore the msdb database. The steps will be similar to the master database restore
(steps 16-24) except you don't need to be in single user mode to restore the msdb database. After you restore the
msdb database, restoring other databases on the server becomes much easier because the backup devices have
been restored. If you go to restore model or northwind, the suggested restore files are presented directly to you,
instead of having to try to find the .BAK file on disk.



     Rebuild Master failed with error -1:

The other day I was trying to rebuild the master database for a SQL Server 2000 box. Everything was going
well until the “Configuring Server” dialog popped up.




The progress bar went across about 4 times and then an error message popped up.




                                      TATA CONSULTANCY SERVICES                                           Page 34
That’s weird, you have rebuilt the master database a few times before and you have never encountered errors
like this one. You have to look for the error details and started with the cnfgsvr.out log file located in
C:Program FilesMicrosoft SQL ServerMSSQLInstall




By looking at the log file, I could confirm the error, but it didn’t help to explain as why the connections had
failed. So I ran eventvwr. One of the system log error mentioned something about MSSQLSERVER service
failed to start.




                                       TATA CONSULTANCY SERVICES                                           Page 35
At that point, I was still not sure what’d happened, so I then ran services.msc and tried to start the
MSSQLSERVER service manually.




The error message matched what I had seen in the event viewer. Path? What path? Suddenly as if stricken by
lightening, I noticed “Path to executable:” had the short file names for the path. The question became obvious,
what was MICROS~3?




A quick look in the explorer revealed 5 long name folders starting with the word “Microsoft”.




MICROS~3 happened to be “Microsoft Office” instead of “Microsoft SQL Server”. Now the cause of the issue
had been identified, I needed a way to work around it. For what I was doing at the time, I could not just reinstall
SQL Server, therefore I decided to move the “80” and “mssql” folders into “Microsoft Office”.




                                       TATA CONSULTANCY SERVICES                                           Page 36
What I had effectively done was making C:PROGRA~1MICROS~3MSSQLbinnsqlservr.exe a valid path.

Then I reran rebuildm.exe and as expected, everything worked.




     Caution! Restoring msdb Database

     The msdb database stores all of our backup information and our job information. We're going to assume in
this exercise that we lose the data and transaction log for the msdb database. Fortunately, we have a backup that
we'll be able to restore. The msdb database restore is a typical database restore, except that you must make sure
that SQL Server Agent is stopped during the restore. Likewise master db You will need to have a backup device
already created


    In Enterprise Manager, back up the msdb database by right clicking on the msdb database and choosing
"All Tasks", "Backup Database".




    The backup database screen appears. Choose "msdb" as the database, provide a id, and give the database a
complete backup. Choose a destination device, and click the "OK" button. You will be notified that the backup
operation completed successfully.




                                      TATA CONSULTANCY SERVICES                                          Page 37
Find out where the msdb data and transaction log files are. In Enterprise Manager, right click on the msdb
database and choose "Properties".


    The properties menu appears. Click on the Data Files and Transaction Log Files tabs to find the file
locations.




                                      TATA CONSULTANCY SERVICES                                            Page 38
Shut down SQL Server by going into Enterprise Manager, right clicking on the Server and choosing
"Stop".




    Delete the files that we found in step 4 from the operating system.


    Restart SQL Server by right clicking on the server in Enterprise Manager (just like in step 5) and choosing
"Stop".


    Although it is difficult to replicate in this example, make sure that the SQL Server Agent is stopped before
we begin the restore process. You can't restore a database unless you have exclusive access, and in the case of
the msdb database, SQL Server Agent would ruin the exclusive access.


     In Enterprise Manager, right click on the msdb database, choose "All Tasks", and "Restore Database". You
will probably get multiple error messages letting you know that there is a problem with the database and it can't
be opened. Just continue to click "OK" for each message.




                                      TATA CONSULTANCY SERVICES                                          Page 39
After the error messages, the Restore database screen appears. Click the "From Device" radio button, then
click on the "Select Devices" button. The other defaults should be fine (We're restoring a complete database
backup set).


     You are taken to a "Choose Restore Devices" screen. Make sure that the disk radio button is selected and
click the "Add" button.




     We now choose a restore destination. We're going to click on the "Backup Device" radio button and select
the same device that we backed our database to earlier in the exercise. Click the "OK" button.




                                     TATA CONSULTANCY SERVICES                                         Page 40
Just click the "OK" button when you are returned to the "Choose Restore Devices" screen. Notice that our
Device name is now established.




     You are returned to the "Restore Database" screen. Just click the "OK" button and the database will be
restored.




                                     TATA CONSULTANCY SERVICES                                         Page 41
We are notified that our restore process is complete and we're done.




T-SQL Steps:

    Backup the database in Query Analyzer.




     While connected to the msdb database in Query Analyzer, find the path for the msdb data and transaction
log files by using sp_helpfile (The entire path is truncated in the image).




    Shutdown the server from Query Analyzer.




    Delete the files from step 2 in the Operating system.


    Start up SQL Server in Enterprise Manager by right clicking on the server and choosing "Start".




                                      TATA CONSULTANCY SERVICES                                       Page 42
Although it is difficult to replicate in this example, make sure that the SQL Server Agent is stopped before
we begin the restore process. You can't restore a database unless you have exclusive access, and in the case of
the msdb database, SQL Server Agent would ruin the exclusive access.


    We need to get a file number for our RESTORE DATABASE statement. We run the RESTORE
HEADERONLY statement while connected to the master database and discover that there is only one file in our
backup device, and this is the backup set that we will need to restore.




    Restore the msdb database while still connected to the master database in Query Analyzer, and our restore
process is complete.




                                      TATA CONSULTANCY SERVICES                                          Page 43
SQL Server 2000 Installation Back-Out Plan

             Pre-installation Checkup
Considering the hardware factors on the stand alone server we have to repeat from Step 1 to Step 7 as the pre
installation checkup.



        Un-installation SQL Server database engine
Completing Pre-installation Checkup we shall ramble down to the street of un-installation if face some some
unexpected error like “SQL Server 2000 Uninstall Option Does Not Remove All Files” then we have to
check Microsoft support center site mentioned earlier


       Once you remove SQL Server executables from stand alone machine then there we would have benn left
no choice but to move forward accepting next stage i.e. Re-installation of SQL Server. So you have to be very
cautious before removing un-installation and during removal of Default or Named Instance.


       There must be proper back up of each data file (.mdf) and log file (.ldf) for each database (system and
application both) running under SQL server database engine.


        If case of any discrepancy occurred (like Hardware unable to meet requirement or any other runtime
error) if you have no choice but to abort the mission then perform step 10 in Re-installation of SQL Server
and attach those database files after restarting sqlservr.exe service




       After attaching those file Run below command against each database here Northwind




     If there is no error message then everything is fine




                                       TATA CONSULTANCY SERVICES                                        Page 44

Mais conteúdo relacionado

Mais procurados (7)

Installing ingres enterprise access in a system which already has an ingres i...
Installing ingres enterprise access in a system which already has an ingres i...Installing ingres enterprise access in a system which already has an ingres i...
Installing ingres enterprise access in a system which already has an ingres i...
 
181 Rac
181 Rac181 Rac
181 Rac
 
381 Pdfsam
381 Pdfsam381 Pdfsam
381 Pdfsam
 
Sap hana installation_guide_en
Sap hana installation_guide_enSap hana installation_guide_en
Sap hana installation_guide_en
 
81 Pdfsam
81 Pdfsam81 Pdfsam
81 Pdfsam
 
Obiee installation guide v2
Obiee installation guide v2Obiee installation guide v2
Obiee installation guide v2
 
DAC
DACDAC
DAC
 

Destaque

New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
Govind Raj
 

Destaque (13)

Sql Server 2000
Sql Server 2000Sql Server 2000
Sql Server 2000
 
Installing Windows2000 Server
Installing Windows2000 ServerInstalling Windows2000 Server
Installing Windows2000 Server
 
Ms Sql server installation 2008R2
Ms Sql server installation 2008R2Ms Sql server installation 2008R2
Ms Sql server installation 2008R2
 
SQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database ProjectsSQL in Version Control using SQL Server Database Projects
SQL in Version Control using SQL Server Database Projects
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
 
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
SQL Server 2014 New Features (Sql Server 2014 Yenilikleri)
 
Chapter1
Chapter1Chapter1
Chapter1
 
New features of sql server 2016 bi features
New features of sql server 2016 bi featuresNew features of sql server 2016 bi features
New features of sql server 2016 bi features
 
New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012 New T-SQL Features in SQL Server 2012
New T-SQL Features in SQL Server 2012
 
What is the ServiceStack?
What is the ServiceStack?What is the ServiceStack?
What is the ServiceStack?
 
What's new in SQL Server 2016
What's new in SQL Server 2016What's new in SQL Server 2016
What's new in SQL Server 2016
 
SQL server 2016 New Features
SQL server 2016 New FeaturesSQL server 2016 New Features
SQL server 2016 New Features
 
Step by Step Installation of Microsoft SQL Server 2012
Step by Step Installation of Microsoft SQL Server 2012 Step by Step Installation of Microsoft SQL Server 2012
Step by Step Installation of Microsoft SQL Server 2012
 

Semelhante a SQL Server 2000 Installation Rollout Backout Plan

DBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docxDBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
seifusisay06
 
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_editedELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
Elizabeth Wilcox
 
New sap installation post installation
New sap  installation   post installationNew sap  installation   post installation
New sap installation post installation
dkeerthan
 
Dell open manage essentials install
Dell open manage essentials installDell open manage essentials install
Dell open manage essentials install
Svetlana Kachintseva
 

Semelhante a SQL Server 2000 Installation Rollout Backout Plan (20)

How to-install-sql-server-2008
How to-install-sql-server-2008How to-install-sql-server-2008
How to-install-sql-server-2008
 
installation and configuration of informatica server
installation and configuration of informatica serverinstallation and configuration of informatica server
installation and configuration of informatica server
 
SQL server part 1
SQL server  part 1SQL server  part 1
SQL server part 1
 
patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack patchVantage Cloud Starter Pack
patchVantage Cloud Starter Pack
 
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docxDBA, LEVEL III TTLM Monitoring and Administering Database.docx
DBA, LEVEL III TTLM Monitoring and Administering Database.docx
 
Automatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 octAutomatic upgrade and new error logging in my sql 8.0 oct
Automatic upgrade and new error logging in my sql 8.0 oct
 
Tableau Architecture
Tableau ArchitectureTableau Architecture
Tableau Architecture
 
Microsoft SQL Azure - Developing And Deploying With SQL Azure Whitepaper
Microsoft SQL Azure - Developing And Deploying With SQL Azure WhitepaperMicrosoft SQL Azure - Developing And Deploying With SQL Azure Whitepaper
Microsoft SQL Azure - Developing And Deploying With SQL Azure Whitepaper
 
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_editedELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
ELW_Symantec_SD 7 1 Upgrade and Install_Draft1_Charles_edited
 
Sql tuning
Sql tuningSql tuning
Sql tuning
 
IUG ATL PC 9.5
IUG ATL PC 9.5IUG ATL PC 9.5
IUG ATL PC 9.5
 
New sap installation post installation
New sap  installation   post installationNew sap  installation   post installation
New sap installation post installation
 
SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5SQL Server 2019 CTP 2.5
SQL Server 2019 CTP 2.5
 
A Simple Guide to Download SQL Server 2019.pdf
A Simple Guide to Download SQL Server 2019.pdfA Simple Guide to Download SQL Server 2019.pdf
A Simple Guide to Download SQL Server 2019.pdf
 
Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017Enhancements that will make your sql database roar sp1 edition sql bits 2017
Enhancements that will make your sql database roar sp1 edition sql bits 2017
 
cynapspro endpoint data protection - installation guide
cynapspro endpoint data protection - installation guidecynapspro endpoint data protection - installation guide
cynapspro endpoint data protection - installation guide
 
Microsoft SQL Server Database Administration.pptx
Microsoft SQL Server Database Administration.pptxMicrosoft SQL Server Database Administration.pptx
Microsoft SQL Server Database Administration.pptx
 
All database solution-Installing Micosoft SQL Server 2016
All database solution-Installing Micosoft SQL Server 2016All database solution-Installing Micosoft SQL Server 2016
All database solution-Installing Micosoft SQL Server 2016
 
Dell open manage essentials install
Dell open manage essentials installDell open manage essentials install
Dell open manage essentials install
 
Sap system copy procedure
Sap system copy procedureSap system copy procedure
Sap system copy procedure
 

Mais de ► Supreme Mandal ◄ (8)

ITIL 2011 Foundation Overview
ITIL 2011 Foundation OverviewITIL 2011 Foundation Overview
ITIL 2011 Foundation Overview
 
Installation of Windows Server 2003 Domain Controller and DNS Server Setup
Installation of Windows Server 2003 Domain Controller and DNS Server SetupInstallation of Windows Server 2003 Domain Controller and DNS Server Setup
Installation of Windows Server 2003 Domain Controller and DNS Server Setup
 
Installation of Active Directory on Windows Server 2003 Server
Installation of Active Directory on Windows Server 2003 ServerInstallation of Active Directory on Windows Server 2003 Server
Installation of Active Directory on Windows Server 2003 Server
 
Installation of Active Directory on Windows 2000 Server
Installation of Active Directory on Windows 2000 ServerInstallation of Active Directory on Windows 2000 Server
Installation of Active Directory on Windows 2000 Server
 
Forefront tmg 2010 Network Inspection System & Custom Protocols
Forefront tmg 2010 Network Inspection System & Custom ProtocolsForefront tmg 2010 Network Inspection System & Custom Protocols
Forefront tmg 2010 Network Inspection System & Custom Protocols
 
SQL Server Performance Tuning Baseline
SQL Server Performance Tuning BaselineSQL Server Performance Tuning Baseline
SQL Server Performance Tuning Baseline
 
SQL Server Clustering and High Availability
SQL Server Clustering and High AvailabilitySQL Server Clustering and High Availability
SQL Server Clustering and High Availability
 
Dell & HP Tutorial
Dell & HP TutorialDell & HP Tutorial
Dell & HP Tutorial
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

SQL Server 2000 Installation Rollout Backout Plan

  • 1. Rollout and Back out plan for new SQL Server 2000 installation Details Plan for SQL server Installation on a Standalone server discussing aspects of with Pre/ Post considerations in brief with visual objects for real time implementation. 10/13/2011 TATA CONSULTANCY SERVICES LTD. Supreme Mandal System Engineer Associated ID 473199 Version 1.01
  • 2. INDEX ------------------------------------------------------------------------------------- SQL Server Installation Rollout Plan Pre-Installation checkup ……………………………………………….. 3 Un-installation of SQL Server DB Engine ……………………………………………….. 7 Re-installation of SQL Server ……………………………………………….. 8 Post -installation Checkup ……………………………………………….. 19 Disaster Recovery ……………………………………………….. 23 SQL Server Installation Back out Plan Pre-Installation checkup …………………………………………………. 44 TATA CONSULTANCY SERVICES Page 2
  • 3. SQL Server 2000 Installation Roll-Out Plan Pre Installation Checkup Step 1: The First and Foremost thing is that after log-in on Server we have to check the status SQL Server Service Manger in the system-tray the usual green-arrow indicates that the service (sqlservervr.exe) is running. Step 2:-If the Abnormal Red square blip on system tray then definitely SQL Server Service is stopped TATA CONSULTANCY SERVICES Page 3
  • 4. Step 3:-Where the services means all three services (MSDTC, MS SQL Server, SQL Server Agent) Step 4:-We can stop SQL Server Service from Command Prompt Or from SQL Server Service Manger Residing in System Tray Step 5:- Detach Application database(s) Our Next Step will be Detach the application database (i.e like Northwind) and prior to detach ensure that "Update statistics prior to detach option" checkbox is checked Caution! Prior to detachment update statistics for db must be checked so after the reinstallation TATA CONSULTANCY SERVICES Page 4
  • 5. Of SQL Server database Engine when we would like to attach the database it will be in updated version thus alleviating any user complaints Caution! Here we are not applying Conventional well –practiced Backup-Restore option though the provision is there because after restoring the backup we have to re-check user access once again and that will put extra burden on post-installation check–up list TATA CONSULTANCY SERVICES Page 5
  • 6. Step 6:-Database successfully detached Step 7:-Now if we return to Enterprise Manager, the Northwind database is no longer visible. (If it is still visible for you right click on "Databases" and choose "refresh"). T-SQL Steps: In query analyzer, connect to the Northwind database and run sp_helpfile. This will give you the name and paths for all of the files that you will need to attach. Note that the full path isn't shown in the image below due to space constraints. Connect to the master database in Query Analyzer and detach the Northwind database. TATA CONSULTANCY SERVICES Page 6
  • 7. Note that the Northwind database is gone. You can't connect to it using the dropdown list of databases in Query Analyzer Un-installation SQL Server database engine Things to consider before you remove Microsoft SQL Server 2000 Caution!: You may have databases that you want to save in their present state. You may also want to save changes that were made to the default databases. If either is true, before you follow the steps in this article, make sure that you have a known good backup of the data or that you save a copy of all the data and log files in a folder other than the MSSQL folder, because you must delete the MSSQL folder. The files you must save include these database files that Microsoft SQL Server 2000 installs:  Distmdl.*  Master.*  Mastlog.*  Model.*  Modellog.*  Msdbdata.*  Msdblog.*  Northwnd.* (optional install)  Pubs.*  Pubs_log.*  Tempdb.*  Templog. Warning If the SQL Server installation is also being used in conjunction with Microsoft SQL Server Reporting Services, make sure that the following folders and the sub-folders are also saved or renamed:  Default pathReporting Services  Default pathMSSQLReporting Services  Default pathSQL Server Instance nameReporting Services  Default path80ToolsReport Designer TATA CONSULTANCY SERVICES Page 7
  • 8. Note Default path refers to %ProgramFiles%Microsoft SQL Server Remove a default instance of SQL Server To remove a default instance of SQL Server locate, and then delete these registry keys:  HKEY_LOCAL_MACHINESOFTWAREMicrosoftSearch  HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSSQLServer  HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSQLSERVERAGENT Remove a named instance of SQL Server To remove a named instance of SQL Server, follow these steps: Locate, and then delete these registry keys for a Named Instance, where InstanceName is the name of the instance that you are removing.  HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMSSQLServer$InstanceName  HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesSQLSERVERAGENT$InstanceName In case of any error countered SQL Server 2000 Uninstall Option Does Not Remove All Files here Microsoft provided the FIX http://support.microsoft.com/kb/815057 Re-installation of SQL Server Step 1:-The Auto run setup.bat File is located in the CD TATA CONSULTANCY SERVICES Page 8
  • 9. Step 2:-Installation window launched Step 3:-Welcome to setup Wizard TATA CONSULTANCY SERVICES Page 9
  • 10. Step 5:-Choosing installation on local computer Step 6:-Creating a new instance TATA CONSULTANCY SERVICES Page 10
  • 11. Step 7:-Furnishing User Information Step 8:-Accepting End-User License Agreement TATA CONSULTANCY SERVICES Page 11
  • 12. Step 9:-Installing both server and Client tool Step 10:-Choosing the Default Instance or you can opt for Named Instance TATA CONSULTANCY SERVICES Page 12
  • 13. Step 11:-Checking Disk Cost before launching final installation Step 12:-Using local System Account On the following screen chooses “Use the same account for each service. Auto start SQL Server service” and “Use the local system account” TATA CONSULTANCY SERVICES Page 13
  • 14. Step 13:-Choosing Windows Authentication Mode you can also opt for SQL Server Authentication which can be referred as Mixed Mode authentication. In case security perspective it will be wise to make Windows Authentication which is bonded with Active Directory credentials thus leveraging robust security for possible thwarting of SQL Injection attack on Web server As well as Data server. Step 14:-Set up starts copying program files in default location i.e. C:Program FilesMicrosoft SQL Server TATA CONSULTANCY SERVICES Page 14
  • 15. Step 15:-If there is specific Service Pack like SP3 needed to be installed then it will be like below TATA CONSULTANCY SERVICES Page 15
  • 16. Step 16:-Choosing Windows Authentication over SQL Server Authentication Step 17:-SP3 will detect if there in case of any blank password set earlier and it will indicate this flaw Step 18:-Service pack Setup Upgrade Wizard last information page will appear and checkbox must be checked. TATA CONSULTANCY SERVICES Page 16
  • 17. Step 19:-Error reporting assistance from Microsoft will appear as well. TATA CONSULTANCY SERVICES Page 17
  • 18. Step 20:-Set up starts copying files Before Final rolling out last warning for backing up master & msdb database will appear as a part of absolute precaution measurement Step 21:-Set up finally Completed SP 3 on your machine TATA CONSULTANCY SERVICES Page 18
  • 19. Post Installtion Checkup Step 1:-Well, First and Foremost thing after just pressing Finish button you have to rush to System Root Folder and search for setup.iss and sqlstp.log/sqlsp.log for details installation information. In current Version of SQL Server like 2008 the path should be navigated to C:Program FilesMicrosoft SQL Server100Setup BootstrapLog. Step 2:-Checking the Registry for some highly important piece of information like You can find out the install paths from the registry key corresponding to each instance. HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL Server{InstanceName} MSSQLServer SetupSQLPath The names of all SQL Server instances on a computer can be found from the InstalledInstances value HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server Information related to SQL Server 2000 setup and minimal configuration information is stored HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL Server Step 3:-Using Query Analyzer checking instance name and user logged in once again for confirmation TATA CONSULTANCY SERVICES Page 19
  • 20. Step 4:-Install the Service Pack, Hotfixes and Cumulative Updates Step 5:-Configure SQL Server Services including SQL Server VSS Writer which is not available from enterprise manager. Step 6:-Each & Every aspects of SQL Server properties must be checked like Server Settings, Database Settings, Replication, Physical Memory, Processor, Security and Connection including Startup parameter and Network Configurations. Also three auto start policy checkboxes must be checked if they are found unchecked TATA CONSULTANCY SERVICES Page 20
  • 21. Step 7:-Configure TempDB Step 8:-Set max degree of parallelism sp_configure option based on the number of physical CPU cores installed and anticipated workload Step 9:-Set cost threshold of parallelism sp_configure option based on the anticipated load. Step 10:-Attaching SQL Server Application database We could copy these detached files to another server and attach them there if we wished (assuming that the server setups were the same), but we're not going to do that, we're just going to reattach them to the same database. In Enterprise Manager, right click on "Databases" and choose "All Tasks" then "Attach Database" TATA CONSULTANCY SERVICES Page 21
  • 22. Step 10.1:-The "Attach Database" screen pops up. Hit the ellipses button to search for the .mdf (primary data file) of the database to attach. Once selected, all files belonging to the database will appear. In our case, the primary data file and the transaction log for the Northwind database are displayed. Choose the name of the database to attach as, specify the database owner, then click the "OK" button. You will receive a notification that the attaching of the database has gone successfully. Click OK to continue. If you go into Enterprise Manager like in step 3, you will now see that Northwind appears in the database list (if it doesn't right click on databases and choose "Refresh"). Our Detach/Attach operation is now complete. T-SQL Step In query analyzer, run the sp_attach_db stored procedure. Specify a database name and all file locations to pull from. You will get a notification in the Query Analyzer results pane that the command has completed successfully. The Northwind database will once again appear in the dropdown list databases that are available for connection. The detach/attach operation is now complete. TATA CONSULTANCY SERVICES Page 22
  • 23. Disaster Recovery Corruption of Master and msdb database and recovery procedure In case of corruption of master and msdb databases steps are discussed here for a preemptive operation of probable disaster recovery technique Caution! Restoring Master Database Recovering From a Situation Where SQL Server 2000 Won't Start Because the Master Database Has Been Lost You will need to have a backup device already created - for the exercise on creating a backup device, Get backups of the system databases - the restore process will overwrite all of them, so it's a good idea to have a backup Create a new database. In Enterprise Manager, right click on "Databases" and choose "New Database" The "Database Properties" screen pops up. Name your database "newdatabase" and click the "OK" button. You don't even have to look at the Data Files or Transaction Log tabs, we'll just take the defaults. TATA CONSULTANCY SERVICES Page 23
  • 24. Create four backup devices. One for each of the following databases: model, master, msdb, newdatabase. Remember where you are putting these backup devices on the file system, you will need to know the location later. Below is how we set up our master backup device.. TATA CONSULTANCY SERVICES Page 24
  • 25. Now back up each of the four databases mentioned in step 1 (master, model, msdb, newdatabase) to their respective backup devices that we created earlier in this exercise. Be very careful not to back them all up to the same device, match each database to its own backup device. We are now going to find all of the files belonging to the master database. Right click on the master database and choose properties. Once on the properties screen, note the location of the data files and transaction log files by looking at the corresponding tabs. We are going to delete these files to simulate a complete loss of the master database. TATA CONSULTANCY SERVICES Page 25
  • 26. Exit out of Enterprise Manager and Query Analyzer if they are open. Stop SQL Server by right clicking on the SQL Server icon in the systray. You'll be prompted to make sure that this is what you want to do, click the "Yes" button. At this point, you should probably make copies of the files we discovered in step 6 and rename them. That way if the restore doesn't work the first time, you should be able to just put the files back and restart the database. After you have made the copies, delete the master database files that we found in step 6. If you now attempted to start the database by right clicking on the SQL Server icon in the systray and choosing "MSSQLServer-Start", nothing would happen. The master database is damaged, and you need the master database to even start SQL Server. Due to the bug mentioned in the Setup portion of this exercise, we need to do a little manual labor. Find the x86data directory on your installation CD and copy all files in this directory to a designated folder on your hard drive. The folder I copied the files into is C:masterrecover. As you probably already know, when you copy a file from CD to the hard drive, the file will be read only. The files must be made read-write for the rebuild master utility to work. Highlight all of the files and right click. The properties screen will pop up. Uncheck the "Read only" box in the attributes section. We are now going to rebuild the master database and then eventually bring back the backup that we created earlier in this exercise. Go to the directory that contains the rebuildm.exe application and run it. It will be in the Microsoft SQL Server80ToolsBinn directory. TATA CONSULTANCY SERVICES Page 26
  • 27. The Rebuild Master utility appears. Enter your server name and the directory on your hard drive where you copied all of your files to. Then click the "Rebuild" button. You will get notifications about copies occurring and about server configuration. If all goes well, you will eventually get the following prompt: For illustrative purposes, we are going to restart SQL Server. Right click on the SQL Server icon as shown in step 7, only this time select "MSSQLServer - Start". Start Enterprise Manager and browse the databases. Note that the "newdatabase" that we created earlier in this exercise is now gone. All of the system databases shown have been copied directly off of the installation CD (via the directory that we copied these CD files to). "newdatabase" that we created earlier isn't shown because the master database keeps track of all of the user created databases, and the master database is contains only the information from the new installation. Also note that all of the backup devices we created before are gone as well because we are dealing with a brand new master database as well as a new msdb database, which keeps track of backup devices, backups, and jobs among other things. We're going to have to restore master and msdb to get the newdatabase back and to get our backup devices back. Exit Enterprise Manager and query analyzer if they are open. Start up SQL Server in single user mode as shown below. The sqlservr.exe application should be located in the MSSQLbinn directory. Start the database using the -c and -m options. Minimize this DOS window to keep it out of the way, but don't close it. TATA CONSULTANCY SERVICES Page 27
  • 28. -c option shortens startup time -m option starts up the database in single user mode. The database must be in single user mode to restore the master database. For more information, on starting the database in single user mode, look in Books Online under "Startup Options" Start up Enterprise Manager. Right click on the master database, then choose "All Tasks" and "Restore Database". The Restore Database screen pops up. Click the "From Device" radio button and then click on the "Select Devices..." button. TATA CONSULTANCY SERVICES Page 28
  • 29. The "Choose Restore Devices" screen pops up. We're going to restore from disk, to do this, we need to find our file, click the "Add" button. TATA CONSULTANCY SERVICES Page 29
  • 30. The "Choose Restore Destination" screen is now shown. We can't choose a backup device because our database in its current form doesn't recognize any of our backup devices, and it won't until we restore the msdb database - which we will do later. For now, click the "File name:" radio button and click on the ellipses to search for our master backup device. Find the master backup device you created very early in the exercise and click the "OK" button. TATA CONSULTANCY SERVICES Page 30
  • 31. You'll now progress back through the screens we've already been on. Click "OK" on the "Choose Restore Destination" screen. Click "OK" on the "Choose Restore Devices" screen. TATA CONSULTANCY SERVICES Page 31
  • 32. Once we're back on the "Restore Database" screen, click on the "Options" tab. TATA CONSULTANCY SERVICES Page 32
  • 33. You're just viewing the files that are going to be restored. Note that these files will overwrite our existing data files, which is exactly what we want. Click the "OK" button. You'll see a restore progress screen. Once the restore is complete, you'll get the following notification - this is not an error message. The database has been successfully restored and now you are no longer connected in single user mode. You'll also receive a message indicating that your connection in Enterprise Manager has been broken. Just close completely out of Enterprise Manager to avoid the annoying error messages. TATA CONSULTANCY SERVICES Page 33
  • 34. Start up SQL Server by right clicking on the icon and selecting "MSSQLServer - Start" Go into Enterprise Manager and browse the databases. The newdatabase has once again returned. We never wiped out the data files for "newdatabase", but now we have restored our original master database which has all requisite information to load the master database. Your next step will be to restore the msdb database. The steps will be similar to the master database restore (steps 16-24) except you don't need to be in single user mode to restore the msdb database. After you restore the msdb database, restoring other databases on the server becomes much easier because the backup devices have been restored. If you go to restore model or northwind, the suggested restore files are presented directly to you, instead of having to try to find the .BAK file on disk. Rebuild Master failed with error -1: The other day I was trying to rebuild the master database for a SQL Server 2000 box. Everything was going well until the “Configuring Server” dialog popped up. The progress bar went across about 4 times and then an error message popped up. TATA CONSULTANCY SERVICES Page 34
  • 35. That’s weird, you have rebuilt the master database a few times before and you have never encountered errors like this one. You have to look for the error details and started with the cnfgsvr.out log file located in C:Program FilesMicrosoft SQL ServerMSSQLInstall By looking at the log file, I could confirm the error, but it didn’t help to explain as why the connections had failed. So I ran eventvwr. One of the system log error mentioned something about MSSQLSERVER service failed to start. TATA CONSULTANCY SERVICES Page 35
  • 36. At that point, I was still not sure what’d happened, so I then ran services.msc and tried to start the MSSQLSERVER service manually. The error message matched what I had seen in the event viewer. Path? What path? Suddenly as if stricken by lightening, I noticed “Path to executable:” had the short file names for the path. The question became obvious, what was MICROS~3? A quick look in the explorer revealed 5 long name folders starting with the word “Microsoft”. MICROS~3 happened to be “Microsoft Office” instead of “Microsoft SQL Server”. Now the cause of the issue had been identified, I needed a way to work around it. For what I was doing at the time, I could not just reinstall SQL Server, therefore I decided to move the “80” and “mssql” folders into “Microsoft Office”. TATA CONSULTANCY SERVICES Page 36
  • 37. What I had effectively done was making C:PROGRA~1MICROS~3MSSQLbinnsqlservr.exe a valid path. Then I reran rebuildm.exe and as expected, everything worked. Caution! Restoring msdb Database The msdb database stores all of our backup information and our job information. We're going to assume in this exercise that we lose the data and transaction log for the msdb database. Fortunately, we have a backup that we'll be able to restore. The msdb database restore is a typical database restore, except that you must make sure that SQL Server Agent is stopped during the restore. Likewise master db You will need to have a backup device already created In Enterprise Manager, back up the msdb database by right clicking on the msdb database and choosing "All Tasks", "Backup Database". The backup database screen appears. Choose "msdb" as the database, provide a id, and give the database a complete backup. Choose a destination device, and click the "OK" button. You will be notified that the backup operation completed successfully. TATA CONSULTANCY SERVICES Page 37
  • 38. Find out where the msdb data and transaction log files are. In Enterprise Manager, right click on the msdb database and choose "Properties". The properties menu appears. Click on the Data Files and Transaction Log Files tabs to find the file locations. TATA CONSULTANCY SERVICES Page 38
  • 39. Shut down SQL Server by going into Enterprise Manager, right clicking on the Server and choosing "Stop". Delete the files that we found in step 4 from the operating system. Restart SQL Server by right clicking on the server in Enterprise Manager (just like in step 5) and choosing "Stop". Although it is difficult to replicate in this example, make sure that the SQL Server Agent is stopped before we begin the restore process. You can't restore a database unless you have exclusive access, and in the case of the msdb database, SQL Server Agent would ruin the exclusive access. In Enterprise Manager, right click on the msdb database, choose "All Tasks", and "Restore Database". You will probably get multiple error messages letting you know that there is a problem with the database and it can't be opened. Just continue to click "OK" for each message. TATA CONSULTANCY SERVICES Page 39
  • 40. After the error messages, the Restore database screen appears. Click the "From Device" radio button, then click on the "Select Devices" button. The other defaults should be fine (We're restoring a complete database backup set). You are taken to a "Choose Restore Devices" screen. Make sure that the disk radio button is selected and click the "Add" button. We now choose a restore destination. We're going to click on the "Backup Device" radio button and select the same device that we backed our database to earlier in the exercise. Click the "OK" button. TATA CONSULTANCY SERVICES Page 40
  • 41. Just click the "OK" button when you are returned to the "Choose Restore Devices" screen. Notice that our Device name is now established. You are returned to the "Restore Database" screen. Just click the "OK" button and the database will be restored. TATA CONSULTANCY SERVICES Page 41
  • 42. We are notified that our restore process is complete and we're done. T-SQL Steps: Backup the database in Query Analyzer. While connected to the msdb database in Query Analyzer, find the path for the msdb data and transaction log files by using sp_helpfile (The entire path is truncated in the image). Shutdown the server from Query Analyzer. Delete the files from step 2 in the Operating system. Start up SQL Server in Enterprise Manager by right clicking on the server and choosing "Start". TATA CONSULTANCY SERVICES Page 42
  • 43. Although it is difficult to replicate in this example, make sure that the SQL Server Agent is stopped before we begin the restore process. You can't restore a database unless you have exclusive access, and in the case of the msdb database, SQL Server Agent would ruin the exclusive access. We need to get a file number for our RESTORE DATABASE statement. We run the RESTORE HEADERONLY statement while connected to the master database and discover that there is only one file in our backup device, and this is the backup set that we will need to restore. Restore the msdb database while still connected to the master database in Query Analyzer, and our restore process is complete. TATA CONSULTANCY SERVICES Page 43
  • 44. SQL Server 2000 Installation Back-Out Plan Pre-installation Checkup Considering the hardware factors on the stand alone server we have to repeat from Step 1 to Step 7 as the pre installation checkup. Un-installation SQL Server database engine Completing Pre-installation Checkup we shall ramble down to the street of un-installation if face some some unexpected error like “SQL Server 2000 Uninstall Option Does Not Remove All Files” then we have to check Microsoft support center site mentioned earlier Once you remove SQL Server executables from stand alone machine then there we would have benn left no choice but to move forward accepting next stage i.e. Re-installation of SQL Server. So you have to be very cautious before removing un-installation and during removal of Default or Named Instance. There must be proper back up of each data file (.mdf) and log file (.ldf) for each database (system and application both) running under SQL server database engine. If case of any discrepancy occurred (like Hardware unable to meet requirement or any other runtime error) if you have no choice but to abort the mission then perform step 10 in Re-installation of SQL Server and attach those database files after restarting sqlservr.exe service After attaching those file Run below command against each database here Northwind If there is no error message then everything is fine TATA CONSULTANCY SERVICES Page 44