Show TOC Entering content frame

Procedure documentation Generating Table Scripts from the Command Line Locate the document in its SAP Library structure

Use

You use this procedure to generate scripts for a set of tables or all the tables from the command line by specifying the required command parameters.

Prerequisites

You must have:

·        A user ID with the access rights of the system administrator on Microsoft SQL Server and DBOwner on the IDES database. You must also know the Data Source Name (DSN) of the IDES database you want to connect to.

·        Read and write access to the registry. Set the user database login parameters in the registry.

·        A user ID and a password for the CRM server you want to connect to.

You must know the details of the CRM server you want to connect to.

This graphic is explained in the accompanying text

·         You can get the server details in the SAP Logon screen.

·         To generate scripts for a set of tables, create a .TXT or .LOG file that contains a list of table names.

Procedure

...

       1.      On the Taskbar, choose Start à Run.

The Run dialog box appears.

       2.      Enter cmd and choose OK.

The Command Prompt appears.

       3.      Enter the following command:

<Application Path>\ClientConsole.exe /TSG [ALL/-F <FileName>/-AFC] [ -MW <Server;Client;User;Password;Lang>] [-IDES <DSN;User;Pwd>] [E] [-LS <FileName>] [–HS] [–MWT] [–T] [IA/-ID/-IM <’DD/MM/YYYY’;’DD/MM/YYYY’>] [-ATMD <’DD/MM/YYYY’;’DD/MM/YYYY’>]

This graphic is explained in the accompanying text

The default application path is C:\Program Files\SAP\Mobile\Bin.

The following table explains the parameters of the command.

Parameter

Optional / Mandatory

Description

/TSG

Mandatory

Executes Table Script Generation.

ALL/-F <FileName>/-AFC

Mandatory

Enter:

To generate:

ALL

Scripts for all the tables in the CRM server.

-F <File Name>

Scripts for all the tables specified in the .TXT or .LOG file.

-AFC

Scripts for all the tables specified using the advance filter criteria.

-MW <Server;Client;User;Password;Lang>

Mandatory

Details required for connecting to the CRM server.

This graphic is explained in the accompanying text

You must have created a server entry by using the R3 – DCOM Connector.

Server

The name of the CRM server you want to connect to.

Client

The name of the client.

User

Your user ID to access the specified CRM server.

Password

Your password to access the specified CRM server.

This graphic is explained in the accompanying text

If you do not enter the password, Client Console considers blank as the password.

Lang

The language in which you want to connect to the CRM server.

This graphic is explained in the accompanying text

If you do not enter the language, messages are logged in English.

-IDES <DSN;User;Pwd>

Optional

Details required for connecting to the IDES database.

This graphic is explained in the accompanying text

If you do not enter these details, the default registry settings are used.

DSN

The name of the data source name mapped to the IDES database.

User

Your user ID to access the IDES database.

Pwd

Your  password to access the IDES database.

-E

Optional

Executes the generated scripts on the mobile client user (IDES) database.

-LS <FileName>

Optional

Logs the table or index scripts to the file you specify.

This graphic is explained in the accompanying text

You must specify either –E or –LS <Filename> option.

-HS

Optional

Generates Helper Scripts that create stored procedures in the mobile client.

-MWT

Optional

Generates middleware table scripts on the user database.

-T

Optional

Generates CDB table scripts on the user database.

-IA/-ID|-IM|<’DD/MM/YYYY’;’DD/MM/YYYY’>]

Optional

Enter:

To generate:

IA

All the mobile client index scripts.

ID

Only delta mobile client index scripts.

IM

All the mobile client index scripts created or modified between the specified dates.

-ATMD <’DD/MM/YYYY’;’DD/MM/YYYY’>

Optional

Specifies advance filter criteria for the modified date of the table(s).

Result

If you specify the –LS <Filename> option, the scripts are logged to the specified file. However, if you specify the –E option, the scripts are executed on the user database.

Example

Enter the following command to generate scripts for the tables listed in the TableList.txt file. The scripts that are executed are saved in the SuccessScripts.txt file.

C:\Program Files\SAP\Mobile\Bin\ClientConsole.exe /TSG -F C:\Temp\TableList.TXT -MW AEC;000;uid;pwd;en -IDES ides;uid;pwd –E -LS C:\Temp\SuccessScripts.TXT –HS -MWT

See also:

Generating Table Scripts

Leaving content frame