How to Start the SQL Server 2008 Script Wizard

Updated: December 1, 2010

Applies To: System Center Service Manager 2010 SP1

Use the following procedure as part of your disaster recovery preparation steps to generate a script to capture SQL Server logon and object level permissions. You need to perform this procedure on the computers hosting your Service Manager and data warehouse databases and on the computer hosting SQL Server Reporting Services (SSRS):

DWDataMart

DWRepository

DWStagingAndConfig

ServiceManager

ReportServer

To start the SQL Server Script wizard

Using an account with Administrator privileges, log on to the computer hosting the Service Manager or data warehouse database.

On the Windows desktop, click Start, point to Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.

In the Connect to Server dialog box, follow these steps:

In the Server Type list, select Database Engine.

In the Server Name list, select the server and the instance for your Server Manager database. For example, select computer\INSTANCE1.

In the Authentication list, select Windows Authentication, and then click Connect.

In the Object Explorer pane, expand Databases.

Right-click the database name, point to Tasks, and then click Generate Scripts. For this example, right-click ServiceManager, point to Tasks, and then click Generate Scripts.

In the Script Wizard dialog box, perform the following steps:

On the Welcome to the Generate SQL Server Scripts Wizard page, click Next.

On the Select Database page, select the database you are generating the script for. In this example, select ServiceManager, and then click Next.

On the Choose Script Options page, set all True/False entries to False. In the General area, set Script Logins and Script Object-Level Permissions to True, and then click Next.

On the Choose Object Types page, click Select All, and then click Next.

On the Choose Assemblies page, click Select All, and then click Next.

On the Choose Database Roles page, click Select All, and then click Next.

On the Choose Schemas page, click Select All, and then click Next.

On the Choose Stored Procedures page, click Select All, and then click Next.

On the Choose full text catalogs page, click Select All, and then click Next.

On the Output Option page, select Script to file, in the File name text box, enter a location and file name for the script (for example, type C:\Backup\ServiceManagerDatabaseScript.sql), and then click Next.

On the Script Wizard Summary page, click Finish.

On the Generate Script Progress page, make sure that Success is displayed, and then click Close.

Save the script file you just created on a separate physical computer, usually at the same location where you are saving your Service Manager encryption keys.

Run this same procedure on each of the three data warehouse databases and SSRS.

In the event you need to restore a database, use these scripts to restore permissions to the new server.

Did you find this information helpful? Please send your suggestions and comments about System Center Service Manager documentation to
scsmdocs@microsoft.com.