• Company
  • Partners
  • Support
  • Contact
  • Downloads
  • Sales
  • Community
Home
  • Home
  • Forum
  • Articles
  • Ideas
  • Downloads
  • Home
  • Articles
  • Moving the ObserveIT data between SQL servers

Article

Moving the ObserveIT data between SQL servers

Created by: danielp 37 weeks ago
    • December 20
    • 2009
    • 8:28
    0

It is possible to move the ObserveIT data between one SQL server and another SQL server. This

is usually done when there is need to move the ObserveIT installation from a temporary SQL

server on which it ran for the POC/Pilot phase, onto a more powerful, production SQL server.

ObserveIT uses 2 databases for the stored data. The first database is called “ObserveIT”, and the

second is called “ObserveIT_Data”. When moving the ObserveIT data, you must move both

databases.

In order to move the ObserveIT data between one SQL server and another SQL server please

follow the steps in this document.

 

Detaching the ObserveIT databases on the old SQL server

On the old SQL server, open SQL Management Studio or SQL Query Analyzer (based on the

version of SQL you're running).

Under Query Analyzer choose “ObserveIT” as your database. Right-click the ObserveIT database

and select "Tasks" > “Detach”.

 

 

If ObserveIT is currently in use, you will be prompted about currently open connections. In order
to successfully detach the databases you can select the “Drop Connections” check-box. Click on
the “OK” button.

 

 

Do the same for the “ObserveIT_Data” database.

 

 

 

Copy the ObserveIT databases from the old SQL server to the new SQL server

You need to copy the files that are part of the ObserveIT databases from the old SQL server to
the new SQL server. By default, unless manually changed, the file location should be:

C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

The files that should be copied are:
• ObserveIT_Log.ldf
• ObserveIT_Data_Log.ldf
• ObserveIT_Data.mdf
• ObserveIT_Data_Data.mdf

Copy these files to the location of your choice on the new SQL server. Make sure you have
ample disk space on the target hard drive and that you plan accordingly for future database size
growth.

 

 

Attaching the ObserveIT databases on the new SQL server

On the new SQL server, open SQL Management Studio or SQL Query Analyzer (based on the
version of SQL you're running).
Under the SQL server name, right-click “Databases” and select "Attach”.

 

 

In the “Attach Databases” window click on the “Add” button.

 

 

In the “Locate Database Files” window, browse to the location where you’ve copied the
database files. Select the “ObserveIT_Data.mdf” file and click on the “OK” button twice.

 

 

Do the same for the “ObserveIT_Data” database. This time, select the
“ObserveIT_Data_Data.mdf” file and click on the “OK” button.

 

 

The result should be that both databases are listed under the “Databases” node.

 

 

Create an “ObserveITUser” login on the new SQL server

You need to create an “ObserveIT User” login on the new SQL server. To do so, on the new SQL
server, open SQL Management Studio or SQL Query Analyzer (based on the version of SQL
you're running).
Under the SQL server name, expand “Security”, then right-click “Logins” and select "New Login”.

 

In the “Login – New” window, enter the following user name: ObserveITUser
Click on the SQL Server Authentication radio button and enter a password for the user.
Remember this password; you will need it in the next step.
Un-check the “Enforce password policy” check-box.
Click on the “OK” button.

 

 

The new user should appear in the Logins node.

 

 

Edit the connection string in the Web.Config files on the ObserveIT
Application and Web Management Server(s)

Next, you need to edit the connection string key in the Web.Config files on both the ObserveIT
Application and Web Management Server(s). Note that in most cases, the ObserveIT Application
and Web Management server components are installed on the same server. However, some
clients chose to install them separately on different servers. In that case, the changes must be
applied to all the ObserveIT servers running both the ObserveIT Application and Web
Management server components.

By default, the files are located in the following folders:

C:\Program Files\ObserveIT\Web\ObserveIT\Web.Config

And

C:\Program Files\ObserveIT\Web\ObserveITApplicationServer\Web.Config

Edit these files by using a text editor such as Notepad.exe.

 

 

(Note that you might need to disable the “Hide extensions for known file types” in Windows
Explorer > Tools > Folder Options > View tab).

Locate the “<appSettings>” section in the Web.Config files.
In that section, locate the "ConnectionString" value (usually located on the 5th line).
On that line, locate the “server=SQLSRV-OLD;” setting.
Manually replace the servername with the name of your new SQL server. You can also use an IP
address. In this example, replace SQLSRV-OLD with the name of your new SQL server.

 

 

If you need to use a different instance or any other port than the default to connect to the new
SQL server, please use it in this format:

servername\instancename,port-number

Note that there are no spaces in the above line.

In that same section, locate the "User ID=ObserveITUser;Password={0}" value (usually located in
the 5th line).

Replace the “{0}” value (without the quotes) with the password you’ve configured for the
ObserveITUser.

Note that if you are concerned about security and would like this password not to appear in
clear text, you can perform the steps outlined in this Microsoft Online Knowledgebase article:

• How to transfer the logins and the passwords between instances of SQL Server 2005 and
SQL Server 2008 - http://support.microsoft.com/default.aspx/kb/918992

 

 

Save the file.

Repeat this change on Web.Config file on the Web Management server (where these settings
are usually located in the 8th line).

 

 

 

Associate the ObserveITUser Login with the internal database user

The final step would be to associate the ObserveITUser Login you’ve created in step #4 with the
internal database user that was created by the ObserveIT setup.

To do so, on the new SQL server, open SQL Management Studio or SQL Query Analyzer (based
on the version of SQL you're running).

Under Query Analyzer choose “ObserveIT” as your database. Right-click the ObserveIT database
and select "New Query".

 

 

In the new query pane, paste the following script:

      USE ObserveIT
      EXEC sp_change_users_login 'Update_One', 'ObserveITUser', 'ObserveITUser'

Click on the “Execute” button.

 

 

The script should run and a success message should be displayed.

To verify, expand the “ObserveIT” database > “Security” > “Users”. Open the properties page for
the ObserveITUser user, and check to see if it is associated to the ObserveITUser login name.
Click on the “OK” button.

 

 

Repeat the same task on the “ObserveIT_Data” database. Right-click the ObserveIT database
and select "New Query".

 

 

Under Query Analyzer choose “ObserveIT” as your database. Right-click the ObserveIT database
and select "New Query".

In the new query pane, paste the following script:

      USE ObserveIT_Data
      EXEC sp_change_users_login 'Update_One', 'ObserveITUser', 'ObserveITUser'

Click on the “Execute” button.

 

 

The script should run and a success message should be displayed.

This concludes the steps required to move the ObserveIT data between one SQL server and
another SQL server. ObserveIT should now function properly, using the new data’s location.

Troubleshooting

If, after performing the above steps, ObserveIT still cannot be used (i.e. the Web Console does
not allow you to login, or the Agents’ tray icon shows as gray with an X mark on it) please
double-check your settings and, if needed, repeat them in a proper manner. The most likely
cause of the error is:

• Improper editing of either one of the Web.Config files
o Wrong syntax of the new SQL server name/IP address
o Wrong syntax of the SQL instance
o Wrong SQL connection port
o Wrong username
o Wrong entry of the ObserveITUser new password

If all fails, please generate a screenshot of the error you’re receiving, and send it as a
GIF/JPEG/PNG attachment along with a proper description of the issue to the ObserveIT support
team at support@observeit-sys.com.

  • Login or register to post comments

More Articles

Configuring and Session Recording Create a Unified Outgoing VDI Gateway with Windows Server 2008 R2 and ObserveIT Creating security alerts of abnormal user actions on Windows servers using Microsoft System Center Operation Manager 2007 and ObserveIT Creating Virtual machine Images including the ObserveIT Agent Generate Reports About User Actions on Windows Servers Integrating ObserveIT with the New Windows Server 2008 Terminal Server Features Moving the ObserveIT data between SQL servers ObserveIT’s roadmap for the next 6 months Record Secure Remote Access SSL VPN Gateway Sessions Secure Remote Access SQL servers
Register | Login

Support Links

  • FAQ
  • Geting Started
  • Technical Documentation

Most Popular

  • a way to deploy the agents remotely 727 reads
  • I would like to get a Linux version 676 reads
  • Welcome to our new community! 673 reads
  • Please add SMTP port usage option 652 reads
  • Can we get AD group integration? 624 reads
  • Resellers in the US? 597 reads

Upcoming Events

  • ObserveIT Ver 5.0 - Demo Webinar
    • 26.01.10
    • 12:00
Contact tech support
  • Company
  • Partners
  • Support
  • Contact
  • Downloads
  • Sales
  • Community