Consultor Eletrônico



Kbase P181366: How to delete a database table and its contents from the command line (proenv)?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/27/2011
Status: Unverified

GOAL:

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

GOAL:

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

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x

FIX:

There are no utilities available which can delete a table and its contents from a database.

One alternative is to 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;

Note that the user connecting to the database needs to have DBA rights and permissions in the database.