sql server installation post checks

8
How to check that SQL Server 2008 has installed correctly Applies To SQL Server 2008 Introduction Here are a short number of post-installation checks which are useful to perform after re-booting your new SQL Server. Checks Check 1: Has the SQL Server Service Started? Check SQL Server 2008 has started. Check 2: Does Management Studio Work? Check Management Studio works by firing it up. Click on NO when you see this dialog box:

Upload: wasimss

Post on 05-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 1/8

How to check that SQL Server 2008 has installed correctly

Applies ToSQL Server 2008

Introduction

Here are a short number of post-installation checks which are useful to perform afterre-booting your new SQL Server.

Checks

Check 1: Has the SQL Server Service Started?Check SQL Server 2008 has started.

Check 2: Does Management Studio Work?Check Management Studio works by firing it up.

Click on NO when you see this dialog box:

Page 2: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 2/8

 Check 3: Can you run a basic query against the new SQL Server?

Check SQL Server works by running a simple query from Management Studio:

Enter the query shown below and hit F5 to run it:

Page 3: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 3/8

 

Check 4: Is SQL Server Agent Running?

Check SQL Server Agent is running for scheduled jobs. There should be a greenarrow next to the SQL Server Agent database symbol (it’s small, you might have to look hard):

Or

Just run the below query in query window. It will show the status of SQL Server Agent.

EXEC master.sys.xp_servicecontrol 'QUERYSTATE','SQLSERVERAGENT' 

Page 4: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 4/8

 Check 5: Can SQL Server be seen from the Network?

Check that the new SQL Server can be seen from another SQL Server on the sameDomain by running isql –L (or osql –L or SQLCMD -L):

If you can’t see the new SQL Server in this list, check that the SQL Server Browserservice is started on the machine where you have just installed SQL Server.

Check 6: Has the TCP/IP network protocol library been enabled on theServer?If the browser service is started but you still cannot connect to the server, click onStart ->Programs -> SQL Server 2008 -> SQL Server Configuration Manager (on the server where SQL Server’s just been installed) 

The SQL Server Configuration Manager window opens.Click on the SQL Server Network Configuration node and expand it.In the example below, we have MSSQLSERVER (a base instance of SQL Server), andSQLEXPRESS showing as installed.If in doubt, click on Protocols for MSSQLSERVER . 

Page 5: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 5/8

 In the above screenshot, the TCP/IP network protocol library is disabled. We need toEnable it in order that remote servers can talk to the newly installed SQL Server.

A word of explanation :In most installations, Named Pipes can be ignored,unless there is a requirement for it. In virtually all environments, VIA can alsobe ignored as this protocol requires a special network card. Shared memory isthe “local” protocol that SQL Server uses when talking to a client application on the same server as itself, for example when SQL Server ManagementStudio connects to it. It is usually best to leave this enabled.

You will need the TCP/IP protocol enabled if you need to connect to your new SQLServer from a remote client or another server via TCP/IP, which is what mostnetworks use.If it shows as DISABLED (above), double click on the TCP/IP protocol line, andthe following window will appear:

Page 6: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 6/8

 Ensure that Enabled is set to Yes, and click on OK.The following warning will appear:

Click on OK, and you will be returned to the Configuration Manager window, whereTCP/IP will now be shown as enabled:

Page 7: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 7/8

 Go back to the Services applet, and re-start the MSSQLSERVER service so that theTCP/IP protocol can be used to connect to your new SQL Server.Then try to connect to it again from a remote machine.If you have experienced problems with the previous connectivity tests, you shouldnow be able to repeat at least some of them successfully. 

Check 7: Has the datafile ,log file and backup directory are at proper location?

declare @SmoDefaultFile nvarchar(512)exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\\Microsoft SQL Server\<name>\MSSQLServer', N'DefaultData', @SmoDefaultFile OUTPUT

declare @SmoDefaultLog nvarchar(512)exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\\Microsoft SQL Server\<name>\MSSQLServer', N'DefaultLog', @SmoDefaultLog OUTPUT

declare @SmoBackupDirectory nvarchar(512)exec master.dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\\Microsoft SQL Server\<name>\MSSQLServer', N'BackupDirectory', @SmoBackupDirectory OUTPUT

SELECT ISNULL(@SmoDefaultFile,N'') AS [DefaultFile]

SELECT ISNULL(@SmoDefaultLog,N'') AS [DefaultLog]SELECT ISNULL(@SmoBackupDirectory,N'') AS [BackupDirectory]

When the SQL Server is the default instance on server then <name> isMSSQL10.MSQLSERVER.

Page 8: SQL Server Installation Post Checks

7/31/2019 SQL Server Installation Post Checks

http://slidepdf.com/reader/full/sql-server-installation-post-checks 8/8

 Check 8: Under which Account the SQL services running?

(For default SQL Server instance)

DECLARE @ServiceAccount varchar(100)EXECUTE master.dbo.xp_instance_regreadN'HKEY_LOCAL_MACHINE',N'SYSTEM\CurrentControlSet\Services\MSSQLSERVER',N'ObjectName',@ServiceAccount OUTPUT,N'no_output'SELECT @ServiceAccount as SQLServer_ServiceAccount

DECLARE @ServiceAgentAccount varchar(100)EXECUTE master.dbo.xp_instance_regreadN'HKEY_LOCAL_MACHINE',N'SYSTEM\CurrentControlSet\Services\SQLSERVERAGENT',N'ObjectName',@ServiceAgentAccount OUTPUT,

N'no_output'SELECT @ServiceAgentAccount as SQLAgent_ServiceAccount

Comments

These are the basic checklist useful to be sure that the installation is basically sound and aconnection can be made to the SQL Server before handling it over to someone else.