Import and export DB

Backup, Recover, Import, Export, Datapump, etc
Post Reply
juniorboll
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 17
Joined: Fri, 04 Nov 2011 10:12 am

Personal I have an Oracle database here and made a backup of it using this command.

Select all

exp system/senha file=program.dmp log = program.log full = Y
until then all well did the backup without any error, but as I am now learning to mess with Oracle I am in doubt to restore this backup on another machine, I installed Oracle 11g xe from zero, until ai beleza, but on hr q I give the

Select all

imp system/senha file=program.dmp log= import.log full=y
command

can not import anything, do I have to create the manual tablespace? Or is it a better way to back up to restore elsewhere?
User avatar
adrianoturbo
Moderador
Moderador
Posts: 393
Joined: Thu, 20 Mar 2008 4:09 pm
Location: Brasília
Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Brother, from 11G, EXP / IMP is no longer supported, appear that you use DataPump utility to generate a new Dump from the source via Data Pump Export and import it by the Data Pump Import in this new destination.
[[0] http://docs.oracle.com/cd/E11882_01/ser ... m#SUTIL300
Good luck !!!
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP



Complementing adrianoturbo information, I found some interesting articles, describing how it would be possible to clon Oracle schemas with the help of "Data Pump" and "DB Links ".
http://www.nazimcricket.com/wiki/index. ... hema_(11g) http://www.krenger.ch/blog/datapump-wit ... -examples/

Hugs,

Sergio Coutinho
juniorboll
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 17
Joined: Fri, 04 Nov 2011 10:12 am

I tried to do the EXPDP but gave these mistakes here.

Select all

expdp junior/senha table=users directory=teste_dir dumpfile=users.dmp logfile=users.log content=metadata_only
[IMG http://farm4.staticflickr.com/3710/1234 ... c06f_b.jpg[/img]
juniorboll
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 17
Joined: Fri, 04 Nov 2011 10:12 am

Just to remember that the import is from version 10g.
juniorboll
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 17
Joined: Fri, 04 Nov 2011 10:12 am

Oops Sorry I did not find the place to exclude MSG EXPORT is in 10G Express and Import is in 11g Express
User avatar
adrianoturbo
Moderador
Moderador
Posts: 393
Joined: Thu, 20 Mar 2008 4:09 pm
Location: Brasília
Adriano Alves
---Para cada problema dificil existe uma solução simples.----

Brother, the Oracle 10G Express database can only grow up to 4GB and 11G Express up 11GB.
This error is being displayed, because the Dump you made from 11g is higher than 4GB.
I remember that more or less in 2005 Oracle, Microsoft and IBM launched their banks in this model XE and the biggest problem would be the bank's growth limitation, now until that improved, because Oracle almost tripled the capacity in 11g xe.
For Small Applications The Express Model is a marvel.
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Juniorboll,

As Adrianoturbo explained, you have in 10g xe a maximum limit of 4 gb in user data [ / i].

If you have data or "unnecessary" tables in your 10g xe you can try to remove this information and reduce the size of user tablespaces (eg, users or any Another tablespace created by you - but not System, Sysaux, Temp, Undo) so that everything is below 4 GB.

This Oracle Forums link gives you some tips on how to proceed with this: https://community.oracle.com/thread/2213158?tstart=0 In it, the forista tries to reduce the size of the Tablespace Users (give up syntax).

later, is to re-try the Export via DataPump, hoping that the size of the "user data" are below 4 GB.

If all this does not work, and you just want to simply recreate a schema in 11g xe with the populated tables of your 10g xe, you can try to do the following (Lusitana suggestion):

Select all

 - No ORACLE 11g XE, crie um usuário de schema (pode ser o mesmo do seu 10g XE) e recrie as tabelas que você  
   precisa. Mas crie as mesmas sem constraints de FK. A estrutura destas tabelas precisa ser exatamente igual 
  à existente no 10g XE; 
- No ORACLE 10g XE, crie um DBLINK publico (veja topicos aqui no glufke) apontando para o servidor 11g XE. Use  
  como usuário de conexão do DBLINK o mesmo usuário que você criou no 11g XE; 
- No ORACLE 11g XE, execute para cada tabela um comando de insert na tabela correspondente do DBLINK.  
  Digamos que você criou um DBLINK publico de nome DB_11G e precisa carregar uma TABELA_A. A sintaxe 
  aproximada do comando seria: 
   
   INSERT INTO TABELA_A@DB_11G SELECT * FROM TABELA_A; 
   COMMIT; 
    
- Faça isso para todas as tabelas do 10g XE. 
- Ao final do processo, volte à base 11g XE e recrie as constraits de FK destas tabelas;

Hugs,

Sergio Coutinho
juniorboll
Rank: Programador Júnior
Rank: Programador Júnior
Posts: 17
Joined: Fri, 04 Nov 2011 10:12 am

I understood, but the EXPDB that I am doing and is presenting the error is in Oracle 10G Express, it is approximately 2,8gb busy. I'll give you a read on the links that you passed me and do another try.
User avatar
stcoutinho
Moderador
Moderador
Posts: 850
Joined: Wed, 11 May 2011 5:15 pm
Location: são Paulo - SP

Juniorboll,

I have consulted some metalink topics, and the documentation informs that the maximum size for Oracle XE would be:

- 4GB for user data ( ex: Users);
- 5GB for all Datafiles, being from users or not (eg Users, System, Sysaux, Temp, Undo);

You can try to reduce your XE tablespaces as a whole. There is for example an option on the "Web Administration Screen" of Oracle XE that allows you to compact the storage of the tablespaces.
See this link:
http://docs.oracle.com/cd/B25329_01/doc ... torage.htm
There are some metalink notes that can help you in this theme as they inform some Oracle XE tables that could be cleaned to Release space.

Select all

Oracle XE Database Has Reached the 4GB Limitation Causing Login Failure Or Inability to Save Data (ORA-12952) (Doc ID 1347255.1) 
ORA- 12952: The Request Exceeds The Maximum Allowed Database Size of 4 GB (Doc ID 1235263.1) 
How To Run a Query/Command/Script in Oracle 10G XE (Doc ID 982225.1)

Hugs and good luck,

Sergio Coutinho
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest