Was this helpful?
delobj Command--Delete Objects from Database
The delobj command deletes the specified object from the database. You can use this command to delete:
A named object
A list of objects that you specify on the command line
All objects that match a wildcard specification
Several objects whose names are listed in a file
If you use the -all option, you can use only those parameters and flags specified in the alternative syntax for -all. Using any other parameters results in an error.
If you use the -wildcard flag, you can include the SQL wildcard characters, underscore (_) and percent sign (%), in the objectname to specify pattern matching. To specify an explicit underscore or percent sign in an object name when the -wildcard flag is present, precede the character with a backslash (\) to dereference it. You can also use brackets ([ ]) to specify a pattern match.
Use the -include filename option to specify an ASCII file you have previously created, which contains the names of objects to be deleted. This file can contain a static list of objects, or it can contain object names generated as output from a select statement that specifies date, value, or other criteria to determine which objects should be included in the list.
The file must adhere to the following format rules:
Lines must be terminated by ASCII CR, LF, or FF characters.
Line length must be 256 bytes or less; exceeding this limit will produce unpredictable results.
A line can contain any combination of object names, white space (tabs and spaces), and comment text.
Object names must be delimited by white space or comments.
Comment text must be introduced by a number sign (#) and continue to the end of the line. Nested comments and comments that span multiple lines are disallowed.
The delobj command has the following format:
delobj dbname|vnode::dbname[/server_class]
[-report|-form|-joindef|-graph|-application|-qbfname] {objname}...
[-wildcard] [-silent] [-include filename] [-uusername] [-Ggroupid]
or
delobj -all [-silent] [-uusername] [-Ggroupid]
objname
Specifies one or more object names of the specified type.
An object name can contain SQL wildcard characters (%, _, [  ]), with the backslash (\) as the escape character. For details, see the pattern matching description in the SQL Reference Guide.
-all
Specifies that all objects owned by the effective user are to be deleted.
-silent
Runs in silent mode, suppressing status messages.
-wildcard
Expands wildcards. The default is not to expand wildcards.
-include filename
Specifies the name of an ASCII file that contains object names. This parameter is an alternative to listing multiple objname parameters on the command line.
The file can consist of one or more ASCII lines with the following format characteristics:
Each line can be up to 256 bytes (not characters) in length. Longer lines may cause errors.
A line can contain a combination of object names, comment, and white space (blanks and tabs).
A comment begins with the character # and continues to the end of the line. Each line terminates with an ASCII carriage return (CR), line feed (LF), or form feed (FF) character.
Last modified date: 08/28/2024