Delete SQL Package (DLTSQLPKG) command

You can use the Delete SQL Package (DLTSQLPKG) command

to delete one or more SQL packages. You must enter the DLTSQLPKG command on the AS/400 system where the SQL package being deleted is located.




Job: B,I Pgm: B,I REXX: B,I Exec
>>-DLTSQLPKG---------------------------------------------------->
 
              .-*LIBL/--------.
>----SQLPKG(--+---------------+---+-SQL-package-name----------+---)->
              +-*CURLIB/------+   '-generic*-SQL-package name-'
              +-*USRLIBL/-----+
              +-*ALL/---------+
              +-*ALLUSR/------+
              '-library-name/-'
 
>--------------------------------------------------------------><
 

SQLPKG
Specifies the qualified name of the SQL package being deleted. A specific or generic SQL package name can be specified.

The possible library values are:

*LIBL: All libraries in the user and system portions of the job's library list are searched.
*CURLIB: The current library is searched. If no library is specified as the current library for the job, the QGPL library is used.
*USRLIBL: Only the libraries listed in the user portion of the library list are searched.
*ALL: All libraries in the system, including QSYS, are searched.
*ALLUSR: All nonsystem libraries, including all user-defined libraries and the QGPL library, not just those in the job's library list are searched. Libraries whose names start with the letter Q, other than QGPL, are not searched.
library-name: Specifies the name of the library to be searched.

SQL-package-name: Specifies the name of the SQL package being deleted.

generic*-SQL-package-name: Specifies the generic name of the SQL package to be deleted. A generic name is a character string of one or more characters followed by an asterisk (*); for example, ABC*. If a generic name is specified, all SQL packages with names that begin with the generic name, and for which the user has authority, are deleted. If an asterisk is not included with the generic (prefix) name, the system assumes it to be the complete SQL package name.

You must have *OBJEXIST authority for the SQL package and at least *EXECUTE authority for the collection where it is located.

There are also several SQL methods to drop packages:

The following command deletes the SQL package PARTS1 in the SPIFFY collection:

DLTSQLPKG  SQLPKG(SPIFFY/PARTS1)

To delete an SQL package on a remote AS/400 system, use the Submit Remote Command (SBMRMTCMD) command to run the DLTSQLPKG command on the remote system. See Submit Remote Command (SBMRMTCMD) command for how to use the SBMRMTCMD command. You can also use display station pass-through to sign on the remote system to delete the SQL package. If the remote system is not an AS/400 system, pass through to that system using a remote work station program and then submit the delete SQL package command local to that system.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]