Total Pageviews

Showing posts with label DATAPUMP-SQLLOADER. Show all posts
Showing posts with label DATAPUMP-SQLLOADER. Show all posts

Wednesday, 24 December 2014

ORA-01841: (full) year must be between -4713 and +9999, and not be 0

expdp sumit/database@DB16UTF_486 tables=test1,test2 directory=EXPORT_DUMP dumpfile=exp_tune6.dmp logfile=exp_tune6.log exclude=statistics flashback_time=SYSTIMESTAMP

Export: Release 10.2.0.1.0 - Production on Tuesday, 30 October, 2012 16:58:52

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

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options
ORA-39001: invalid argument value
ORA-39150: bad flashback time
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Solution:

FLASHBACK_TIME is causing the issue here. First step is to check the value ofNLS_TIMESTAMP_FORMAT , in my case it's value was  "DD-MON-RR HH.MI.SSXFF AM".
Correct syntax is FLASHBACK_TIME="TO_TIMESTAMP(time-value)".
Because the TO_TIMESTAMP value is enclosed in quotation marks, it would be best to put this
parameter in a parameter file else it causes syntax error on windows dos prompt.

Example:

You can specify the time in any format that the DBMS_FLASHBACK.ENABLE_AT_TIME 
procedure accepts. For example, suppose you have a parameter file, flashback.par,
with the following contents:

DIRECTORY= EXPORT_DUMP 
TABLES= test1,test2 
DUMPFILE=hr_time.dmp
dumpfile=exp_tune6.dmp 
logfile=exp_tune6.log 
exclude=statistics 
flashback_time="TO_TIMESTAMP(SYSDATE, 'DD-MON-RR HH:MI:SSXFF AM')"

You could then issue the following command:

> expdp sumit/database@db16utf_486  PARFILE=D:\flashback.par

The export operation will be performed with data that is consistent with the SCN that most 
closely matches the specified time.

Thursday, 4 December 2014

To connect sqlloader from remote server as sysdba on windows

sqlldr userid='sys/xxxxxx@tnsremote as sysdba'

 control=C:\usr_control.ctl.txt

log=C:\logs\my_usr_log.log

bad=C:\logs\my_usr_bad.log

discard=C:\logs\my_usr_discard.log

Monday, 24 November 2014

Export issue : UDE-00014: invalid value for parameter, 'attach'

Running expdp with sys as sysdba user:
============================

[oracle@RAC1 ~]$   /opt/oracle/product/11.2.0.3/db_1/bin/expdp \'/ as sysdba \'/ directory=expdp_22Nov14 dumpfile=expdp_22Nov14_LISTING_content_%U logfile=expdp_22Nov14_LISTING_content.log tables='EME.BMLS_LISTING' content=METADATA_ONLY exclude=constraint,ref_constraint,index,statisstatistics parallel=4

Export: Release 11.2.0.3.0 - Production on Mon Nov 24 01:45:54 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
UDE-00014: invalid value for parameter, 'attach'.

Correct Syntax:
==========


[oracle@RAC1 ~]$  /opt/oracle/product/11.2.0.3/db_1/bin/expdp  \'/ as sysdba\' directory=EXPDP_21NOV14 dumpfile=expdp_24Nov14_LISTING_content_%U content=METADATA_ONLY
 logfile=expdp_24Nov14_LISTING_content.log tables='EME.BMLS_LISTING' content=METADATA_ONLY exclude=constraint,ref_constraint,index,statisstatistics parallel=4


Export: Release 11.2.0.3.0 - Production on Mon Nov 24 01:56:51 2014

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" directory=EXPDP_21NOV14 dumpfile=expdp_24Nov14_LISTING_content_%U content=METADATA_ONLY logfile=expdp_24Nov14_LISTING_content.log tables='EME.BMLS_LISTING'  content=METADATA_ONLY exclude=constraint,ref_constraint,index,statisstatistics parallel=4
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/TRIGGER
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:
  /orabackup/expdp_21Nov14/expdp_24Nov14_LISTING_content_01.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at 01:57:45


Also you can try:

expdp \"SYS@service AS SYSDBA\"


Saturday, 31 May 2014

Using Query level export

[oracle@vm1 ~]$ cat parameterFile.par

tables=MY_SCHEMA.DETAILED_REPORT,MY_SCHEMA.SUMMARY_REPORT
dumpfile=Sumit_expdp_Report.dmp
logfile=expdp_Sumit_Rpt.log
directory=EXPIMP
query=MY_SCHEMA.DETAILED_REPORT:"WHERE to_char(transfer_date,'MM-YY')='05-14'"
query=MY_SCHEMA.SUMMARY_REPORT:"WHERE to_char(transfer_date,'MM-YY')='05-14'"



Now run the export command:

expdp parfile=parameterFile.par ;

Requirement was to export the above mentioned tables with all data for MAY-2014 based on column transfer_date .

Wednesday, 16 January 2013

What if table already exists during import



TABLE_EXISTS_ACTION TABLE_EXISTS_ACTION=[SKIP | APPEND | TRUNCATE | REPLACE]

The possible values have the following effects:

· SKIP leaves the table as is and moves on to the next object. This is not a valid option if the CONTENT parameter   is set to DATA_ONLY.
·   APPEND loads rows from the source and leaves existing rows unchanged.
·   TRUNCATE deletes existing rows and then loads rows from the source.
·   REPLACE drops the existing table and then creates and loads it from the source.
This is not a valid option if the CONTENT parameter is set to DATA_ONLY.


The following considerations apply when you are using these options:

·  When you use TRUNCATE or REPLACE, ensure that rows in the affected tables are not targets of any referential constraints.
· When you use SKIP, APPEND, or TRUNCATE, existing table-dependent objects in the source, such as indexes, grants, triggers, and constraints, are not modified. For REPLACE, the dependent objects are dropped and re-created from the source, if they were not explicitly or implicitly excluded (using EXCLUDE) and they exist in the source dump file or system.
· When you use APPEND or TRUNCATE, checks are made to ensure that rows from the source are compatible with the existing table before performing any action. If the existing table has active constraints and triggers, then it is loaded using the external tables access method. If any row violates an active constraint, then the load fails and no data is loaded. You can override this behavior by specifying DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS on the Import command line. If you have data that must be loaded, but may cause constraint violations, then consider disabling the constraints, loading the data, and then deleting the problem rows before reenabling the constraints.
· When you use APPEND, the data is always loaded into new space; existing space, even if available, is not reused. For this reason, you may want to compress your data after the load.

When Data Pump detects that the source table and target table do not match (the two tables do not have the same number of columns or the target table has a column name that is not present in the source table), it compares column names between the two tables. If the tables have at least one column in common, then the data for the common
columns is imported into the table (assuming the datatypes are compatible).

Export-Import Subset of Production Data


SAMPLE SAMPLE=[[schema_name.]table_name:]sample_percent
 Allows you to specify a percentage of the data rows to be sampled and unloaded from the source database.
This parameter allows you to export subsets of data by specifying the percentage of data to be sampled and exported. The sample_percent indicates the probability that a row will be selected as part of the sample. The sample_percent can be applied to specific tables. In the following example, 50% of the HR.EMPLOYEES table will be exported:
SAMPLE="HR"."EMPLOYEES":50
If you specify a schema, then you must also specify a table. However, you can specify a table without specifying a schema; the current user will be assumed. If no table is specified, then the sample_percent value applies to the entire export job.

Secure Your Production Data during Import


REMAP_DATA

The REMAP_DATA parameter allows you to specify a remap function that takes as a source the original value of the designated column and returns a remapped value that will replace the original value in the dump file. A common use for this option is to mask data when moving from a production system to a test system. For example, a column of sensitive customer data such as credit card numbers could be replaced with numbers generated by a REMAP_DATA function. This would allow the data to retain its essential formatting and processing characteristics without exposing private data to unauthorized personnel.
The same function can be applied to multiple columns being dumped. This is useful when you want to guarantee consistency in remapping both the child and parent column in a referential constraint.

REMAP_DATA=[schema.]tablename.column_name:[schema.]pkg.function

schema -- the schema containing the table to be remapped. By default, this is the schema of the user doing the export.
tablename -- the table whose column will be remapped.
column_name -- the column whose data is to be remapped. The maximum number of columns that can be remapped for a single table is 10.
schema -- the schema containing the PL/SQL package you have created that contains the remapping function. As a default, this is the schema of the user doing the export.
pkg -- the name of the PL/SQL package you have created that contains the remapping function.
function -- the name of the function within the PL/SQL that will be called to remap the column table in each row of the specified table.

The following example assumes a package named remap has been created that contains functions named minus10 and plusx which change the values for employee_id and first_name in the employees table.

> expdp hr DIRECTORY=dpump_dir1 DUMPFILE=remap1.dmp TABLES=employees REMAP_DATA=hr.employees.employee_id:hr.remap.minus10
REMAP_DATA=hr.employees.first_name:hr.remap.plusx

REUSE_DUMPFILES Specifies whether to overwrite a preexisting dump file. Normally, Data Pump Export will return an error if you specify a dump file name that already exists. The REUSE_DUMPFILES parameter allows you to override that behavior and reuse a dump file name.

Thursday, 15 November 2012

ORA-19721 by Transportable Tablespace Import (TTS)

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.4 - Release: 10.1 to 10.2

On 10.1 and above: when attempting to transfer a datafile as a Transportable Tablespace (TTS), the following error occurs, even though the databases are at the same version:

ORA-19721: Cannot find datafile with absolute file number # in tablespace <datafile>

The issue can be reproduced at will with the following steps:

1. Export the data file as a Transportable Tablespace, from a 10.1 (or above) database
2. Import the data file

Cause:

The file header for the data file has a format that is less than v10.0.

When the source tablespace was set to READ-ONLY in preparation for being transported, it is likely that the COMPATIBLE parameter was set to 9.2, at that time. As per unpublished Bug 2905128, this means that the file header is still version 9.2, even though the database is version 10.1 or above.

So, because the target database has COMPATIBLE set to 10.2, the data file being transported has the wrong file header format, and the ORA-19721 error is reported.

Solution

1. Change the tablespace in the SOURCE database back into Read/Write mode:

connect / as sysdba
ALTER TABLESPACE <datafile-name> READ WRITE;



2. If the SOURCE database still has COMPATIBLE set to 9.2, change it 10.2 and bounce the database:

connect / as sysdba
ALTER SYSTEM SET COMPATIBLE=10.2 SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP;


3. Change the tablespace to Read Only mode, again:

ALTER TABLESPACE <datafile-name> READ ONLY;

4. Re-run the Export of the data file using the Transportable Tablespace method.

5. Re-run the Import of the datafile using the Transportable Tablespace method.

Monday, 23 July 2012

Oracle DataPump

Oracle DataPump Features:
Datapump is a server side utility.You initiate datapump jobs from a user process either sql*plus or through EM but all the work is done by server processes.This improves the performance dramatically over the old exp ort/import utilities because the datapump processes running on the server have direct acess to the datafiles and SGA;they don’t have to go via a session.
Data Pump takes the old export and import utilities one step further, you can have total control over the job running (stop it, pause it, check it, restart it). Data pump is a server side technology and it can transfer large amounts of data very quickly using parallel streams to achieve maximum throughput, they can be 15-45% faster than the older import/export utilities. Advantages using data pump are
  • ability to estimate jobs times
  • ability to restart failed jobs
  • perform fine-grained object selection
  • monitor running jobs
  • directly load a database from a remote instance via the network
  • remapping capabilities
  • improved performance using parallel executions
A couple of notes is that you cannot export to a tape device only to disk, and the import will only work with version of oracle 10.1 or greater.

Data Pump Uses
You can use data pump for the following:
  • migrating databases
  • copying databases
  • transferring oracle databases between different operating systems
  • backing up important tables before you change them
  • moving database objects from one tablespace to another
  • transporting tablespace's between databases
  • reorganizing fragmented table data
  • extracting the DDL for tables and other objects such as stored procedures and packages
Data Access methods
Data pump has two methods for loading data, direct path or external table path you as a dba have no control with what data pump uses, normally simple structures such as heap tables without triggers will use direct path more complex tables will use the external path, oracle will always try and use the direct-path method.
· Direct Path: Bypasses the database buffer cache and writes beyond the high water mark when finished adjusts the high water mark, No undo is generated and can switch off redo as well, minimal impact to users as does not use SGA. Must disable triggers on tables before use.
· External Path: Uses the database buffer cache acts as a SELECT statement into a dump file, during import reconstructs statements into INSERT statements, so whole process is like a normal SELECT/INSERT job. Both undo and redo are generated and uses a normal COMMIT just like a DML statement would.
In the following cases oracle will use the external path if any of the below are in use:
  • clustered tables
  • active triggers in the table
  • a single partition in a table with a global index
  • referential integrity constraints
  • domain indexes on LOB columns
  • tables with fine-grained access control enabled in the insert mode
Data Pump files

You will use three types's of files when using data pump, all files will be created on the server.
  • dump files - holds the data and metadata
  • log files - the resulting output from the data pump command
  • sql files - contain the DDL statements describing the objects included in the job but can contain data
  • Master data pump tables - when using datapump it will create tables within the schema, this is used for controlling the datapump job, the table is removed when finished.

Changing from Original Export/Import to Oracle Data Pump:

New concept of 'DIRECTORY' in expdp:

In order to use Data Pump, the database administrator must create a directory object and grant
Privileges to the user on that directory object. If a directory object is not specified, a default
directory object called data_pump_dir is provided. The default data_pump_dir is available only
to privileged users unless access is granted by the DBA.
SQL> Create directory FullDump as ‘C:\FullDump’;
Directory Created
SQL> Create directory SchemaDump as ‘C:\SchemaDump’;
Directory Created
SQL>
SELECT grantee, table_name ,directory_name, PRIVILEGE FROM user_tab_privs;
SELECT * FROM all_directories;

After a directory is created, you need to grant READ and WRITE permission on the directory
to other users. For example, to allow the Oracle database to read and to write to files on behalf
of user scott in the directory named by SchemaDump, you must execute the following
Command:
SQL> GRANT READ, WRITE ON DIRECTORY SchemaDump TO Scott;
Once the directory access is granted, the user scott can export his database objects in that directory using the below command:
expdp scott/tiger schemas=scott directory=SchemaDump dumpfile=scott.dmp logfile=scott.log
If user donot have read-write permission on direcotry then expdp will fail with below error:
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39087: directory name “SCHEMADUMP” is invalid.

Table Exports/Imports

The TABLES parameter is used to specify the tables that are to be exported. The following is an example of the table export and import syntax.
  • expdp scott/tiger tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=expdpEMP_DEPT.log
  •  impdp scott/tiger tables=EMP,DEPT directory=TEST_DIR dumpfile=EMP_DEPT.dmp logfile=impdpEMP_DEPT.log
The TABLE_EXISTS_ACTION=APPEND parameter allows data to be imported into existing tables.

Schema Exports/Imports

The OWNER parameter of exp has been replaced by the SCHEMAS parameter which is used to specify the schemas to be exported. The following is an example of the schema export and import syntax.
  •  expdp scott/tiger schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
  • impdp scott/tiger schemas=SCOTT directory=TEST_DIR dumpfile=SCOTT.dmp logfile=impdpSCOTT.log
Database Exports/Imports

The FULL parameter indicates that a complete database export is required. The following is an example of the full database export and import syntax.
  • expdp system/password full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=expdpDB10G.log
  •  impdp system/password@db10g full=Y directory=TEST_DIR dumpfile=DB10G.dmp logfile=impdpDB10G.log
INCLUDE and EXCLUDE

The INCLUDE and EXCLUDE parameters can be used to limit the export/import to specific objects. When the INCLUDE parameter is used, only those objects specified by it will be included in the export/import. When the EXCLUDE parameter is used, all objects except those specified by it will be included in the export/import. The two parameters are mutually exclusive, so use the parameter that requires the least entries to give you the result you require. The basic syntax for both parameters is the same.
Syntax:
  • INCLUDE=object_type[:name_clause] [, ...]
  • EXCLUDE=object_type[:name_clause] [, ...]
Example:
  • expdp scott/tiger schemas=SCOTT include=TABLE:"IN ('EMP', 'DEPT')" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
  •  expdp scott/tiger schemas=SCOTT exclude=TABLE:"= 'BONUS'" directory=TEST_DIR dumpfile=SCOTT.dmp logfile=expdpSCOTT.log
  • expdp scott/tiger TABLES=SCOTT.EMP EXCLUDE=STATISTICS DIRECTORY=datapump DUMPFILE=EMP.dmp LOGFILE=EMP.log
We can exclude/Include index, constraints, statistics instead of INDEX=y,n or constraints=y,n and statistics=none as in old exp/imp

REMAP_SCHEMA: Fromuser/Touser has been replaced by remap_schema in oracle 10g

Syntax: REMAP_SCHEMA=source_schema:target_schema

If the schema you are remapping to does not already exist, the import operation creates it, provided the dump file set contains the necessary CREATE USER metadata and you are importing with enough privileges.
If you do not have enough privileges to perform an import that creates dump files containing the metadata necessary to create a schema, then you must create the target schema before performing the import operation. This is because the dump files do not contain the necessary information for the import to create the schema automatically.
If the import operation does create the schema, then after the import is complete, you must assign it a valid password in order to connect to it. The SQL statement to do this, which requires privileges, is:
SQL> ALTER USER [schema_name] IDENTIFIED BY [new_pswd]
Suppose that you want to map HR schema to Scott schema:
  • expdp SYSTEM/password SCHEMAS=hr DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp
  •  impdp SYSTEM/password DIRECTORY=dpump_dir1 DUMPFILE=hr.dmp REMAP_SCHEMA=hr:scott
NETWORK_LINK

With network mode imports, one doesn't need any intermediate dump files (No more FTP'ing of dump files). Data is exported across a database link and imported directly into the target database.
SQL> create user sigma_local identified by sigma_local;
User created.
SQL> grant connect, resource to sigma_local;
Grant succeeded.
SQL> grant read, write on directory SchemaDump to sigma_local;
Grant succeeded.
SQL> grant create database link to sigma_local;
Grant succeeded.
SQL> create database link old_sigma connect to sigma identified by sigma using 'orcl2';
### Now to import all objects of sigma schema (on remote db) to old_sigma (on local db) use the below command.
impdp sigma_local/sigma_local DIRECTORY=SchemaDump NETWORK_LINK=old_sigma remap_schema=sigma:sigma_local


Stop and restart an expdp/impdp in progress:

· expdp system/sys full=Y exclude=statistics directory=FullDump dumpfile=FullexportDump_stat.dmp logfile=expdpfull_stat.log job_name=SYS_EXPORT_FULL_01
· If you want to pause the job for some time then press CTL+C , type the command given below
Export> STOP_JOB=IMMEDIATE
Are you sure you wish to stop this job ([yes]/no): yes
· Now you want to restart the job then you need to attach the job
1. expdp system/sys attach=SYS_EXPORT_FULL_01
2. Export> START_JOB
3. Export> STATUS=600
4. Export> CONTINUE_CLIENT
The following commands are valid while in interactive mode.
  • · ADD_FILE:Add dumpfile to dumpfile set.
  • · CONTINUE_CLIENT:Return to logging mode. Job will be re-started if idle.
  • · EXIT_CLIENT:Quit client session and leave job running.
  • · FILESIZE:Default filesize (bytes) for subsequent ADD_FILE commands.
  • · HELP:Summarize interactive commands.
  • · KILL_JOB:Detach and delete job.
  • · PARALLEL: Change the number of active workers for current job.PARALLEL=.
  • · START_JOB: Start/resume current job.
  • · STATUS: Frequency (secs) job status is to be monitored where the default (0) will show new status when available.STATUS[=interval]
  • · STOP_JOB:Orderly shutdown of job execution and exits the client.
  • · STOP_JOB=IMMEDIATE performs an immediate shutdown of the Data Pump job.

Friday, 18 May 2012

ORA-25153: Temporary Tablespace is Empty

Got the following error today when trying to execute full export backup command:
exp system/sys file=full_exp2.dmp log=full_exp2.log full=y consistent=y statistics=none buffer=10000000
EXP-00008: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
EXP-00083: The previous problem occurred when calling SYS.LT_EXPORT_PKG.system_info_exp
EXP-00008: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_LOB", line 443
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 571
ORA-06512: at "SYS.DBMS_SCHED_WINDOW_EXPORT", line 14
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_WINDOW_EXPORT.create_exp for object 8879
EXP-00008: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
ORA-06512: at "SYS.DBMS_LOB", line 443
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 571
ORA-06512: at "SYS.DBMS_SCHED_WINDOW_EXPORT", line 14
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_WINGRP_EXPORT.create_exp for object 8881
. exporting pre-schema procedural objects and actions
. exporting cluster definitions
EXP-00056: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
EXP-00056: ORACLE error 25153 encountered
ORA-25153: Temporary Tablespace is Empty
EXP-00000: Export terminated unsuccessfully

Solution:

First step is to check for temp tablespace and assosiation with users.

select username, temporary_tablespace, account_status from dba_users where username not like '%SYS%';

If  temporary_tablespace exists (TEMP) move to step2 to check datafiles assosiated with the tablespace as below:

Issue No data File associated with temp tablespace:
SQl>Select file_name from dba_temp_files;
No row selected
As you can see there is no data file associated with Temp tablespace;this is the reason of the issue.

To solve the issue simply add a datafile to the temp tablespace using the below command:

SQL>Alter tablespace Temp ADD TEMPFILE '/Data/Oracle4/oradata/new12/MyTemp.dbf' size 500M;

Check again to confirm:(Issue Resolved)
SQl>Select file_name from dba_temp_files;

output:  '/Data/Oracle4/oradata/new12/MyTemp.dbf' 






Wednesday, 16 May 2012

Export Data Oracle to CSV


Follow below steps to create a CSV file from a employee table:



SQL> set colsep ";"
SQL> set heading off
SQL> set line 1000
SQL> spool employee.csv

SQL> select * from employee

      7782;CLARK     ;MANAGER  ;        10
      7839;KING      ;PRESIDENT;        11
      7934;MILLER    ;CLERK    ;        15

SQL>spool off