Home » RDBMS Server » Server Utilities » exporting procedure-in user mode
exporting procedure-in user mode [message #238066] Wed, 16 May 2007 09:41 Go to next message
sbmk_design
Messages: 88
Registered: April 2007
Location: CHENNAI
Member
Hi
I wanted to export a user with its all tables & its all procedure/packages can i have the syntax for this. [ now i am exporting only all tables]

by
sbmk_design

[Updated on: Wed, 16 May 2007 09:42]

Report message to a moderator

Re: exporting procedure-in user mode [message #238068 is a reply to message #238066] Wed, 16 May 2007 09:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68665
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
C:\>exp help=y

Export: Release 10.2.0.3.0 - Production on Mer. Mai 16 16:56:22 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.



You can let Export prompt you for parameters by entering the EXP
command followed by your username/password:

     Example: EXP SCOTT/TIGER

Or, you can control how Export runs by entering the EXP command followed
by various arguments. To specify parameters, you use keywords:

     Format:  EXP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
     Example: EXP SCOTT/TIGER GRANTS=Y TABLES=(EMP,DEPT,MGR)
               or TABLES=(T1:P1,T1:P2), if T1 is partitioned table

USERID must be the first parameter on the command line.

Keyword    Description (Default)      Keyword      Description (Default)
--------------------------------------------------------------------------
USERID     username/password          FULL         export entire file (N)
BUFFER     size of data buffer        OWNER        list of owner usernames
FILE       output files (EXPDAT.DMP)  TABLES       list of table names
COMPRESS   import into one extent (Y) RECORDLENGTH length of IO record
GRANTS     export grants (Y)          INCTYPE      incremental export type
INDEXES    export indexes (Y)         RECORD       track incr. export (Y)
DIRECT     direct path (N)            TRIGGERS     export triggers (Y)
LOG        log file of screen output  STATISTICS   analyze objects (ESTIMATE)
ROWS       export data rows (Y)       PARFILE      parameter filename
CONSISTENT cross-table consistency(N) CONSTRAINTS  export constraints (Y)

OBJECT_CONSISTENT    transaction set to read only during object export (N)
FEEDBACK             display progress every x rows (0)
FILESIZE             maximum size of each dump file
FLASHBACK_SCN        SCN used to set session snapshot back to
FLASHBACK_TIME       time used to get the SCN closest to the specified time
QUERY                select clause used to export a subset of a table
RESUMABLE            suspend when a space related error is encountered(N)
RESUMABLE_NAME       text string used to identify resumable statement
RESUMABLE_TIMEOUT    wait time for RESUMABLE
TTS_FULL_CHECK       perform full or partial dependency check for TTS
TABLESPACES          list of tablespaces to export
TRANSPORT_TABLESPACE export transportable tablespace metadata (N)
TEMPLATE             template name which invokes iAS mode export

Export terminated successfully without warnings.

Note the OWNER keyword.

Regards
Michel
Re: exporting procedure-in user mode [message #242408 is a reply to message #238066] Fri, 01 June 2007 16:57 Go to previous message
Thagor
Messages: 9
Registered: April 2007
Junior Member
Just in addition to Michel:
User create statements and roles are only part of a full database export and users and their (object-)grants and roles will only fully be imported in a full database import.

They will not be created if only schema's are imported (fromuser/touser import). Then the new owner (= schema) and the users and roles who the old owner granted access or execute to have to exist before the import is done (or given afterwards manually if you want that).

Your export parameter file could look like this:
userid=username/pwd
file=<exp.dmp>
log=<exp.log>
owner=user1
consistent=y --- to assure read consistency during export if the database is not in restricted mode

Hope this helps a little
Thagor
Previous Topic: Import skips table
Next Topic: TKRPOF
Goto Forum:
  


Current Time: Tue Jul 02 00:46:14 CDT 2024