ABASQL is basically a command-line interface to the AbaPerls file-loading process.
Contents:
Command-Line Syntax
Output from ABASQL
abasql {-database db [-Server server] [-User user] [-Password pwd] | -noexec}
[-get] [-VSS VSS-path [-nouse_disk]] [-label version] [-log log-file]
[-save [save-file]] [-subsystem subsys] [-nocreate] [-force]
[-charset CP] [-[no]crypt] [-[no]subscriber] [-site site-id:s]
[-[no]Adefaults] [-[no]Anulls] [-[no]Apadding] [-[no]Aquoted]
[-[no]quoterepl]
[-Macro ¯o=value [...]] [-undef ¯o [...]]
file [file2 ...]
| Database switches | |
|---|---|
|
Which database to load the file(s) in. is a mandatory switch.
|
|
Which SQL Server. The default is the server on the local machine. The
environment variable
ABAPERLS_CTIMEOUT determines how log to wait for a connection. The default is 5 seconds. Note that if you specify the server instance by port number, you must enclose the server specifcation in quotes, for instance -S "127.0.0.1,2093". |
|
Which login and password to use with SQL authentication. If you leave out
both username and password, AbaPerls will use Windows authentication. If you
specify -passwordNo matter if you use SQL authentication or Windows authentication, the login you use must map to a database user with dbo as the default schema, or AbaPerls will not let you proceed. Obviously, the user needs permission to perform all actions implied by AbaPerls and the file you load. |
|
Password for SQL Server. If you do not specify , ABASQL
will use Windows authentication and log in with your Windows user, which should
have been granted access to the database. The user must have dbo as
the default schema.. If you want to run as an SQL user with a blank password, you must specify: .
|
|
Specifies that ABASQL is to get the files and run them through
Preppis to
get all required include files but not proceed with further steps in the
AbaPerls file-loading process. You typically use -noexec-getWhen you specify , you cannot
specify , ,
or
.
|
| SourceSafe | |
|
An SS-path for the SQL project where to
find file (and any files it may include through
Preppis directives). Note
that, by default, ABASQL will try to read from disk
(steps 1 and 2 in the AbaPerls file-lookup order)
even if you specify . Specify to prevent this.If the database is labelled as a production database, ABASQL will require you to load the file from SourceSafe, if the existing version of the file also was loaded from SourceSafe. |
| Version number, date or label in SourceSafe that ABASQL is to read from. |
| Specifies that no files are to be read from disk, but that ABASQL should retrieve all files from SourceSafe. (I.e. only step 3 in the AbaPerls file-lookup order.) |
|
With , ABASQL creates
a directory with the same name as the subsystem specified with the option, and in that directory it places the files it
extraces from SourceSafe an AbaPerls SQL directory structure.
ABASQL also writes information about the extracted files to together with
as the first step when installing a file at customer
site
implies -nouse_disk and -use_disk, you must also specify
-VSS and . |
| Miscellaneous | |
| Logs the output from ABASQL into the given file. |
|
The generated SQL code is to be saved in a file. If you specify
without save_file, ABASQL will save the generated code in
INSTALL.SQL. Use this switch if
you want to know exactly what ABASQL sends to SQL server.
|
|
Specifies that the file(s) belong to the subsystem subsys, and that the
configuration options saved for
subsys are to apply. If you specify a subsystem
that is not present in the database, ABASQL will not load the file.
If you do not specify , ABASQL
will retain the subsystem stored in database for the file, but it will not
apply the configuration options for that subsystem. For new files, ABASQL
will leave subsystem unset in this case.Files that are not connected to any
subsystem are reported in their own section by
ap_sob_report_suspects_sp.
is mandatory for files types where
the same file name could appear in several subsystems.: is also mandatory when you specify
and when ABASQL has found file
information from |
| Specifies that ABASQL should not create the objects in the file(s), but only delete them. ABASQL can only delete the objects handled by Pre-SQL Analysis. |
|
Specifies that if there is a conflict between the configuration options saved in the
database and the configuration options on the command-line, the command-line takes
precedence. If you do not specify , and
there is a conflict, ABASQL will abort
with an error message, and no file will be loaded.
You can also use to to bypass some checks
performed by the Aba-Perls file-loading process.Only use when you really need to override
the configuration saved in the database or bypass checks. |
| Configuration options | |
|
These switches are configuration options.
The setting of a configuration option is primarily taken from the database
according to the precedence rules for
configuration-options. If
the the database defines a setting for an option and you specify a different
setting, you must use to override. |
| Argument | |
file1 file2... | The file(s) that are to be sent to SQL Server. ABASQL uses the AbaPerls file-lookup order to find the files. |
Note that if you load a file that includes a $REQUIRE macro, ABASQL will only open that file to check that the $USEDBY directive is present, but ABASQL will not include the required file in what it passes to SQL Server.
ABASQL echoes the command options that you have specified. All error messages and warnings from Preppis, Pre-SQL Analysis and SQL Server are printed with line numbers related to the file the message relates to. That is, a message can relate to file1 (or file2, file3 etc), but the message could also relate to a file included by file1. Note that even though AbaPerls may add lines on its own to the code you pass it, the line numbers always relate the original file(s). We need to add one disclaimer: for SQL messages, ABASQL relies on that SQL Server reports the line number correctly. Alas, this is not always the case.
If ABASQL finds the file
Messages generated by AbaPerls itself always have message number 0; SQL messages usually have message numbers > 0. The severity level of the message is 11 or higher for errors, 10 for warnings and 9 for style remarks.
If you invoked ABASQL through TextPad, and have configured the TextPad tool properly, you can double-click on the message and TextPad will take you to this line. See further Using ABASQL with TextPad.
ABASQL does not really expect the file to produce any result sets, but would they appear, ABASQL will print these in a fairly primitive manner.
ABASQL prints also a final message, related to your degree of success:
-noexec .