Salesforce

How to delete a database table and its contents from the command line (proenv)?

« Go Back

Information

 
TitleHow to delete a database table and its contents from the command line (proenv)?
URL NameP181366
Article Number000133209
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to delete a database table and its contents from the command line (PROENV)?
Can the database table schema and its content be deleted from the command line?  
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
There are no utilities available which can delete a table's schema and its data content from an OpenEdge database.
Workaround
Use a script with SQL commands to "drop" a table using the SQL Explorer tool:

proenv>   proserve sports2000 -S 7700
proenv>   sqlexp sports2000 -S 7700 -H localhost -user <username> -password <password> -infile dropcust.sql
 
"dropcust.sql" contains the 2 following lines: 
 
DROP TABLE pub.customer;
COMMIT WORK;

DROP TABLE, is like the DATA DICTIONARY Delete Table.

Both delete the records beforehand.

DROP TABLE doesn't use ABL TRIGGERS, you'd need java triggers instead.
For example if there's a DELETE trigger on checking that there are no associated outstanding parent/child records to the table-record being deleted, that won't happen with DROP TABLE.

The user connecting to the database needs to have DBA rights and permissions in the database.
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:27 AM

Powered by