Export oracle database schema without data

Hi All,
cany any one tell me how to export oracle database schema without data using exp command not datapump command.

step 1
type exp help=y
step 2
read the output
step 3 now run exp ... rows=n
Life can be so easy when you aren't lazy. You don't waste time asking to be spoon fed by others if you can do something yourself in 2 seconds.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • Get export of cpce schema without data

    exp system/***** file=cpceschema.dmp log=cpceschema.log rows=n full=n owner=cpce
    Is this the right command, for getting export of cpce schema without data, i took export and Export terminated successfully with warnings, need suggestions.

    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP and Data Mining options
    Export done in WE8ISO8859P15 character set and AL16UTF16 NCHAR character set
    server uses WE8ISO8859P1 character set (possible charset conversion)
    Note: table data (rows) will not be exported
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user CPCE
    . exporting PUBLIC type synonyms
    . exporting private type synonyms
    . exporting object type definitions for user CPCE
    About to export CPCE's objects ...
    . exporting database links
    . exporting sequence numbers
    . exporting cluster definitions
    . about to export CPCE's tables via Conventional Path ...
    . . exporting table COLLECTEDDATA
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table CONFIGURATION
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table DCCONTEXT
    . . exporting table DCPLAN
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table EQUIPMENT
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table FDCCONTEXT
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table GPCDATA
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table INDICATOR
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table JOBS_TBL
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table MAINTENANCEERROR
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table MAINTENANCELOG
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table MESCONTEXT
    . . exporting table MODULE
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table PARTITIONMETHOD1
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table PARTITIONMETHOD2
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table RECIPE
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table REQUESTS_TBL
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table STRATEGY
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table TREATEDDATA
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . . exporting table VARIABLE
    EXP-00091: Exporting questionable statistics.
    EXP-00091: Exporting questionable statistics.
    . exporting synonyms
    . exporting views
    . exporting stored procedures
    . exporting operators
    . exporting referential integrity constraints
    . exporting triggers
    . exporting indextypes
    . exporting bitmap, functional and extensible indexes
    . exporting posttables actions
    . exporting materialized views
    . exporting snapshot logs
    . exporting job queues
    . exporting refresh groups and children
    . exporting dimensions
    . exporting post-schema procedural objects and actions
    . exporting statistics
    Export terminated successfully with warnings.

  • Hi Experts ,how to copy database schema without data ? very urgent...*****

    Hi experts,
    How to copying database without Data.
    Its very urgent..pls help out me......
    Thanks
    Vijay

    Use Transfer database objects task or script the objects out using generate scripts wizard from SSMS and apply them in the new server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Export oracle database failure

    hi all,
    i have just exported oracle database and result failure. I export oracle database as user SYS, and in the logfile i receive a error as follow:
    EXP-00084: Unexpected DbmsJava error -1031 at step 6661
    EXP-00008: ORACLE error 1031 encountered
    ORA-01031: insufficient privileges
    EXP-00000: Export terminated unsuccessfully
    before i exported, i met this error and then i compile the package that invalid, but now after the packages are compiled , unsucessful export db.
    can anyone help me handle this error?
    thanks,

    TyL wrote:
    hi all,
    after i connect the DB through exp utility without "as sysdba", then i exported the DB sucessful.
    so can anyone explain for me why is?
    Edited by: TyL on Oct 18, 2011 1:25 AM
    >hi all,
    after i connect the DB through exp utility without "as sysdba", then i exported the DB sucessful.
    so can anyone explain for me why is?
    Edited by: TyL on Oct 18, 2011 1:25 AM
    I"m not sure why, but the utilities manual has been consistent over the versions about warning not to export "as sysdba"
    *From the 8i Utilities* (http://download.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch01.htm#16802)
    Invoking Export As SYSDBA
    SYSDBA is used internally and has specialized functions; its behavior is not the same as for generalized users. Therefore, you should not typically need to invoke Export as SYSDBA. However, there may be a few situations in which you need to do so, usually at the request of Oracle technical support.
    *From the 9.2 Utilities* (http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm#1004778)
    Invoking Export As SYSDBA
    SYSDBA is used internally and has specialized functions; its behavior is not the same as for generalized users. Therefore, you should not typically need to invoke Export as SYSDBA, except in the following situations:
    - At the request of Oracle technical support
    - When using transportable tablespaces (see Transportable Tablespaces)
    *From the 10.2 Utilities *(http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#sthref2155)
    Invoking Export and Import As SYSDBA
    SYSDBA is used internally and has specialized functions; its behavior is not the same as for generalized users. Therefore, you should not typically need to invoke Export or Import as SYSDBA, except in the following situations:
    - At the request of Oracle technical support
    - When importing a transportable tablespace set

  • Can't access tables in other Oracle database schemas

    Hi. We got our Oracle database admin to install APEX in our Oracle database. She created a login and schema for my Oracle database user so that I could work with APEX a little. Here's the information on the version of APEX we have installed:
    Database Version Information
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I've found that my user is only able to access Oracle tables within my own Oracle database schema. Most of our main tables are in 3 other schemas and I'd need access to all tables in all these schemas. Right now whenever I encounter a drop list of values for Schema, only by own schema is available in the list of values.
    Is there something our Admin can do to make these tables in other schemas available to my user account?

    Sharpe,
    This documentation should point you in the right direction. It will show you how to add multiple schemas to a workspace.
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21678/adm_mg_wrkspc.htm#CHDBDCCJ
    Cheers,
    Tyson Jouglet

  • Webcast : Sun Oracle Database Machine for Data Warehousing  -Sep 30 noon ET

    Sun Oracle Database Machine for Data Warehousing
    Jean Pierre Dijcks - Data Warehousing Product Mgmt, Oracle
    https://conference.oracle.com/imtapp/app/cmn_jm_hub.uix?mID=158101510
    On September 15 Oracle announced the second generation of its Database Machine, making an already strong data warehousing product significantly stronger. The new version runs on Sun hardware and offers important new features. Available in full rack, half rack, quarter rack, and basic unit configurations, the Sun Oracle Database Machine can add value at many data warehouse size levels.
    The Sun Oracle Database Machine runs on Oracle Database 11g Release 2 and has new features such as:
    Smart Flash Cache memory for ultra-fast IO - Reaches 50GB/second on a full rack system (not even counting gains from compression)
    Exadata Hybrid Columnar Compression - Maximizes data capacity and reduces scan times: think 500GB/second IO
    Offloaded Data Mining Scoring - Moves CPU-intensive operations from database servers to Exadata storage servers
    In-Memory Parallel Execution - Caches full tables in memory across nodes: foundation of new TPC-H world record
    There is plenty more we have not listed above, so come to this TechCast and learn about this major new product!
    Audio Dial-In: 888 967 2253 Audio Meeting ID: 572994 Audio Meeting Passcode: 334451
    Web Conference: https://conference.oracle.com/imtapp/app/cmn_jm_hub.uix?mID=158101510
    Compatibility Check: If you have not used Oracle's web conference system before, please ensure your system
    compatibility by going to https://conference.oracle.com/imtapp/app/nuf_sys.uix

    Is there any way, one could get this webcast to watch it offline?
    regards

  • Oracle Database Procedure Execute Date/Time

    Hi,
    Is possible to track the Oracle Database Procedure Execute Date/Time?

    Is possible to track the Oracle Database Procedure Execute Date/Time?Yes, by using
    CONNECT sys/password AS SYSDBA
    AUDIT EXECUTE PROCEDURE BY fireid BY ACCESS;

  • Sample Oracle database Schema and sample training SQL

    Hi,
    I am running a windows 7, 64 bit machine. I am looking for sample oracle database schema with sample SQL queries and exercises(tutorial). Can you please point me in the right direction where I can download both.
    Thanks for your time and help.

    sb92075 wrote:
    ssk1974 wrote:
    Hi,
    I am running a windows 7, 64 bit machine. I am looking for sample oracle database schema with sample SQL queries and exercises(tutorial). Can you please point me in the right direction where I can download both.
    Thanks for your time and help.
    http://www.lmgtfy.com/?q=oracle+sample+schema
    LOL!!!!

  • How to export app +underlying schema(and data)

    Hi
    I am trying to export my application and its underlying tables to a new system .
    I want to know if it can be done together and not seperately..(export app and then export each table)
    Is there away to package the app and its underlying repository?
    Thanks

    No....
    You will have to do them seperately as there is no logical connection between the application and the tables.
    Your application just has the access to use those tables and does not "own" any of them.
    a) Oracle database tables/ application tables
    You can export the entire schema and all the objects and data in that schema using the export and import utilities.
    All these objects are owned by the schema (eg. emp under scott) and hence are related logically.
    b) Oracle apex metadata tables.
    All the information about apex objects is stored as metadata in database tables (FLOWS_0300 is a schema).
    So, if you install Oracle apex on a new machine, all these repository tables will be created.
    When you create applications / objects, these tables will have metadata for those applications.
    Hope this helps,
    Rajesh.

  • Export the database schema / structure to a file server

    I would really appreciate if any of you can share your experience on the following:
    Database-1: Oracle 8i/9i and
    Database-2: SQL Server v65/7/2000
    I am looking for a solution to extract all the database schema/structure to a pre-defined location onto a file server. I wanted to configure this thru CRON job (for unix) and Microsoft Task Scheduler (for Windows). Also this solution should work for all databases (must work with Oracle, SQL Server). The exported file should not be just a dump file (.dmp), assuming only oracle can read .dmp file.
    What are the possible ways to accomplish this.
    I am sure, several tools would be available to accomplish this (like Embarcadero Change Manager), but solution may not be cost effective. Can we write any program to accomplish the same?
    I would really appreciate your inputs.
    Thanks, Madhavi

    I am doing this job using bcp command on sql serverwhich create dat file and then transport the file to oracle server in location where I have created an external table.
    I belive that there is server level compatability which need no external programe or software. My one fellow told me once and when I got him I shall reply

  • How to create an XML Oracle database schema

    Hello, I would like to generate an XML file that contains the schema of my Oracle database so that I can reference one file for column names and table names. I do not need any data from the tables, just the basic layout: e.g. table names, their respective column names.
    Obviously, I would like the ability to generate this file each time we make changes to our DB, so its generation will be an ongoing process.
    My question is, what is the best tool for this? Or the most widely accepted? Can anyone help with this?

    To get database metadata as XML use Oracle Web RowSet.
    //Import the oracle.jdbc.rowset package classes.
    import oracle.jdbc.rowset.*;
    //Import the RowSetMetaDataImpl class.
    import javax.sql.rowset.RowSetMetaDataImpl;
    //Create a OracleWebRowSet class.
    OracleWebRowSet webRowSet=new OracleWebRowSet();
    /*Set the datasource name to obtain a JDBC connection with the database. The datasource name is configured in the data-sources.xml file. */
    webRowSet.setDataSourceName("jdbc/OracleDataSource");
    //Set the SQL query command for the OracleWebRowSet class object.
    webRowSet.setCommand(selectQuery);
    selectQuery is a SQL command variable which is input from a JSP.
    //Set the username and password to obtain a JDBC connection.
    webRowSet.setUsername("OE");
    webRowSet.setPassword("<password>");
    //Set the read only, fetch size and max rows attributes of the OracleWebRowSet object.
    webRowSet.setReadOnly(false);
    webRowSet.setFetchSize(5);
    webRowSet.setMaxRows(3);
    //Run the SQL command specified in the setCommand() method.
    webRowSet.execute();
    /*A Web RowSet gets created consisting of the data retrieved from the database table with the SQL query.  Generate an XML document from the WebRowSet.*/
    OutputStreamWriter output=new OutputStreamWriter( new
    FileOutputStream(new File("c:/output/output.xml")));
    webRowSet.writeXml(output);

  • How to change database schema of data source in OWB?

    Hi,
    Could someone give me hint about my questions:
    I select many database schema in TOAD. like "My Shema" and "All Schema".
    If I create a Oracle Data Source in OWB 10.2. All tables/viewsI can see only from "My Schema" (I think it is default), However, I need to connect "All Scema". There are lots of prod tables/views. I don't know how to set/change/config in OWB even reading guide.
    Thanks a lot
    Lan

    Lan,
    You can ONE of the following:
    1. Dbl click the src/target module and go to metadata location tab and select a location that has the details pointing to the different schema (If you do not have this location created, you may have to create one).
    2. Create synonyms in "My Schema" to objects from other schema. Then try to import the tables again. This time you will be able to see the other tables (the icon will be different for synonyms.)
    Hope That Helps.
    Kaushik.

  • How to compare two oracle database schemas

    hi all,
    i want to compare and find out differences between two oracle databases. The comparison should be made on between table definition,table data,primary and foreign keys, packages and functions.
    Is there any management console or tool embedded in the oracle enterprise manger?
    it is really appreciate if anyone can point me towards wright direction asap.

    Hi ,
    This script would help u a lot in comparing 2 schemas and generate a report on them.
    Script:
    This script will compare two Oracle schemas and generate a report of
    discrepencies and this script has been used against Oracle 7.3.4, 8.0.5,
    REM and 8.1.7 databases, but it should also work with other versions.
    REM
    REM Please note that the following schema object types and attributes are
    REM not compared by this script at this time:
    REM
    REM cluster definitions
    REM comments on tables and columns
    REM nesting, partition, IOT, and temporary attributes of tables
    REM snapshots/materialized views, logs, and refresh groups
    REM foreign function libraries
    REM object types
    REM operators
    REM indextypes
    REM dimensions
    REM auditing information
    REM new schema attributes added for Oracle 9i
    REM
    REM Version 02-04-2002
    REM
    PROMPT
    PROMPT Schema Comparison
    PROMPT =================
    PROMPT
    PROMPT Run this script while connected to one Oracle schema. Enter the Oracle
    PROMPT username, password, and SQL*Net / Net8 service name of a second schema.
    PROMPT This script will compare the two schemas and generate a report of
    PROMPT differences.
    PROMPT
    PROMPT A temporary database link and table will be created and dropped by
    PROMPT this script.
    PROMPT
    ACCEPT schema CHAR PROMPT "Enter username for remote schema: "
    ACCEPT passwd CHAR PROMPT "Enter password for remote schema: " HIDE
    ACCEPT tnssvc CHAR PROMPT "Enter SQL*Net / Net8 service for remote schema: "
    PROMPT
    ACCEPT report CHAR PROMPT "Enter filename for report output: "
    SET FEEDBACK OFF
    SET VERIFY OFF
    CREATE DATABASE LINK rem_schema CONNECT TO &schema IDENTIFIED BY &passwd
    USING '&tnssvc';
    SET TRIMSPOOL ON
    SPOOL &report
    SELECT SUBSTR (RPAD (TO_CHAR (SYSDATE, 'mm/dd/yyyy hh24:mi:ss'), 25), 1, 25)
    "REPORT DATE AND TIME"
    FROM SYS.dual;
    COL local_schema FORMAT a35 TRUNC HEADING "LOCAL SCHEMA"
    COL remote_schema FORMAT a35 TRUNC HEADING "REMOTE SCHEMA"
    SELECT USER || '@' || C.global_name local_schema,
    A.username || '@' || B.global_name remote_schema
    FROM user_users@rem_schema A, global_name@rem_schema B, global_name C
    WHERE ROWNUM = 1;
    SET PAGESIZE 9999
    SET LINESIZE 250
    SET FEEDBACK 1
    SET TERMOUT OFF
    PROMPT
    REM Object differences
    REM ==================
    COL object_name FORMAT a30
    PROMPT SUMMARY OF OBJECTS MISSING FROM LOCAL SCHEMA
    SELECT object_type, COUNT (*)
    FROM
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name)
    FROM user_objects@rem_schema
    MINUS
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name)
    FROM user_objects
    GROUP BY object_type
    ORDER BY object_type;
    PROMPT SUMMARY OF EXTRANEOUS OBJECTS IN LOCAL SCHEMA
    SELECT object_type, COUNT (*)
    FROM
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name)
    FROM user_objects
    WHERE object_type != 'DATABASE LINK'
    OR object_name NOT LIKE 'REM_SCHEMA.%'
    MINUS
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name)
    FROM user_objects@rem_schema
    GROUP BY object_type
    ORDER BY object_type;
    PROMPT OBJECTS MISSING FROM LOCAL SCHEMA
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name) object_name
    FROM user_objects@rem_schema
    MINUS
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name) object_name
    FROM user_objects
    ORDER BY object_type, object_name;
    PROMPT EXTRANEOUS OBJECTS IN LOCAL SCHEMA
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name) object_name
    FROM user_objects
    WHERE object_type != 'DATABASE LINK'
    OR object_name NOT LIKE 'REM_SCHEMA.%'
    MINUS
    SELECT object_type,
    DECODE (object_type,
    'INDEX', DECODE (SUBSTR (object_name, 1, 5),
    'SYS_C', 'SYS_C', object_name),
    'LOB', DECODE (SUBSTR (object_name, 1, 7),
    'SYS_LOB', 'SYS_LOB', object_name),
    object_name) object_name
    FROM user_objects@rem_schema
    ORDER BY object_type, object_name;
    PROMPT OBJECTS IN LOCAL SCHEMA THAT ARE NOT VALID
    SELECT object_name, object_type, status
    FROM user_objects
    WHERE status != 'VALID'
    ORDER BY object_name, object_type;
    REM Table differences
    REM =================
    PROMPT TABLE COLUMNS MISSING FROM ONE SCHEMA
    PROMPT (NOTE THAT THIS REPORT DOES NOT LIST DISCREPENCIES IN COLUMN ORDER)
    SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
    FROM user_tab_columns@rem_schema
    WHERE table_name IN
    SELECT table_name
    FROM user_tables
    MINUS
    SELECT table_name, column_name, 'Local' "MISSING IN SCHEMA"
    FROM user_tab_columns
    UNION ALL
    SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
    FROM user_tab_columns
    WHERE table_name IN
    SELECT table_name
    FROM user_tables@rem_schema
    MINUS
    SELECT table_name, column_name, 'Remote' "MISSING IN SCHEMA"
    FROM user_tab_columns@rem_schema
    ORDER BY 1, 2;
    COL schema FORMAT a15
    COL nullable FORMAT a8
    COL data_type FORMAT a9
    COL data_length FORMAT 9999 HEADING LENGTH
    COL data_precision FORMAT 9999 HEADING PRECISION
    COL data_scale FORMAT 9999 HEADING SCALE
    COL default_length FORMAT 9999 HEADING LENGTH_OF_DEFAULT_VALUE
    PROMPT DATATYPE DISCREPENCIES FOR TABLE COLUMNS THAT EXIST IN BOTH SCHEMAS
    SELECT table_name, column_name, 'Remote' schema,
    nullable, data_type, data_length, data_precision, data_scale,
    default_length
    FROM user_tab_columns@rem_schema
    WHERE (table_name, column_name) IN
    SELECT table_name, column_name
    FROM user_tab_columns
    MINUS
    SELECT table_name, column_name, 'Remote' schema,
    nullable, data_type, data_length, data_precision, data_scale,
    default_length
    FROM user_tab_columns
    UNION ALL
    SELECT table_name, column_name, 'Local' schema,
    nullable, data_type, data_length, data_precision, data_scale,
    default_length
    FROM user_tab_columns
    WHERE (table_name, column_name) IN
    SELECT table_name, column_name
    FROM user_tab_columns@rem_schema
    MINUS
    SELECT table_name, column_name, 'Local' schema,
    nullable, data_type, data_length, data_precision, data_scale,
    default_length
    FROM user_tab_columns@rem_schema
    ORDER BY 1, 2, 3;
    REM Index differences
    REM =================
    COL column_position FORMAT 999 HEADING ORDER
    PROMPT INDEX DISCREPENCIES FOR INDEXES THAT EXIST IN BOTH SCHEMAS
    SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
    B.column_name, B.column_position
    FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
    WHERE A.index_name IN
    SELECT index_name
    FROM user_indexes
    AND B.index_name = A.index_name
    AND B.table_name = A.table_name
    MINUS
    SELECT A.index_name, 'Remote' schema, A.uniqueness, A.table_name,
    B.column_name, B.column_position
    FROM user_indexes A, user_ind_columns B
    WHERE B.index_name = A.index_name
    AND B.table_name = A.table_name
    UNION ALL
    SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
    B.column_name, B.column_position
    FROM user_indexes A, user_ind_columns B
    WHERE A.index_name IN
    SELECT index_name
    FROM user_indexes@rem_schema
    AND B.index_name = A.index_name
    AND B.table_name = A.table_name
    MINUS
    SELECT A.index_name, 'Local' schema, A.uniqueness, A.table_name,
    B.column_name, B.column_position
    FROM user_indexes@rem_schema A, user_ind_columns@rem_schema B
    WHERE B.index_name = A.index_name
    AND B.table_name = A.table_name
    ORDER BY 1, 2, 6;
    REM Constraint differences
    REM ======================
    PROMPT CONSTRAINT DISCREPENCIES FOR TABLES THAT EXIST IN BOTH SCHEMAS
    SET FEEDBACK OFF
    CREATE TABLE temp_schema_compare
    database NUMBER(1),
    object_name VARCHAR2(30),
    object_text VARCHAR2(2000),
    hash_value NUMBER
    DECLARE
    CURSOR c1 IS
    SELECT constraint_name, search_condition
    FROM user_constraints
    WHERE search_condition IS NOT NULL;
    CURSOR c2 IS
    SELECT constraint_name, search_condition
    FROM user_constraints@rem_schema
    WHERE search_condition IS NOT NULL;
    v_constraint_name VARCHAR2(30);
    v_search_condition VARCHAR2(32767);
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO v_constraint_name, v_search_condition;
    EXIT WHEN c1%NOTFOUND;
    v_search_condition := SUBSTR (v_search_condition, 1, 2000);
    INSERT INTO temp_schema_compare
    database, object_name, object_text
    VALUES
    1, v_constraint_name, v_search_condition
    END LOOP;
    CLOSE c1;
    OPEN c2;
    LOOP
    FETCH c2 INTO v_constraint_name, v_search_condition;
    EXIT WHEN c2%NOTFOUND;
    v_search_condition := SUBSTR (v_search_condition, 1, 2000);
    INSERT INTO temp_schema_compare
    database, object_name, object_text
    VALUES
    2, v_constraint_name, v_search_condition
    END LOOP;
    CLOSE c2;
    COMMIT;
    END;
    SET FEEDBACK 1
    SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
    '9', NULL) constraint_name,
    'Remote' schema, A.constraint_type, A.table_name,
    A.r_constraint_name, A.delete_rule, A.status, B.object_text
    FROM user_constraints@rem_schema A, temp_schema_compare B
    WHERE A.table_name IN
    SELECT table_name
    FROM user_tables
    AND B.database (+) = 2
    AND B.object_name (+) = A.constraint_name
    MINUS
    SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
    '9', NULL) constraint_name,
    'Remote' schema, A.constraint_type, A.table_name,
    A.r_constraint_name, A.delete_rule, A.status, B.object_text
    FROM user_constraints A, temp_schema_compare B
    WHERE B.database (+) = 1
    AND B.object_name (+) = A.constraint_name
    UNION ALL
    SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
    '9', NULL) constraint_name,
    'Local' schema, A.constraint_type, A.table_name,
    A.r_constraint_name, A.delete_rule, A.status, B.object_text
    FROM user_constraints A, temp_schema_compare B
    WHERE A.table_name IN
    SELECT table_name
    FROM user_tables@rem_schema
    AND B.database (+) = 1
    AND B.object_name (+) = A.constraint_name
    MINUS
    SELECT REPLACE (TRANSLATE (A.constraint_name,'012345678','999999999'),
    '9', NULL) constraint_name,
    'Local' schema, A.constraint_type, A.table_name,
    A.r_constraint_name, A.delete_rule, A.status, B.object_text
    FROM user_constraints@rem_schema A, temp_schema_compare B
    WHERE B.database (+) = 2
    AND B.object_name (+) = A.constraint_name
    ORDER BY 1, 4, 2;
    REM Database link differences
    REM =========================
    PROMPT DATABASE LINK DISCREPENCIES
    COL db_link FORMAT a40
    SELECT db_link, 'Remote' schema, username, host
    FROM user_db_links@rem_schema
    MINUS
    SELECT db_link, 'Remote' schema, username, host
    FROM user_db_links
    UNION ALL
    SELECT db_link, 'Local' schema, username, host
    FROM user_db_links
    WHERE db_link NOT LIKE 'REM_SCHEMA.%'
    MINUS
    SELECT db_link, 'Local' schema, username, host
    FROM user_db_links@rem_schema
    ORDER BY 1, 2;
    REM Sequence differences
    REM ====================
    PROMPT SEQUENCE DISCREPENCIES
    SELECT sequence_name, 'Remote' schema, min_value, max_value,
    increment_by, cycle_flag, order_flag, cache_size
    FROM user_sequences@rem_schema
    MINUS
    SELECT sequence_name, 'Remote' schema, min_value, max_value,
    increment_by, cycle_flag, order_flag, cache_size
    FROM user_sequences
    UNION ALL
    SELECT sequence_name, 'Local' schema, min_value, max_value,
    increment_by, cycle_flag, order_flag, cache_size
    FROM user_sequences
    MINUS
    SELECT sequence_name, 'Local' schema, min_value, max_value,
    increment_by, cycle_flag, order_flag, cache_size
    FROM user_sequences@rem_schema
    ORDER BY 1, 2;
    REM Private synonym differences
    REM ===========================
    PROMPT PRIVATE SYNONYM DISCREPENCIES
    SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
    FROM user_synonyms@rem_schema
    MINUS
    SELECT synonym_name, 'Remote' schema, table_owner, table_name, db_link
    FROM user_synonyms
    UNION ALL
    SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
    FROM user_synonyms
    MINUS
    SELECT synonym_name, 'Local' schema, table_owner, table_name, db_link
    FROM user_synonyms@rem_schema
    ORDER BY 1, 2;
    REM PL/SQL differences
    REM ==================
    PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
    PROMPT THAT EXIST IN BOTH SCHEMAS
    SELECT name, type, COUNT (*) discrepencies
    FROM
    SELECT name, type, line, text
    FROM user_source@rem_schema
    WHERE (name, type) IN
    SELECT object_name, object_type
    FROM user_objects
    MINUS
    SELECT name, type, line, text
    FROM user_source
    UNION ALL
    SELECT name, type, line, text
    FROM user_source
    WHERE (name, type) IN
    SELECT object_name, object_type
    FROM user_objects@rem_schema
    MINUS
    SELECT name, type, line, text
    FROM user_source@rem_schema
    GROUP BY name, type
    ORDER BY name, type;
    PROMPT SOURCE CODE DISCREPENCIES FOR PACKAGES, PROCEDURES, AND FUNCTIONS
    PROMPT THAT EXIST IN BOTH SCHEMAS (CASE INSENSITIVE COMPARISON)
    SELECT name, type, COUNT (*) discrepencies
    FROM
    SELECT name, type, line, UPPER (text)
    FROM user_source@rem_schema
    WHERE (name, type) IN
    SELECT object_name, object_type
    FROM user_objects
    MINUS
    SELECT name, type, line, UPPER (text)
    FROM user_source
    UNION ALL
    SELECT name, type, line, UPPER (text)
    FROM user_source
    WHERE (name, type) IN
    SELECT object_name, object_type
    FROM user_objects@rem_schema
    MINUS
    SELECT name, type, line, UPPER (text)
    FROM user_source@rem_schema
    GROUP BY name, type
    ORDER BY name, type;
    REM Trigger differences
    REM ===================
    PROMPT TRIGGER DISCREPENCIES
    SET FEEDBACK OFF
    TRUNCATE TABLE temp_schema_compare;
    DECLARE
    CURSOR c1 IS
    SELECT trigger_name, trigger_body
    FROM user_triggers;
    CURSOR c2 IS
    SELECT trigger_name, trigger_body
    FROM user_triggers@rem_schema;
    v_trigger_name VARCHAR2(30);
    v_trigger_body VARCHAR2(32767);
    v_hash_value NUMBER;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO v_trigger_name, v_trigger_body;
    EXIT WHEN c1%NOTFOUND;
    v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
    v_trigger_body := UPPER (v_trigger_body);
    v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
    INSERT INTO temp_schema_compare (database, object_name, hash_value)
    VALUES (1, v_trigger_name, v_hash_value);
    END LOOP;
    CLOSE c1;
    OPEN c2;
    LOOP
    FETCH c2 INTO v_trigger_name, v_trigger_body;
    EXIT WHEN c2%NOTFOUND;
    v_trigger_body := REPLACE (v_trigger_body, ' ', NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(9), NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(10), NULL);
    v_trigger_body := REPLACE (v_trigger_body, CHR(13), NULL);
    v_trigger_body := UPPER (v_trigger_body);
    v_hash_value := dbms_utility.get_hash_value (v_trigger_body, 1, 65536);
    INSERT INTO temp_schema_compare (database, object_name, hash_value)
    VALUES (2, v_trigger_name, v_hash_value);
    END LOOP;
    CLOSE c2;
    END;
    SET FEEDBACK 1
    SELECT A.trigger_name, 'Local' schema, A.trigger_type,
    A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
    referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
    A.status, B.hash_value
    FROM user_triggers A, temp_schema_compare B
    WHERE B.object_name (+) = A.trigger_name
    AND B.database (+) = 1
    AND A.table_name IN
    SELECT table_name
    FROM user_tables@rem_schema
    MINUS
    SELECT A.trigger_name, 'Local' schema, A.trigger_type,
    A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
    referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
    A.status, B.hash_value
    FROM user_triggers@rem_schema A, temp_schema_compare B
    WHERE B.object_name (+) = A.trigger_name
    AND B.database (+) = 2
    UNION ALL
    SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
    A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
    referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
    A.status, B.hash_value
    FROM user_triggers@rem_schema A, temp_schema_compare B
    WHERE B.object_name (+) = A.trigger_name
    AND B.database (+) = 2
    AND A.table_name IN
    SELECT table_name
    FROM user_tables
    MINUS
    SELECT A.trigger_name, 'Remote' schema, A.trigger_type,
    A.triggering_event, A.table_name, SUBSTR (A.referencing_names, 1, 30)
    referencing_names, SUBSTR (A.when_clause, 1, 30) when_clause,
    A.status, B.hash_value
    FROM user_triggers A, temp_schema_compare B
    WHERE B.object_name (+) = A.trigger_name
    AND B.database (+) = 1
    ORDER BY 1, 2, 5, 3;
    REM View differences
    REM ================
    PROMPT VIEW DISCREPENCIES
    SET FEEDBACK OFF
    TRUNCATE TABLE temp_schema_compare;
    DECLARE
    CURSOR c1 IS
    SELECT view_name, text
    FROM user_views;
    CURSOR c2 IS
    SELECT view_name, text
    FROM user_views@rem_schema;
    v_view_name VARCHAR2(30);
    v_text VARCHAR2(32767);
    v_hash_value NUMBER;
    BEGIN
    OPEN c1;
    LOOP
    FETCH c1 INTO v_view_name, v_text;
    EXIT WHEN c1%NOTFOUND;
    v_text := REPLACE (v_text, ' ', NULL);
    v_text := REPLACE (v_text, CHR(9), NULL);
    v_text := REPLACE (v_text, CHR(10), NULL);
    v_text := REPLACE (v_text, CHR(13), NULL);
    v_text := UPPER (v_text);
    v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
    INSERT INTO temp_schema_compare (database, object_name, hash_value)
    VALUES (1, v_view_name, v_hash_value);
    END LOOP;
    CLOSE c1;
    OPEN c2;
    LOOP
    FETCH c2 INTO v_view_name, v_text;
    EXIT WHEN c2%NOTFOUND;
    v_text := REPLACE (v_text, ' ', NULL);
    v_text := REPLACE (v_text, CHR(9), NULL);
    v_text := REPLACE (v_text, CHR(10), NULL);
    v_text := REPLACE (v_text, CHR(13), NULL);
    v_text := UPPER (v_text);
    v_hash_value := dbms_utility.get_hash_value (v_text, 1, 65536);
    INSERT INTO temp_schema_compare (database, object_name, hash_value)
    VALUES (2, v_view_name, v_hash_value);
    END LOOP;
    CLOSE c2;
    END;
    SET FEEDBACK 1
    SELECT A.view_name, 'Local' schema, B.hash_value
    FROM user_views A, temp_schema_compare B
    WHERE B.object_name (+) = A.view_name
    AND B.database (+) = 1
    AND A.view_name IN
    SELECT view_name
    FROM user_views@rem_schema
    MINUS
    SELECT A.view_name, 'Local' schema, B.hash_value
    FROM user_views@rem_schema A, temp_schema_compare B
    WHERE B.object_name (+) = A.view_name
    AND B.database (+) = 2
    UNION ALL
    SELECT A.view_name, 'Remote' schema, B.hash_value
    FROM user_views@rem_schema A, temp_schema_compare B
    WHERE B.object_name (+) = A.view_name
    AND B.database (+) = 2
    AND A.view_name IN
    SELECT view_name
    FROM user_views
    MINUS
    SELECT A.view_name, 'Remote' schema, B.hash_value
    FROM user_views A, temp_schema_compare B
    WHERE B.object_name (+) = A.view_name
    AND B.database (+) = 1
    ORDER BY 1, 2;
    REM Job queue differences
    REM =====================
    COL what FORMAT a30
    COL interval FORMAT a30
    PROMPT JOB QUEUE DISCREPENCIES
    SELECT what, interval, 'Remote' schema
    FROM user_jobs@rem_schema
    MINUS
    SELECT what, interval, 'Remote' schema
    FROM user_jobs
    UNION ALL
    SELECT what, interval, 'Local' schema
    FROM user_jobs
    MINUS
    SELECT what, interval, 'Local' schema
    FROM user_jobs@rem_schema
    ORDER BY 1, 2, 3;
    REM Privilege differences
    REM =====================
    PROMPT OBJECT-LEVEL GRANT DISCREPENCIES
    SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
    FROM user_tab_privs@rem_schema
    WHERE (owner, table_name) IN
    SELECT owner, object_name
    FROM all_objects
    MINUS
    SELECT owner, table_name, 'Remote' schema, grantee, privilege, grantable
    FROM user_tab_privs
    UNION ALL
    SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
    FROM user_tab_privs
    WHERE (owner, table_name) IN
    SELECT owner, object_name
    FROM all_objects@rem_schema
    MINUS
    SELECT owner, table_name, 'Local' schema, grantee, privilege, grantable
    FROM user_tab_privs@rem_schema
    ORDER BY 1, 2, 3;
    PROMPT SYSTEM PRIVILEGE DISCREPENCIES
    SELECT privilege, 'Remote' schema, admin_option
    FROM user_sys_privs@rem_schema
    MINUS
    SELECT privilege, 'Remote' schema, admin_option
    FROM user_sys_privs
    UNION ALL
    SELECT privilege, 'Local' schema, admin_option
    FROM user_sys_privs
    MINUS
    SELECT privilege, 'Local' schema, admin_option
    FROM user_sys_privs@rem_schema
    ORDER BY 1, 2;
    PROMPT ROLE PRIVILEGE DISCREPENCIES
    SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
    FROM user_role_privs@rem_schema
    MINUS
    SELECT granted_role, 'Remote' schema, admin_option, default_role, os_granted
    FROM user_role_privs
    UNION ALL
    SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
    FROM user_role_privs
    MINUS
    SELECT granted_role, 'Local' schema, admin_option, default_role, os_granted
    FROM user_role_privs@rem_schema
    ORDER BY 1, 2;
    SPOOL OFF
    SET TERMOUT ON
    PROMPT
    PROMPT Report output written to &report
    SET FEEDBACK OFF
    DROP TABLE temp_schema_compare;
    DROP DATABASE LINK rem_schema;
    SET FEEDBACK 6
    SET PAGESIZE 20
    SET LINESIZE 80

  • Can I get the oracle database schema in xml like the original ones

    Working with Migration Workbench I've found that uses an XML
    with the schema of the original database. I'm asking if I can
    get the equivalent XML for the oracle model.
    I need a quickly way of get in XML the structure (not data) of
    my oracle databases.
    Any idea?

    Ok, it is unclear on what is happening here.
    Are you saying that when the webclient gets the data that it is not honoring the quote characters? Or the processing of the data buffer is causing issues?
    This is what I see the of your example text which is trying to be parse out:
    <a onmouseover="EnterContent('ToolTip','תווית על בגד: &rsquo;&rsquo;תן לאישה לכבס. זה תפקידה&rsquo;&rsquo;','<u><span style=color:#000099;>כתב: Spook בתאריך: 08.03.15 שעה: 22:11</span></u><br>מחאת טוויטר קמה בעקבות תוויות שוביניסטיות שהדפיסה חברת אופנה באינדונזיה לפיהן תפקיד הכביסה מוטל על האישה. החברה התנצלה אך כנראה רק עשתה רק יותר נזק לע...'); Activate();">";
    It appears to me that the  escapes `&rsquo;` does not have matching `&ldquo;` anywhere within the tooltip. So it appears that the page properly places left quotes in when processing the page, but the raw html has broken text.
    Hence a garbage in, garbage out situation.
    William Wegerson (www.OmegaCoder.Com)

  • Exporting whole database (10GB) using Data Pump export utility

    Hi,
    I have a requirement that we have to export the whole database (10GB) using Data Pump export utility because it is not possible to send the 10GB dump in a CD/DVD to the system vendor of our application (to analyze few issues we have).
    Now when i checked online full export is available but not able to understand how it works, as we never used this data pump utility, we use normal export method. Also, will data pump reduce the size of the dump file so it can fit in a DVD or can we use Parallel Full DB export utility to split the files and include them in a DVD, is it possible.
    Please correct me if i am wrong and kindly help.
    Thanks for your help in advance.

    You need to create a directory object.
    sqlplus user/password
    create directory foo as '/path_here';
    grant all on directory foo to public;
    exit;
    then run you expdp command.
    Data Pump can compress the dumpfile if you are on 11.1 and have the appropriate options. The reason for saying filesize is to limit the size of the dumpfile. If you have 10G and are not compressing and the total dumpfiles are 10G, then by specifying 600MB, you will just have 10G/600MB = 17 dumpfiles that are 600MB. You will have to send them 17 cds. (probably a few more if dumpfiles don't get filled up 100% due to parallel.
    Data Pump dumpfiles are written by the server, not the client, so the dumpfiles don't get created in the directory where the job is run.
    Dean

Maybe you are looking for