PBSYC.SQL script

What it does

The PBSYC.SQL script contains SQL code that overwrites stored procedures that correspond to the same version of PowerBuilder in the Adaptive Server sybsystemprocs database and then re-creates them.

The PBSYC.SQL script uses the sybsystemprocs database to hold the PowerBuilder stored procedures. This database is created when you install Adaptive Server.

When to run it

Before you connect to an Adaptive Server database in PowerBuilder for the first time using the ASE or SYC DBMS identifier, you or your database administrator must run the PBSYC.SQL script once per database server into the sybsystemprocs database.

Run PBSYC.SQL if the server at your site will be accessed by anyone using the PowerBuilder or by deployment machines.

If you or your database administrator have already run the current version of PBSYC.SQL to install PowerBuilder stored procedures in the sybsystemprocs database on your server, you need not rerun the script to install the stored procedures again.

For instructions on running PBSYC.SQL, see “How to run the scripts”.

Stored procedures it creates

The PBSYC.SQL script creates the following PowerBuilder stored procedures in the Adaptive Server sybsystemprocs database. The procedures are listed in the order in which the script creates them.

PBSYC.SQL stored procedure

What it does

sp_pb125column

Lists the columns in a table.

sp_pb125pkcheck

Determines whether a table has a primary key.

sp_pb125fktable

Lists the tables that reference the current table.

sp_pb125procdesc

Retrieves a description of the argument list for a specified stored procedure.

sp_pb125proclist

Lists available stored procedures and extended stored procedures.

If the SystemProcs DBParm parameter is set to 1 or Yes (the default), sp_pb125proclist displays both system stored procedures and user-defined stored procedures. If SystemProcs is set to 0 or No, sp_pb125proclist displays only user-defined stored procedures.

sp_pb125text

Retrieves the text of a stored procedure from the SYSCOMMENTS table.

sp_pb125table

Retrieves information about all tables in a database, including those for which the current user has no permissions.

PBSYC.SQL contains the default version of sp_pb125table. If you want to replace the default version of sp_pb125table with a version that restricts the table list to those tables for which the user has SELECT permission, you can run the PBSYC2.SQL script, described in “PBSYC2.SQL script”.

sp_pb125index

Retrieves information about all indexes for a specified table.