How to rebuild the SQL database schema while perserving existing data

book

Article ID: 178380

calendar_today

Updated On:

Products

Deployment Solution

Issue/Introduction

 

Resolution

Question
 

How to rebuild the SQL database schema while perserving existing data. This can sometimes be necessary when corruption has been noticed or Windows event logs indicate that tables or stored proceedures cannot be found. The goal is to rebuild the underlying database schema and data format without altering existing data.

 

NOTE: If corruption of any kind has been take place to the database schema, data may also have been corrupted or lost. Always rely on regular backups of SQL databases to keep from loosing data for any reason.

Answer
 

To manually update the Deployment Server database schema, perform the following steps while on the Deployment Server:

  1. Stop all Altiris services on the Deployment Server
  2. Run server.exe from the DSSetup folder. Do not go through the installer but execute the server.exe application so it will extract the files. You can then minimize the installation window without proceeding further.
  3. While server.exe is open, open a command window and browse to %temp% by typing "cd %temp%".
  4. Look for the apt# folder (where # is a number, usually 0 or 1).
  5. Open the apt# folder.
  6. Run the following without quotes: "DBInstaller.exe -E -ud eXpress -i update.ini". You should then see the database schema update one section at a time until completed. After completion, close all windows including the server.exe window.
  7.