NexTec Blog Minimize
02

Executing SQL Server scripts using Dynamics SL DBUpdate

Dynamics SL has a utility called DBUpdate (Database Update). Generally this utility is used to initialize some system level important tables e.g. rptcontrol, messages, pvrec, etc. The initialization of these tables is one of the post-installation steps.

This utility can also be used to execute custom SQL scripts. Dynamics SL developers generally use this utility to run the custom SQL scripts to create new tables, indexes, stored procedures etc. in the application and system databases. By convention, these SQL scripts use the following file extensions depending upon the SQL commands in the script:

Script File Extension

SQL Command

.CRT

CREATE TABLE

.CRX

CREATE INDEX

.CRP

CREATE PROCEDURE

.CRU

(All other SQL commands)

 

To run a SQL script using DBUpdate, follow the steps mentioned below:

  1. Run DBUpdate. In SL 6.5 or earlier version, go to Utility-->DBUpdate. In SL 7.0, find DBUpdate under Administration menu.
  2. Select the script file (.CRT, .CRX., .CRP., .CRU).
  3. Choose the Application database where you want to execute this script. If you want to execute the script in the System Database, then write the following in the first line of the script :
    --SYSTEMTABLE
  4. Click the button 'Begin Processing'.

This is also a handy tool to run scripts against SL databases from the SL workstations where no SQL Server workstation components are installed.

Post Rating

Comments

Thursday, February 09, 2012 9:47 PM
We are running SL client on Windows XP SP3 and would like to upgrade the database to SQL Server 2008 from SQL Server 2005. Is this possible?
Friday, February 10, 2012 11:10 AM
What is your SL version?

Post Comment

Name (required)

Email (required)

Website

CAPTCHA image
Enter the code shown above in the box below

  
spacer
dummy