DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: import question

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    import question

    I have a full export dump.
    I need to import a couple of owners.

    I want to import the user data, but also want that "the import" create the owner in the database for me.
    Or that the import generate a create user scripts like the indexfile clause that can give me the create table scripts.
    Because i have no idea what are the role/privilege assign to those users and there is a lot os them.

    I do not want to do a full import because i dont have the datafile directory that those tablespace points to on my server. And i just want to import 4-5 owners, not all 15 of them.

  2. #2
    Join Date
    Sep 2001
    Posts
    200
    Quote Originally Posted by steeve123
    I have a full export dump.
    I need to import a couple of owners.

    I want to import the user data, but also want that "the import" create the owner in the database for me.
    Or that the import generate a create user scripts like the indexfile clause that can give me the create table scripts.
    Because i have no idea what are the role/privilege assign to those users and there is a lot os them.

    I do not want to do a full import because i dont have the datafile directory that those tablespace points to on my server. And i just want to import 4-5 owners, not all 15 of them.
    1/
    import does not create users/owners
    2/
    if you want to create the tables first then you can do a dry export ie rows=no and run it.
    3/ you should be concerned about whether you have the same tablespaces in your destination as from the source and not datafiles..import looks for tablespaces not datafiles.
    4/
    if you exported the data with grants=yes then you just need to create the users and import would give them the privs they held on the tables at the export source.
    modify this create to create the users...
    spool cr_user.out
    select 'CREATE USER '||USERNAME||' IDENTIFIED BY VALUES '||''''||PASSWORD ||''''||' DEFAULT TABLESPACE '||DEFAULT_TABLESPACE||' TEMPORARY TABLESPACE '||TEMPORARY_TABLESPACE||';' from dba_users where username not like 'SYS%';
    spool off
    the run the import with option users=...import should prompt you to supply the values for users, you enter the users/owners (remember these are not the users you are giving the privs to)
    Life is what is happening today while you were planning tomorrow.

  3. #3
    Join Date
    Nov 2000
    Posts
    440
    Thanks for the info.


    Another question:

    i have another full export with no rows in it.


    The database was like 20gig.

    I want to import into my database, but the problem it's that it's inserting empty 2gb tables. I want them take minimum space.


    It's for my laptop, dont have 20gb space on disk.

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    You'll need to edit the INITIAL and NEXT extent values for each table in the dump file.
    Assistance is Futile...

  5. #5
    Join Date
    Sep 2001
    Posts
    200
    Quote Originally Posted by steeve123
    Thanks for the info.


    Another question:

    i have another full export with no rows in it.


    The database was like 20gig.

    I want to import into my database, but the problem it's that it's inserting empty 2gb tables. I want them take minimum space.


    It's for my laptop, dont have 20gb space on disk.
    you might edit the INITIAL and NEXT but you would still need 20g of space if your data is that much and you want it all. All the editing does does to the INITIAL and NEXT is to reduce your extent sizes so that you can easily find contiguous empty blocks in the tablespace/datafiles
    Life is what is happening today while you were planning tomorrow.

  6. #6
    Join Date
    Mar 2004
    Location
    DC,USA
    Posts
    650
    Quote Originally Posted by steeve123
    I want to import into my database, but the problem it's that it's inserting empty 2gb tables. I want them take minimum space.
    Truncate/move tables to regain space.
    "What is past is PROLOGUE"

  7. #7
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    Quote Originally Posted by ndisang
    you might edit the INITIAL and NEXT but you would still need 20g of space if your data is that much and you want it all. All the editing does does to the INITIAL and NEXT is to reduce your extent sizes so that you can easily find contiguous empty blocks in the tablespace/datafiles

    When he said it was creating 2GB empty tables, I tooks that to mean he was importing with rows=n to create an empty database with the same structure....
    Assistance is Futile...

  8. #8
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    Quote Originally Posted by dbasan
    Truncate/move tables to regain space.
    Which means that he would have to import table by table, otherwise he'd run out of space... and if the next and initial sizes are large (making up the 2GB on their own), then that wouldn't have any effect anyway.
    Assistance is Futile...

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