Batch Mode
  
Batch Mode
SQL Admin in batch mode can be called from a script file. This is useful when a user wants to do an ODBC extract from a table in a database to a file, which is then subsequently loaded into the data warehouse.
Call SQL Admin with Parameters below.
Switch
Parameter
Function
Notes
/A
 
Interactive Auto flag
Should not be used if batch mode is required. Interactive use only.
/B
 
Batch mode flag
Set this flag to run in batch mode.
/X
 
Append to output file flag
Appends data to the specified output file. If not present then the file is created or over-written.
/Z
 
Output file in Unicode format flag
By default output to a file is in ASCII mode. Set this flag for UNICODE
/O
ODBC Source
Used to specify the ODBC source.
This source must be present on the system where SQL Admin is being run from.
/U
Username
The username for the ODBC source.
 
/P
Password
The password for the ODBC source
 
/F
File name
Output result file name
If specified SQL Admin will output the results to this file name
/D
Delimiter
The delimiter character(s) to be used to separate the columns in a row.
 
/M
Maxrows
Specifies the maximum number of rows to output.
If not specified then the maximum value of 999,999,999 is used.
/R
Replace
Replacement character
Delimiter characters found in the actual data will be replaced with this character(s) if specified.
/S
Sql command to run
The SQL command to be executed.
If multiple commands they smust be separated by a semi-colon and a space. E.g. “select * from a; select * from b”
/C
Sql script file to run
The name of a file containing the SQL Command(s) to run.
If multiple commands they should be separated by a semi-colon.
/V
Prefix string before each field
The pre-fix string
If desired a pre-fix string can be specified. This string is pre-pended to each column in the results.
/W
Postfix string after each field
The post-fix string
If desired a post-fix string can be specified. This string is appended to each column in the results.
/L
Log file to create
Log file name
If specified the log file will be created with the following string in it.
nnnn rows outputted
/T
Row terminator
Marks the end of each row