HP

HP Systems Insight Manager Technical Reference Guide

English
  Administering Systems and Events  |  Backing Up and Restoring the Database  |  Windows   

Windows

»Table of Contents
»Index
»Notices
»Introduction
»Product Overview
»Getting Started
»Discovery and Identification
»Users and Authorizations
»Networking and Security
»Monitoring Systems, Clusters, and Events
»Storage Integration
»Managing with Tasks
»Tools that Extend Management
»Partner Applications
»Reporting
»Administering Systems and Events
»Events
»Examples of Event Tasks
»Status Polling
»WMI Mapper Proxy
»Protocols
»Data Collection
»System Properties
»Version Control Repository
»PMP Administrative Options
»Setting Up Managed Systems
»Managing SSH Keys
»Backing Up and Restoring the Database
»HP-UX/Linux
Windows
»Configuring SSH Bypass Properties
»Audit Log
»Troubleshooting
»Reference Information
»Printable version
»Glossary
»Using Help
» Backing Up an SQL Server Database
» Restoring the SQL Server Database from a Backup
» Backing Up an MSDE Database
» Backing Up HP SIM Using MSDE Command Line Features
» Related Procedure
» Related Topic

A Microsoft SQL Server database (MSDE) is used by HP Systems Insight Manager (HP SIM) to store all collected information about the systems on your network as well as all configuration options. Always back up your database using an appropriate backup schedule. In the event of a catastrophic database problem, this backup can be restored to return HP SIM to operation.

If you must restore your database, stop the HP SIM Service from the Services applet before doing the restore. After the restore is complete, restart the service.

If you must reinstall HP SIM but want to preserve the information in your database, you must have a backup of your database. After reinstalling HP SIM, you can restore your previous database backup into the database created during the HP SIM installation.

Backing Up an SQL Server Database

Microsoft SQL Enterprise Manager has built in utilities to permit the database to be backed up. The backups can be automated if desired. HP also recommends viewing the help provided directly with SQL Enterprise Manager to gain a complete understanding of this procedure.

To backup the HP SIM database using Microsoft SQL Enterprise Manager:

  1. Sign out of HP SIM, and stop the HP SIM Service.

  2. Back up the configuration subdirectory config where HP SIM is installed.

    Note: Use any tools that you are familiar with to back up a directory for this process. For example, you could use Windows Explorer to make a copy of the HP SIM installation directory.

  3. Open Microsoft SQL Enterprise Manager using the Start menu from a Windows console.

  4. In the tree displayed on the left side, expand the Microsoft SQL Servers branch and SQL server group. If the server where the HP SIM database is located is not listed, add it by selecting New SQL Server Registration from the right-click menu.

  5. Select the server where the HP SIM database is located. From the Tools menu at the top, select Backup database. In the dialog that appears, select the database named Insight_v*, and be sure that Database-complete is selected as the backup option.

  6. Click [Add] in the destination, and select a location to backup the database. For example, a disk or tape.

  7. Click [OK] to initiate the backup.

Restoring the SQL Server Database from a Backup

  1. Open Microsoft SQL Enterprise Manager using the Start menu from a Windows console.

  2. In the tree displayed on the left side, expand the Microsoft SQL Servers branch and SQL server group. If the server where the HP SIM database is located is not listed, add it by selecting New SQL Server Registration from the right-click menu.

  3. Select the server where the HP SIM database is located. From the right-click menu at the top, select All TasksImport Data.

    The DTS Import/Export Wizard launches. Click [Next].

  4. In the Server field, select the server where your exported database exists. Select Windows Only as the mode of authentication.

  5. Select the name of the restored database from the Database dropdown list. For example, Insight_v*.

  6. Click [Next].

  7. Select your HP SIM system from the Server dropdown list. Select Windows Only as the mode of authentication. Select Insight_v* from the Database dropdown list. Click [Next].

  8. Select Copy table(s) and view(s) from the source database. Click [Next].

  9. Select Select All buttons in the Select Source Tables and Views screen. Click [Next].

  10. Select Run Immediately. Click [Next].

  11. Click [Finish].

  12. Click [Done].

  13. Restore the configuration subdirectory config where HP SIM is installed.

  14. Start the HP SIM service.

Backing Up an MSDE Database

With MSDE, you can back up both data files and transaction logs. In the event of a failure, the most recent database backup is restored. When the restore is complete, you can apply the changes contained in all of the subsequent transaction log files, and the database is brought back to the state it existed when the last nightly transaction log was backed up.

If you have Microsoft Access 2000, you can use the BACKUP command in the Database Utilities menu of an Access project to back up an MSDE database. If SQL Client Tools are installed, you can use SQL Enterprise Manager to back up an MSDE database.

The SQL Client Tools and Access 2000 are not part of the Microsoft Data Engine (MSDE) install. Therefore, if you only have MSDE installed, you do not have the options associated with these programs. To back up an MSDE database, you can use the TSQL BACKUP DATABASE command and execute with Osql.exe (command line Query tool). This procedure applies to Microsoft Data Engine (MSDE) 1.0. For information on all of the stored procedures in the following sections, refer to the SQL Books Online.

Backing Up HP SIM Using MSDE Command Line Features

  1. Sign out of HP SIM, and stop the HP SIM service.

  2. Back up the configuration subdirectory config where HP SIM is installed.

    Note: Use any tools that you are familiar with to back up a directory for this process. For example, you could use Windows Explorer to make a copy of the HP SIM installation directory.

  3. The following code is an example of how to use the various stored procedures with MSDE to perform a backup. This code does not back up your mission-critical database as is and might require some modification to run in your environment, such as changing your database name, server name, and so forth. Paste the following TSQL script in Notepad, and save it to a file called myBackup.sql:

    						
    --This TSQL script creates a backup 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 = 'mydbBackupJob',
       @enabled = 1,
       @description = 'mydbBackupJob',
       @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 (backup data).
    
    USE msdb
       EXEC sp_add_jobstep @job_name ='mydbBackupJob',
       @step_name = 'Backup INSIGHT Data',
       @subsystem = 'TSQL',
       @command = 'BACKUP DATABASE "Insight_v*" TO DISK 
       =''c:\INSIGHT.dat_bak''',
       @on_success_action = 3,
       @retry_attempts = 5,
       @retry_interval = 5
       
    go
    
    -- Add job step (backup log).
    
    USE msdb
       EXEC sp_add_jobstep 
       @job_name ='mydbBackupJob',
       @step_name = 'Backup INSIGHT Log',
       @subsystem = 'TSQL',
       @command =<command> 'BACKUP LOG "Insight_v*" TO DISK' = 
       'c:\INSIGHT.log_bak''',
       @on_success_action = 1,
       @retry_attempts = 5,
       @retry_interval = 5
       
    go
    
    --Add the target servers.
    
    USE msdb
       EXEC sp_add_jobserver @job_name = 'mydbBackupJob', 
       @server_name = N'(local)'
       
    -- Run job. Starts the job immediately.
    
    USE msdb
       EXEC sp_start_job @job_name ='mydbBackupJob' 
       
    -- The file has to be copied under /mssql/binn folder
    
    -- The command to execute it is OSQL -Smysqlserver
    
    -U sa -P password if any -i mybackup.sql -n
    					

Related Procedure

» Backing Up and Restoring the Database - HP-UX/Linux

Related Topic

» Administering Systems and Events - Backing Up and Restoring the Database