Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2361
  • Last Modified:

how can export user tables structure only

how can export user tables structure only not data
0
rehman_job
Asked:
rehman_job
1 Solution
 
sapnamCommented:
you can use the rows=n parameter

Example
for a table
exp userid=scott/tiger tables=emp rows=n file=c:\emp.dmp

for the user
exp userid=scott/tiger rows=n file=c:\emp.dmp
0
 
spk2shankarCommented:
Hi,
You can use the same rows=n parameter to avoid exporting table data.
Exp <User> File=<Path> [Tables=(<Names>)] [Rows=N] [Log=<Path>]

Regards
0
 
annamalai77Commented:
my dear friend

its very simple, u can either use the export command or use can use SQL script to generate the table creation script

just dot he following

1. c:\set oracle_sid=<database name>
2. exp
3. follow the steps which is user interactive.

in one of the options it will ask whether table data to be exported. its default value is Y, just change to N.


or using sql u can have ur table creation script. b ut i suggest that u go for the export command which will also include all constraints,triggers if any for a table.

there u r u have the structure alone.

regards
annamalai
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now