- System administrative tasks can be performed by using isql or sap control center (graphics tool).
- You can save the Transact-SQL statements you use to create or modify user databases and database objects.
- The easiest way to do this is to create or copy the statements to an ASCII-formatted file.
- The syntax for using isql with an ASCII-formatted file is the following, where filename is the full path and file name of the file that contains Transact-SQL statements:
Note: On UNIX and other platforms, use the “less than” symbol (<) to redirect the file.
System Tables:
- The master database contains system tables that keep track of information about SAP ASE.In addition, each database (including the master database) contains system tables that keep track of information that is specific to that database.
- All the SAP ASE-supplied tables in the master database (the SAP ASE controlling database) are considered system tables. Each user database is created with a subset of these system tables. The system tables may also be called the data dictionary or the system catalogs.
- A master database and its tables are automatically created when SAP ASE is installed. The system tables in a user database are created when the create database command is issued. The names of all system tables start with “sys”. You cannot create tables in user databases that have the same names as system tables. See Reference Manual: Tables for detailed descriptions of system tables and their columns.
Stored procedures or System procedures:
SAP ASE supplies stored procedures (called system procedures), many of which provide shortcuts for querying the system tables.
These system procedures provide information from the system tables:
Updating the system tables:Under ordinary circumstances, you need not perform direct data modifications to system tables.
Update system tables only when you are instructed to do so bySAP TechnicalSupport, by an instruction in the Error Messaging and Troubleshooting Guide, or asrequired by some system administration tasks.
Before you update system tables, you must issue a sp_configure command that enables system table updates
- Modify system tables only inside a transaction. Issue a begin transaction command before you issue the data modification command.
- Verify that only the rows you wanted to be changed have been affected by the command and that the data has been changed correctly.
- If the command was incorrect, issue a rollback transaction command. If the command was correct, issue a commit transaction command.
- the parameter value for a system procedure must enclose it in single or double quotes.
- System procedures can be invoked during a session using either chained or unchained transaction mode. Chained mode implicitly begins a transaction before any data retrieval or modification statement. Unchained mode requires explicit begin transaction statements paired with commit transaction or rollback transaction statements to complete the transaction.
- You cannot execute the system procedures that modify data in system tables in the master database from within a transaction.
- If no transaction is active when you execute a system procedure, SAP ASE turns off chained mode and sets transaction isolation level 1 for the duration of the procedure.
Note:
All system procedures report a return status. For example, the following means that the
procedure executed successfully:
return status = 0
If the system procedures do not execute successfully, the return status is a number other than
0.
- xp_cmdshell, which executes an operating system command on the system that is running SAP ASE.
No comments:
Post a Comment