DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Regarding control files

  1. #1
    Join Date
    Aug 2008
    Posts
    4

    Unhappy Regarding control files

    Hi, I have to compare two tables in different database.The table contains more than 1 million records and i have to automate this process and one more thing i cannot creat database link..Please provide me solution for this.
    Thanks in advance..

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    export table from database-1
    import table into database-2 into a different schema
    compare them

    Not that difficult, huh?

    By the way... why your post's title is "Regarding control files"? don't get it.
    Last edited by PAVB; 08-06-2008 at 08:22 AM.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Aug 2008
    Posts
    4
    Hi PAVB,Thanks for your immediate response.Actually to import the table data into temp table i have to create control file and do it,but i am not getting how to do this with out manual work.Can u please help me by providing script to creat control file and insert it into temp table?

  4. #4
    Join Date
    Feb 2004
    Location
    UK
    Posts
    56
    you don't need a control file if you you imp/exp. Suggest you looked the syntax

  5. #5
    Join Date
    Aug 2008
    Posts
    4
    Hi citldba, I dont hahe the syntax.Can u please provide the format of the syntax to create control file..
    Thanks in advance

  6. #6
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    just type exp help=y and imp help=y
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  7. #7
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by RAJ LEE
    Hi PAVB,Thanks for your immediate response.Actually to import the table data into temp table i have to create control file and do it,but i am not getting how to do this with out manual work.Can u please help me by providing script to creat control file and insert it into temp table?
    Are you thinking about a control file for using sql loader?

  8. #8
    Join Date
    Aug 2008
    Posts
    4
    Hi gandolf,

    ya i want the syntax to export the date into control file using sqlldr.
    Hey iam new to this field, please dot mind if i ask silly explinations.

    I Thank all of them for ur immediate replies.

  9. #9
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Quote Originally Posted by RAJ LEE
    Hi gandolf,

    ya i want the syntax to export the date into control file using sqlldr.
    Hey iam new to this field, please dot mind if i ask silly explinations.

    I Thank all of them for ur immediate replies.
    If you really want to use SQL Loader then you would need to use something else to get the data from the source database. you can use DBMS_OUTPUT or just write a sql script that would output the data in the format that you want. You can do something like the following

    Code:
    SET ECHO OFF
    SET FEEDBACK 0
    SET PAGESIZE 0
    SET TRIMSPOOL ON
    SPOOL /tmp/data.dat
    SELECT '"'||col1||'","'||col2||'","'||col3||'","'||coletc||'"'
      FROM your_table
     WHERE col1='ABC';
    SPOOL OFF;
    You would then create a control file yourself telling sql loader how the data is stored, how to load the data what ever you need to happen. You use a sql loader control file just so you don't have to fit everything in at the command line.

    you can also do an exp/imp.

  10. #10
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by RAJ LEE
    ya i want the syntax to export the date into control file using sqlldr.
    my eyes! my eyes!

    Sir!... Sir!... stay away from that keyboard!... move away! slowly!
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width