EXPORT AND IMPORT:
-------------------------
login as: oracle
oracle@192.168.1.45's password:
Last login: Sat Mar 9 11:50:34 2013 from 192.168.1.61
[oracle@rac1 ~]$ ps -ef|grep pmon
oracle 6570 1 0 09:35 ? 00:00:11 ora_pmon_krish
oracle 29556 1 0 11:34 ? 00:00:02 ora_pmon_ram
oracle 7913 7886 0 12:15 pts/4 00:00:00 grep pmon
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:15:30 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:15:48 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name: sys
Enter password:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
Enter user-name: sys
Enter password:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:16:19 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /prod/ram
[oracle@rac1 ram]$ cd /
[oracle@rac1 /]$ ls -lrt
total 188
drwxr-xr-x 2 root root 4096 Oct 7 2006 misc
drwxr-xr-x 2 root root 4096 Oct 7 2006 srv
drwxr-xr-x 2 root root 4096 Oct 7 2006 initrd
drwxr-xr-x 2 root root 4096 Nov 20 11:16 selinux
drwxr-xr-x 15 root root 4096 Nov 20 11:22 usr
drwxr-xr-x 4 root root 4096 Nov 20 11:57 boot
drwxr-xr-x 3 root root 4096 Nov 20 11:58 tftpboot
drwxr-xr-x 25 root root 4096 Nov 20 12:10 var
drwxr-xr-x 3 root root 4096 Nov 20 13:42 mnt
drwx------ 2 root root 16384 Nov 20 16:45 lost+found
drwxr-xr-x 2 root root 4096 Nov 21 11:08 bin
drwxr-xr-x 2 root root 12288 Nov 21 11:09 sbin
drwxr-xr-x 4 root root 4096 Jan 11 10:22 opt
-rw-r--r-- 1 root root 0 Feb 1 10:27 abc.txt
drwxrwxrwx 11 oracle oinstall 4096 Feb 19 08:57 u01
drwxr-xr-x 8 oracle oinstall 4096 Mar 2 20:53 stage
drwxr-xr-x 11 root root 4096 Mar 2 20:55 lib
drwxr-xr-x 4 root root 4096 Mar 2 21:27 home
drwxr-xr-x 3 root root 0 Mar 8 15:46 config
drwxr-xr-x 2 root root 0 Mar 8 15:46 dlm
drwxr-xr-x 10 root root 5680 Mar 8 15:50 dev
drwxr-xr-x 4 root root 4096 Mar 8 15:51 media
drwxr-xr-x 111 root root 12288 Mar 8 15:51 etc
drwxr-x--- 18 root root 4096 Mar 8 15:51 root
dr-xr-xr-x 161 root root 0 Mar 8 21:11 proc
drwxr-xr-x 9 root root 0 Mar 8 21:11 sys
drwxrwxrwx 13 oracle dba 4096 Mar 9 11:49 prod
drwxrwxrwt 30 root root 4096 Mar 9 11:54 tmp
[oracle@rac1 /]$ ls -a
. .automount dev initrd misc prod srv tmp
.. bin dlm lib mnt root stage u01
abc.txt boot etc lost+found opt sbin sys usr
.autofsck config home media proc selinux tftpboot var
[oracle@rac1 /]$ cd -
/prod/ram
[oracle@rac1 ram]$ cd ~
[oracle@rac1 ~]$ ls -a
. .config .gnome .kde .ssh
.. Desktop .gnome2 .metacity .viminfo
.bash_history .dmrc .gnome2_private .mozilla .vnc
.bash_logout .eggcups .gstreamer-0.8 .nautilus .Xauthority
.bash_profile .emacs .gtkrc oradiag_oracle .xemacs
.bashrc .gconf .gtkrc-1.2-gnome2 .recently-used .zshrc
.canna .gconfd .ICEauthority .rhn-applet.conf
[oracle@rac1 ~]$ vi .bash_profile
[oracle@rac1 ~]$
[oracle@rac1 ~]$ export ORACLE_SID=RAM
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:17:46 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0.1/dbs/i nitRAM.ora'
SQL>
SQL>
SQL>
SQL> exit
Disconnected
[oracle@rac1 ~]$ pwd
/home/oracle
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /prod
[oracle@rac1 prod]$ ls
app exp lost+found nohup.out ramhot standby usa
cold_bkp krish nikee ram sbi suresh
[oracle@rac1 prod]$ exp help=y
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:18:38 2013
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
VOLSIZE number of bytes to write to each tape volume
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.
[oracle@rac1 prod]$ cd ram
[oracle@rac1 ram]$ . ram.env
[oracle@rac1 ram]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:19:05 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from dba_tablespaces;
select name from dba_tablespaces
*
ERROR at line 1:
ORA-00904: "NAME": invalid identifier
SQL> select name from v$tablespace;
NAME
------------------------------
SYSTEM
UNDOTBS
SYSAUX
TEMP
USERS
RAMDATA
6 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr oduction
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 ram]$ exp system/manager@ram file='/prod/exp/ram_tbs.dmp' log='/pro d/exp/ram_tbs.log' tablespaces=SYSTEM UNDOTBS SYSAUX
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:21:47 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export selected tablespaces ...
For tablespace SYSTEM ...
EXP-00091: Exporting questionable statistics.
. exporting referential integrity constraints
EXP-00091: Exporting questionable statistics.
. exporting triggers
Export terminated successfully with warnings.
[oracle@rac1 ram]$ exp system/manager@ram file='/prod/exp/ram_tbs.dmp' log='/prod/exp/ram_tbs.log' tablespaces=SYSTEM UNDOTBS SYSAUX statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:22:52 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export selected tablespaces ...
For tablespace SYSTEM ...
. exporting cluster definitions
. exporting table definitions
. exporting referential integrity constraints
. exporting triggers
Export terminated successfully without warnings.
[oracle@rac1 ram]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:23:56 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc dba_tables
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER NOT NULL VARCHAR2(30)
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
STATUS VARCHAR2(8)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(30)
INSTANCES VARCHAR2(30)
CACHE VARCHAR2(15)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
DROPPED VARCHAR2(3)
SQL> select tablespace_name,owner from dba_tables where owner='SCOTT';
TABLESPACE_NAME OWNER
------------------------------ ------------------------------
SYSTEM SCOTT
SYSTEM SCOTT
SYSTEM SCOTT
SYSTEM SCOTT
SQL> DROP USER SCOTT CASCADE;
User dropped.
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 ram]$ cd ../exp/
[oracle@rac1 exp]$ ls
imp_owner.log ram_full.dmp ram_tbs.dmp ram_tbs.log
[oracle@rac1 exp]$ imp system/manager@ram file=/prod/exp/ram_tbs.dmp log=/prod/exp/imp_tbs.log owner=scott statistics=none
LRM-00101: unknown parameter name 'owner'
IMP-00022: failed to process parameters, type 'IMP HELP=Y' for help
IMP-00000: Import terminated unsuccessfully
[oracle@rac1 exp]$ imp help=y
Import: Release 10.2.0.1.0 - Production on Sat Mar 9 12:29:17 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
You can let Import prompt you for parameters by entering the IMP
command followed by your username/password:
Example: IMP SCOTT/TIGER
Or, you can control how Import runs by entering the IMP command followed
by various arguments. To specify parameters, you use keywords:
Format: IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
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 import entire file (N)
BUFFER size of data buffer FROMUSER list of owner usernames
FILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) TABLES list of table names
IGNORE ignore create errors (N) RECORDLENGTH length of IO record
GRANTS import grants (Y) INCTYPE incremental import type
INDEXES import indexes (Y) COMMIT commit array insert (N)
ROWS import data rows (Y) PARFILE parameter filename
LOG log file of screen output CONSTRAINTS import constraints (Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE write table/index info to specified file
SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)
FEEDBACK display progress every x rows(0)
TOID_NOVALIDATE skip validation of specified type ids
FILESIZE maximum size of each dump file
STATISTICS import precomputed statistics (always)
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
COMPILE compile procedures, packages, and functions (Y)
STREAMS_CONFIGURATION import streams general metadata (Y)
STREAMS_INSTANTIATION import streams instantiation metadata (N)
VOLSIZE number of bytes in file on each volume of a file on tape
The following keywords only apply to transportable tablespaces
TRANSPORT_TABLESPACE import transportable tablespace metadata (N)
TABLESPACES tablespaces to be transported into database
DATAFILES datafiles to be transported into database
TTS_OWNERS users that own data in the transportable tablespace set
Import terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:29:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create user scott identified by tiger;
User created.
SQL> grant connect,resource to tiger;
grant connect,resource to tiger
*
ERROR at line 1:
ORA-01917: user or role 'TIGER' does not exist
SQL> 1
1* grant connect,resource to tiger
SQL> grant connect,resource to scott;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ imp system/manager@ram file=/prod/exp/ram_tbs.dmp log=/prod/exp/imp_tbs.log fromuser=scott touser=scott statistics=none
Import: Release 10.2.0.1.0 - Production on Sat Mar 9 12:30:51 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses UTF8 character set (possible charset conversion)
. importing SCOTT's objects into SCOTT
. . importing table "BONUS" 0 rows imported
. . importing table "DEPT" 4 rows imported
. . importing table "EMP" 14 rows imported
. . importing table "SALGRADE" 5 rows imported
About to enable constraints...
Import terminated successfully without warnings.
[oracle@rac1 exp]$ s
-bash: s: command not found
[oracle@rac1 exp]$ ls
imp_owner.log imp_tbs.log ram_full.dmp ram_tbs.dmp ram_tbs.log
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from scott.emp'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$
[oracle@rac1 exp]$ exp help=y
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:34:00 2013
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
VOLSIZE number of bytes to write to each tape volume
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.
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from emp'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from emp where rowid=1'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100'
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100;'
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100;"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="where rownum<100"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="where rownum<100" tables=emp
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:43:00 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn scott/tiger
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
SQL> select rownum from emp;
ROWNUM
----------
1
2
3
4
5
6
7
8
9
10
11
ROWNUM
----------
12
13
14
14 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query=\"where rownum<10\"
-bash: 10": No such file or directory
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="\where rownum<10\"
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="\where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<10\"
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:13 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 0 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<10\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 0 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:47 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<1600\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:47:20 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 3 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:47:40 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn scott/tiger
Connected.
SQL> select * from emp where job='salesman' and sal<1600;
no rows selected
SQL> desc emp
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> select job,sal from emp;
JOB SAL
--------- ----------
CLERK 800
SALESMAN 1600
SALESMAN 1250
MANAGER 2975
SALESMAN 1250
MANAGER 2850
MANAGER 2450
ANALYST 3000
PRESIDENT 5000
SALESMAN 1500
CLERK 1100
JOB SAL
--------- ----------
CLERK 950
ANALYST 3000
CLERK 1300
14 rows selected.
SQL> select job,sal where job=SALESMAN and sal<=1600 from emp;
select job,sal where job=SALESMAN and sal<=1600 from emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> 1
1* select job,sal where job=SALESMAN and sal<=1600 from emp
SQL> select job,sal where job='SALESMAN' and sal<1600 from emp;
select job,sal where job='SALESMAN' and sal<1600 from emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> select job,sal from emp where job='SALEMAN' AND SAL<1600';
ERROR:
ORA-01756: quoted string not properly terminated
SQL> 1
1* select job,sal from emp where job='SALEMAN' AND SAL<1600'
SQL> select job,sal from emp where job='SALEMAN' AND SAL<1600;
no rows selected
SQL> select job,sal from emp where SAL<1600;
JOB SAL
--------- ----------
CLERK 800
SALESMAN 1250
SALESMAN 1250
SALESMAN 1500
CLERK 1100
CLERK 950
CLERK 1300
7 rows selected.
SQL> select job,sal from emp where SAL<1600 and job=SALEMAN;
select job,sal from emp where SAL<1600 and job=SALEMAN
*
ERROR at line 1:
ORA-00904: "SALEMAN": invalid identifier
SQL> select job,sal from emp where SAL<1600 and job='SALEMAN';
no rows selected
SQL> select job,sal from emp where SAL<1600 and job='SALESMAN';
JOB SAL
--------- ----------
SALESMAN 1250
SALESMAN 1250
SALESMAN 1500
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\'" statistics=none
>
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:55:39 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP
EXP-00056: ORACLE error 1756 encountered
ORA-01756: quoted string not properly terminated
Export terminated successfully with warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN'\" statistics=none
>
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:57:03 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'CLERK\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:57:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:59:06 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CONN SCOTT/TIGER
Connected.
SQL> SELECT * FROM EMP;
SQL> SET LINE 200
SQL> /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
SQL> SELECT ROWNUM FROM EMP WHERE EMPNO=7369;
ROWNUM
----------
1
SQL> SELECT * FROM EMP WHERE EMPNO=7369;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE EMPNO=\'7369\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 13:01:49 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 1 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE EMPNO=\'7369\'\" statistics=nonelogin as: oracle
-------------------------
login as: oracle
oracle@192.168.1.45's password:
Last login: Sat Mar 9 11:50:34 2013 from 192.168.1.61
[oracle@rac1 ~]$ ps -ef|grep pmon
oracle 6570 1 0 09:35 ? 00:00:11 ora_pmon_krish
oracle 29556 1 0 11:34 ? 00:00:02 ora_pmon_ram
oracle 7913 7886 0 12:15 pts/4 00:00:00 grep pmon
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:15:30 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:15:48 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name: sys
Enter password:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
Enter user-name: sys
Enter password:
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:16:19 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Enter user-name:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /prod/ram
[oracle@rac1 ram]$ cd /
[oracle@rac1 /]$ ls -lrt
total 188
drwxr-xr-x 2 root root 4096 Oct 7 2006 misc
drwxr-xr-x 2 root root 4096 Oct 7 2006 srv
drwxr-xr-x 2 root root 4096 Oct 7 2006 initrd
drwxr-xr-x 2 root root 4096 Nov 20 11:16 selinux
drwxr-xr-x 15 root root 4096 Nov 20 11:22 usr
drwxr-xr-x 4 root root 4096 Nov 20 11:57 boot
drwxr-xr-x 3 root root 4096 Nov 20 11:58 tftpboot
drwxr-xr-x 25 root root 4096 Nov 20 12:10 var
drwxr-xr-x 3 root root 4096 Nov 20 13:42 mnt
drwx------ 2 root root 16384 Nov 20 16:45 lost+found
drwxr-xr-x 2 root root 4096 Nov 21 11:08 bin
drwxr-xr-x 2 root root 12288 Nov 21 11:09 sbin
drwxr-xr-x 4 root root 4096 Jan 11 10:22 opt
-rw-r--r-- 1 root root 0 Feb 1 10:27 abc.txt
drwxrwxrwx 11 oracle oinstall 4096 Feb 19 08:57 u01
drwxr-xr-x 8 oracle oinstall 4096 Mar 2 20:53 stage
drwxr-xr-x 11 root root 4096 Mar 2 20:55 lib
drwxr-xr-x 4 root root 4096 Mar 2 21:27 home
drwxr-xr-x 3 root root 0 Mar 8 15:46 config
drwxr-xr-x 2 root root 0 Mar 8 15:46 dlm
drwxr-xr-x 10 root root 5680 Mar 8 15:50 dev
drwxr-xr-x 4 root root 4096 Mar 8 15:51 media
drwxr-xr-x 111 root root 12288 Mar 8 15:51 etc
drwxr-x--- 18 root root 4096 Mar 8 15:51 root
dr-xr-xr-x 161 root root 0 Mar 8 21:11 proc
drwxr-xr-x 9 root root 0 Mar 8 21:11 sys
drwxrwxrwx 13 oracle dba 4096 Mar 9 11:49 prod
drwxrwxrwt 30 root root 4096 Mar 9 11:54 tmp
[oracle@rac1 /]$ ls -a
. .automount dev initrd misc prod srv tmp
.. bin dlm lib mnt root stage u01
abc.txt boot etc lost+found opt sbin sys usr
.autofsck config home media proc selinux tftpboot var
[oracle@rac1 /]$ cd -
/prod/ram
[oracle@rac1 ram]$ cd ~
[oracle@rac1 ~]$ ls -a
. .config .gnome .kde .ssh
.. Desktop .gnome2 .metacity .viminfo
.bash_history .dmrc .gnome2_private .mozilla .vnc
.bash_logout .eggcups .gstreamer-0.8 .nautilus .Xauthority
.bash_profile .emacs .gtkrc oradiag_oracle .xemacs
.bashrc .gconf .gtkrc-1.2-gnome2 .recently-used .zshrc
.canna .gconfd .ICEauthority .rhn-applet.conf
[oracle@rac1 ~]$ vi .bash_profile
[oracle@rac1 ~]$
[oracle@rac1 ~]$ export ORACLE_SID=RAM
[oracle@rac1 ~]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:17:46 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/10.2.0.1/dbs/i nitRAM.ora'
SQL>
SQL>
SQL>
SQL> exit
Disconnected
[oracle@rac1 ~]$ pwd
/home/oracle
[oracle@rac1 ~]$
[oracle@rac1 ~]$
[oracle@rac1 ~]$ cd /prod
[oracle@rac1 prod]$ ls
app exp lost+found nohup.out ramhot standby usa
cold_bkp krish nikee ram sbi suresh
[oracle@rac1 prod]$ exp help=y
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:18:38 2013
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
VOLSIZE number of bytes to write to each tape volume
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.
[oracle@rac1 prod]$ cd ram
[oracle@rac1 ram]$ . ram.env
[oracle@rac1 ram]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:19:05 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select name from dba_tablespaces;
select name from dba_tablespaces
*
ERROR at line 1:
ORA-00904: "NAME": invalid identifier
SQL> select name from v$tablespace;
NAME
------------------------------
SYSTEM
UNDOTBS
SYSAUX
TEMP
USERS
RAMDATA
6 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr oduction
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 ram]$ exp system/manager@ram file='/prod/exp/ram_tbs.dmp' log='/pro d/exp/ram_tbs.log' tablespaces=SYSTEM UNDOTBS SYSAUX
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:21:47 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Produc tion
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export selected tablespaces ...
For tablespace SYSTEM ...
EXP-00091: Exporting questionable statistics.
. exporting referential integrity constraints
EXP-00091: Exporting questionable statistics.
. exporting triggers
Export terminated successfully with warnings.
[oracle@rac1 ram]$ exp system/manager@ram file='/prod/exp/ram_tbs.dmp' log='/prod/exp/ram_tbs.log' tablespaces=SYSTEM UNDOTBS SYSAUX statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:22:52 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export selected tablespaces ...
For tablespace SYSTEM ...
. exporting cluster definitions
. exporting table definitions
. exporting referential integrity constraints
. exporting triggers
Export terminated successfully without warnings.
[oracle@rac1 ram]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:23:56 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> desc dba_tables
Name Null? Type
----------------------------------------- -------- ----------------------------
OWNER NOT NULL VARCHAR2(30)
TABLE_NAME NOT NULL VARCHAR2(30)
TABLESPACE_NAME VARCHAR2(30)
CLUSTER_NAME VARCHAR2(30)
IOT_NAME VARCHAR2(30)
STATUS VARCHAR2(8)
PCT_FREE NUMBER
PCT_USED NUMBER
INI_TRANS NUMBER
MAX_TRANS NUMBER
INITIAL_EXTENT NUMBER
NEXT_EXTENT NUMBER
MIN_EXTENTS NUMBER
MAX_EXTENTS NUMBER
PCT_INCREASE NUMBER
FREELISTS NUMBER
FREELIST_GROUPS NUMBER
LOGGING VARCHAR2(3)
BACKED_UP VARCHAR2(1)
NUM_ROWS NUMBER
BLOCKS NUMBER
EMPTY_BLOCKS NUMBER
AVG_SPACE NUMBER
CHAIN_CNT NUMBER
AVG_ROW_LEN NUMBER
AVG_SPACE_FREELIST_BLOCKS NUMBER
NUM_FREELIST_BLOCKS NUMBER
DEGREE VARCHAR2(30)
INSTANCES VARCHAR2(30)
CACHE VARCHAR2(15)
TABLE_LOCK VARCHAR2(8)
SAMPLE_SIZE NUMBER
LAST_ANALYZED DATE
PARTITIONED VARCHAR2(3)
IOT_TYPE VARCHAR2(12)
TEMPORARY VARCHAR2(1)
SECONDARY VARCHAR2(1)
NESTED VARCHAR2(3)
BUFFER_POOL VARCHAR2(7)
ROW_MOVEMENT VARCHAR2(8)
GLOBAL_STATS VARCHAR2(3)
USER_STATS VARCHAR2(3)
DURATION VARCHAR2(15)
SKIP_CORRUPT VARCHAR2(8)
MONITORING VARCHAR2(3)
CLUSTER_OWNER VARCHAR2(30)
DEPENDENCIES VARCHAR2(8)
COMPRESSION VARCHAR2(8)
DROPPED VARCHAR2(3)
SQL> select tablespace_name,owner from dba_tables where owner='SCOTT';
TABLESPACE_NAME OWNER
------------------------------ ------------------------------
SYSTEM SCOTT
SYSTEM SCOTT
SYSTEM SCOTT
SYSTEM SCOTT
SQL> DROP USER SCOTT CASCADE;
User dropped.
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 ram]$ cd ../exp/
[oracle@rac1 exp]$ ls
imp_owner.log ram_full.dmp ram_tbs.dmp ram_tbs.log
[oracle@rac1 exp]$ imp system/manager@ram file=/prod/exp/ram_tbs.dmp log=/prod/exp/imp_tbs.log owner=scott statistics=none
LRM-00101: unknown parameter name 'owner'
IMP-00022: failed to process parameters, type 'IMP HELP=Y' for help
IMP-00000: Import terminated unsuccessfully
[oracle@rac1 exp]$ imp help=y
Import: Release 10.2.0.1.0 - Production on Sat Mar 9 12:29:17 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
You can let Import prompt you for parameters by entering the IMP
command followed by your username/password:
Example: IMP SCOTT/TIGER
Or, you can control how Import runs by entering the IMP command followed
by various arguments. To specify parameters, you use keywords:
Format: IMP KEYWORD=value or KEYWORD=(value1,value2,...,valueN)
Example: IMP SCOTT/TIGER IGNORE=Y TABLES=(EMP,DEPT) FULL=N
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 import entire file (N)
BUFFER size of data buffer FROMUSER list of owner usernames
FILE input files (EXPDAT.DMP) TOUSER list of usernames
SHOW just list file contents (N) TABLES list of table names
IGNORE ignore create errors (N) RECORDLENGTH length of IO record
GRANTS import grants (Y) INCTYPE incremental import type
INDEXES import indexes (Y) COMMIT commit array insert (N)
ROWS import data rows (Y) PARFILE parameter filename
LOG log file of screen output CONSTRAINTS import constraints (Y)
DESTROY overwrite tablespace data file (N)
INDEXFILE write table/index info to specified file
SKIP_UNUSABLE_INDEXES skip maintenance of unusable indexes (N)
FEEDBACK display progress every x rows(0)
TOID_NOVALIDATE skip validation of specified type ids
FILESIZE maximum size of each dump file
STATISTICS import precomputed statistics (always)
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
COMPILE compile procedures, packages, and functions (Y)
STREAMS_CONFIGURATION import streams general metadata (Y)
STREAMS_INSTANTIATION import streams instantiation metadata (N)
VOLSIZE number of bytes in file on each volume of a file on tape
The following keywords only apply to transportable tablespaces
TRANSPORT_TABLESPACE import transportable tablespace metadata (N)
TABLESPACES tablespaces to be transported into database
DATAFILES datafiles to be transported into database
TTS_OWNERS users that own data in the transportable tablespace set
Import terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:29:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create user scott identified by tiger;
User created.
SQL> grant connect,resource to tiger;
grant connect,resource to tiger
*
ERROR at line 1:
ORA-01917: user or role 'TIGER' does not exist
SQL> 1
1* grant connect,resource to tiger
SQL> grant connect,resource to scott;
Grant succeeded.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ imp system/manager@ram file=/prod/exp/ram_tbs.dmp log=/prod/exp/imp_tbs.log fromuser=scott touser=scott statistics=none
Import: Release 10.2.0.1.0 - Production on Sat Mar 9 12:30:51 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.02.01 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses UTF8 character set (possible charset conversion)
. importing SCOTT's objects into SCOTT
. . importing table "BONUS" 0 rows imported
. . importing table "DEPT" 4 rows imported
. . importing table "EMP" 14 rows imported
. . importing table "SALGRADE" 5 rows imported
About to enable constraints...
Import terminated successfully without warnings.
[oracle@rac1 exp]$ s
-bash: s: command not found
[oracle@rac1 exp]$ ls
imp_owner.log imp_tbs.log ram_full.dmp ram_tbs.dmp ram_tbs.log
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from scott.emp'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$
[oracle@rac1 exp]$ exp help=y
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:34:00 2013
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
VOLSIZE number of bytes to write to each tape volume
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.
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from emp'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query='select * from emp where rowid=1'
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100'
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100;'
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100;"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="select * from emp where rownum<100"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="where rownum<100"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/quer.dmp log=/prod/exp/quer.log query="where rownum<100" tables=emp
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:43:00 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn scott/tiger
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
BONUS TABLE
DEPT TABLE
EMP TABLE
SALGRADE TABLE
SQL> select rownum from emp;
ROWNUM
----------
1
2
3
4
5
6
7
8
9
10
11
ROWNUM
----------
12
13
14
14 rows selected.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query=\"where rownum<10\"
-bash: 10": No such file or directory
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="\where rownum<10\"
>
[oracle@rac1 exp]$ exp scott/tiger@ram file=/prod/exp/q.dmp log=/prod/exp/q.log tables=emp query="\where rownum<10"
LRM-00112: multiple values not allowed for parameter 'query'
EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
EXP-00000: Export terminated unsuccessfully
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<10\"
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:13 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 0 rows exported
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<10\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 0 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:46:47 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\' and sal \<1600\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:47:20 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 3 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:47:40 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> conn scott/tiger
Connected.
SQL> select * from emp where job='salesman' and sal<1600;
no rows selected
SQL> desc emp
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
SQL> select job,sal from emp;
JOB SAL
--------- ----------
CLERK 800
SALESMAN 1600
SALESMAN 1250
MANAGER 2975
SALESMAN 1250
MANAGER 2850
MANAGER 2450
ANALYST 3000
PRESIDENT 5000
SALESMAN 1500
CLERK 1100
JOB SAL
--------- ----------
CLERK 950
ANALYST 3000
CLERK 1300
14 rows selected.
SQL> select job,sal where job=SALESMAN and sal<=1600 from emp;
select job,sal where job=SALESMAN and sal<=1600 from emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> 1
1* select job,sal where job=SALESMAN and sal<=1600 from emp
SQL> select job,sal where job='SALESMAN' and sal<1600 from emp;
select job,sal where job='SALESMAN' and sal<1600 from emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
SQL> select job,sal from emp where job='SALEMAN' AND SAL<1600';
ERROR:
ORA-01756: quoted string not properly terminated
SQL> 1
1* select job,sal from emp where job='SALEMAN' AND SAL<1600'
SQL> select job,sal from emp where job='SALEMAN' AND SAL<1600;
no rows selected
SQL> select job,sal from emp where SAL<1600;
JOB SAL
--------- ----------
CLERK 800
SALESMAN 1250
SALESMAN 1250
SALESMAN 1500
CLERK 1100
CLERK 950
CLERK 1300
7 rows selected.
SQL> select job,sal from emp where SAL<1600 and job=SALEMAN;
select job,sal from emp where SAL<1600 and job=SALEMAN
*
ERROR at line 1:
ORA-00904: "SALEMAN": invalid identifier
SQL> select job,sal from emp where SAL<1600 and job='SALEMAN';
no rows selected
SQL> select job,sal from emp where SAL<1600 and job='SALESMAN';
JOB SAL
--------- ----------
SALESMAN 1250
SALESMAN 1250
SALESMAN 1500
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\'" statistics=none
>
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:55:39 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP
EXP-00056: ORACLE error 1756 encountered
ORA-01756: quoted string not properly terminated
Export terminated successfully with warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN'\" statistics=none
>
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'SALESMAN\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:57:03 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE job=\'CLERK\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 12:57:38 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 4 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Mar 9 12:59:06 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CONN SCOTT/TIGER
Connected.
SQL> SELECT * FROM EMP;
SQL> SET LINE 200
SQL> /
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
14 rows selected.
SQL> SELECT ROWNUM FROM EMP WHERE EMPNO=7369;
ROWNUM
----------
1
SQL> SELECT * FROM EMP WHERE EMPNO=7369;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
SQL> EXIT
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE EMPNO=\'7369\'\" statistics=none
Export: Release 10.2.0.1.0 - Production on Sat Mar 9 13:01:49 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses UTF8 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table EMP 1 rows exported
Export terminated successfully without warnings.
[oracle@rac1 exp]$
[oracle@rac1 exp]$ exp scott/tiger@ram TABLES=emp QUERY=\"WHERE EMPNO=\'7369\'\" statistics=nonelogin as: oracle
No comments:
Post a Comment