Import and export

Backup, Recover, Import, Export, Datapump, etc
Post Reply
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

Environment information:
* Oracle version: 10g
* Operating system: Windows 2000 Server
* Test environment

Hello friends, I found several topics here and tutorials on the internet about import and export but some doubts remain, we go to them:
Well I have a 10g express bank for testing environment, the DBA of my company left and the bomb It was released in my hand now because I'm a curious rs.
Good I have to make an import of a DMP of the original bank for our environment.

in the DMP to be imported to change and add fields to the table, I made a normal import and the tables have not changed, so I will have to drop all the tables for the same being imported Correctly, the doubt is: What is the correct procedure? Knowing what users do you have in the bank should I drop users or tables, packages, views and etc?

I also made a backup of the Bank by doubts, then I performed the following procedures:

Dropei users, I created the users to be imported, I gave Grant At all, and I did the import. After importing most views, procedures and packages do not compile, they indicated to check the Synonimos and the Grants of the Users.
Any idea to help me?

obg for all help and patience to read this text.
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

I forgot to inform you that the bank is a replica
DBA_LUCAS
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Wed, 27 Oct 2010 1:49 pm
Location: Belo Horizonte - MG

I did not understand very well, but after generating the .dmp file is only to create a user, give permission and import the file ...

Select all

CREATE USER nome IDENTIFIED BY senha DEFAULT TABLESPACE nome;
(Creating a User)

Select all

GRANT DBA TO nome;
(giving DBA permission to him)

Select all

execute dbms_utility.compile_schema('NOME_DA_BASE_MAIUSCULA');
(Compiles all invalid objects of a certain base)
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

Come on.

This database is a replica of the original Bank for testing, Etzou updating the new replica base.
I made an import only of specific users fromUser x, y, z ... touser x, yx ...
but doing the abilities of my outdated bank do not alter for the number of Fields of the original bank ie not the inclusion of new fields etc. Therefore ask the procedure to change tables with import.

Thanks for your help friend, if possible for someone to help me I am grateful.
My msn is available tmabem areas.sergio@hotmail.com

Thank you.
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

I tried the dbms_execute and even then the mistakes remain, I think it's because some decks have changed and I did not get script sent upgrading by import.

obg for help, any idea?
DBA_LUCAS
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Wed, 27 Oct 2010 1:49 pm
Location: Belo Horizonte - MG

Look, if you made any change in the "production" bank and you want the same changes to occur in a "test" bank, you have two options:

1) You apply a script on the bank "Test" of all changes made to the "production" seat ...

2) You make a current backup of the "production" bank and matter it in a new user to be the bank "TEST"...
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

Hmmm
So I create a user like DBA user and all privileges and with him I do an import full, right?

Sorry for ignorance, but I really am newbie at bankm
DBA_LUCAS
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Wed, 27 Oct 2010 1:49 pm
Location: Belo Horizonte - MG

This, I will detail for you step by step:

1) Generate Export of the "Production" bank.

Select all

exp usuario/senha@instancia file=nome_do_arquivo.dmp log=nome_do_log.log owner=usuario_a_ser_exportado 

2) Create a user and give DBA privileges for him

Select all

create user nome_do_usuario identified by tecnisa default tablespace nome_da_tablespace  
grant dba to nome_do_usuario
3) Import the base generated in step 1.

Select all

imp usuario/senha@instancia file=nome_do_arquivo.dmp log=imp_nome_do_log.log fromuser=usuario_exportado touser=usuario_que_importa ignore=y commit=y statistics=none full=n
DBA_LUCAS
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Wed, 27 Oct 2010 1:49 pm
Location: Belo Horizonte - MG

Knowing the oxen to see if it helps you ... hauhauha

Select all

exp producao/1234@orcl file=c:/bases/exp_producao.dmp log=c:/bases/exp_producao.log owner=producao 
 
create user teste identified by 123456 default tablespace geral 
 
grant dba to teste  
 
imp teste/123456@orcl file=c:/bases/exp_producao.dmp log=c:/bases/imp_teste.log fromuser=producao touser=teste ignore=y commit=y statistics=none
keitarow
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 2
Joined: Sat, 29 Aug 2009 2:56 pm
Location: RIO DE JANEIRO
HEY HEY I WANNA BE A DBA!!!!

Can I just get one more doubt?
If errors occur on the bank, I stno a backup of the Oradata folder with the bank and such. Restoring the folder backup backup or precise utilization and configuring the RMAN before.
I am afraid boy to zicate the whole bank ...

Pox Lucas You are helping a lot, thank you very much, I hope someday have a little doconhemia as I like yours, with my own effort.
Thanks again.
DBA_LUCAS
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Wed, 27 Oct 2010 1:49 pm
Location: Belo Horizonte - MG

I do not have much knowledge about RMAN N! but if you do the exp to generate a .dmp file, this file is your backup, ai qualquer zica q der in the bank is só reinstall the oracle and import this file, then everything back to normal ... remembering that each change You should generate a current backup and keep it ...
I also consider myself a beginner, I started to fiddle with Oracle and SQL has 1 year only, and I'm still in the 3rd period of Computer Science, Agent Helping is that everyone grow !!!
User avatar
sergio.areas
Rank: Estagiário Sênior
Rank: Estagiário Sênior
Posts: 14
Joined: Mon, 15 Mar 2010 9:12 pm
Location: Rio de Janeiro
Contact:
Vergonha não é o não saber e sim não procurar uma solução

Obg Lucas
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests