Get the App
SLTechnology News&Howtos  ›  Database  › 

How to use PLSQL to export database storage table structure information

Shulou Source: shulou.com Published: 2022-06-01 05:53:40 09月10日 Update

Introduction to how to use PLSQL to export the table structure, do not log in to the data inventory, directly use the plsql tool to export the table structure of the specified table? Now I will introduce how to export. 1: how to Tools after plsql

-- > Exports User Ojbects

-- > > Select the table,squence,view,type,function,procedure,trigger to be exported.

-- > > Select User

-- > > check Include storege or uncheck (include storege means tablespace)

-- > > Select the directory where the exported files are stored

-- > > Export button export

2: let's explain the difference between Include Storage check and uncheck.

1) uncheck the exported sql as follows:

Create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL (product VARCHAR2 (32 CHAR) not null, environment VARCHAR2 (32 CHAR) not null, server VARCHAR2 (32 CHAR) not null, resource_path VARCHAR2 (256 CHAR) not null, action VARCHAR2 (4 CHAR) not null, username VARCHAR2 (32 CHAR) not null, usergroup VARCHAR2 (32 CHAR) not null, address VARCHAR2 (32 CHAR) not null, timestamp DATE default TO_DATE 'YY-MM-DD HH24:MI:SS') not null, status VARCHAR2 (16 CHAR), data NCLOB)

2) after checking, the exported sql is as follows, plus the tablespace to which table belongs and the available tablespace restrictions

Create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL (product VARCHAR2 (32 CHAR) not null, environment VARCHAR2 (32 CHAR) not null, server VARCHAR2 (32 CHAR) not null, resource_path VARCHAR2 (256 CHAR) not null, action VARCHAR2 (4 CHAR) not null, username VARCHAR2 (32 CHAR) not null, usergroup VARCHAR2 (32 CHAR) not null, address VARCHAR2 (32 CHAR) not null, timestamp DATE default TO_DATE 'YY-MM-DD HH24:MI:SS') not null, status VARCHAR2 (16 CHAR), data NCLOB) tablespace OPENJAW_DATA pctfree 10 initrans 1 maxtrans 255 3: let's explain the difference between Include User check and uncheck.

1) uncheck Include User

Create table AUDIT_TRAIL (product VARCHAR2 (32 CHAR) not null, environment VARCHAR2 (32 CHAR) not null, server VARCHAR2 (32 CHAR) not null, resource_path VARCHAR2 (256 CHAR) not null, action VARCHAR2 (4 CHAR) not null, username VARCHAR2 (32 CHAR) not null, usergroup VARCHAR2 (32 CHAR) not null, address VARCHAR2 (32 CHAR) not null, timestamp DATE default TO_DATE 'YY-MM-DD HH24:MI:SS') not null, status VARCHAR2 (16 CHAR), data NCLOB)

2) if Include User is selected, the name of User will be added before the tablename of create table tablename, and a TRAVELSKY_XREZAGENT will be added as follows

Create table TRAVELSKY_XREZAGENT.AUDIT_TRAIL (product VARCHAR2 (32 CHAR) not null, environment VARCHAR2 (32 CHAR) not null, server VARCHAR2 (32 CHAR) not null, resource_path VARCHAR2 (256 CHAR) not null, action VARCHAR2 (4 CHAR) not null, username VARCHAR2 (32 CHAR) not null, usergroup VARCHAR2 (32 CHAR) not null, address VARCHAR2 (32 CHAR) not null, timestamp DATE default TO_DATE 'YY-MM-DD HH24:MI:SS') not null, status VARCHAR2 (16 CHAR), data NCLOB)

The original text is from: https://www.linuxprobe.com/plsql-dc-bijg.html

Tags: Space structure interpretation selection inventory data no original text name tool meaning ownership buttons files directories login restrictions information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Linux NVidia Shulou Tech Info vpn