HP Systems Insight Manager User Manual

Page 525

Advertising
background image

Description

Directory of file

Directory of configuration files

<SIM>/config/

Shared OpenSSL certificate directory

C:/hp/sslshare/

Audit file

<SIM>/logs/mx.log

Program updates (required if HP SIM is to be reinstalled)

<SIM>/patch

Certificate used by the Command Line Interface (CLI)

<SIM>/bin/servercert.pem

CLI configuration file

<SIM>/bin/cliclientconfig.cfg

(if existing)

<SIM>/installpsp

(if existing)

<SIM>/swmaint

(optional) Contains job result output

<SIM>/output

3.

Paste the following TSQL script in Notepad and save it to a file called myRestore.sql. This code is
an example of how to use the various stored procedures with MSDE to perform a restore, creates a
backup job, and calls sp_start_job to run the job. Depending on your actual environment, some
functions such as changing the database name, server name, and so on, might require some code
modifications.

--This TSQL script creates a restore job and calls sp_start_job to

run the job.

--Create job.

--You may specify an e-mail address, commented below, and/or

pager, etc.

--For more details on this option or others, reference SQL Books

Online.

USE msdb

EXEC sp_add_job @job_name = 'mydbRestoreJob',

@enabled = 1,

@description = 'mydbRestoreJob',

@owner_login_name = 'sa',

@notify_level_eventlog = 2,

@notify_level_email = 2,

@notify_level_netsend =2,

@notify_level_page = 2

-- @notify_email_operator_name = 'email name'

go

-- Add job step (restore data).

USE msdb

EXEC sp_add_jobstep @job_name ='mydbRestoreJob',

@step_name = 'Restore INSIGHT Data',

@subsystem = 'TSQL',

@command = 'RESTORE DATABASE "Insight_v*" TO DISK

=''c:\INSIGHT.dat_bak''',

@on_success_action = 3,

@retry_attempts = 5,

@retry_interval = 5

go

Backing up and restoring the database 525

Advertising