EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 982

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
System and catalog stored procedures
964
You can use the
sa_check_commit
system procedure to check whether there
are any outstanding referential integrity violations, before attempting to
commit your changes.
The returned parameters indicate the name of a table containing a row that is
currently violating referential integrity, and the name of the corresponding
foreign key index.
The following set of commands can be executed from Interactive SQL. It
deletes rows from the department table in the sample database, in such a way
as to violate referential integrity. The call to sa_check_commit checks
which tables and keys have outstanding violations, and the rollback cancels
the change:
SET TEMPORARY OPTION WAIT_FOR_COMMIT=’ON’
go
DELETE FROM department
go
CREATE VARIABLE tname VARCHAR( 128 )
CREATE VARIABLE keyname VARCHAR( 128 )
go
CALL sa_check_commit( tname, keyname )
go
SELECT tname, keyname
go
ROLLBACK
go
sa_conn_info system procedure
Reports connection property information.
sa_conn_info ( [
connection-id
] )
None.
None
Returns a result set consisting of the following connection properties for the
supplied connection. If no connection-id is supplied, information for all
current connections to databases on the server is returned.
Number
Name
Userid
DBNumber
Examples
Function
Syntax
Permissions
Side effects
Description

Table of Contents

Related product manuals