Avatar of Russ Suter
Russ Suter

asked on 

Copy Oracle database from 11g (11.2.0.1.0) to 12c (12.1.0.2.0)

I have an existing Oracle database on a server that I need to copy to a new server. The old server is running version 11g Release 11.2.0.1.0. The new server is running version 12c Release 12.1.0.2.0. I need to keep the current database online but create a duplicate of that database on the new server. Can anyone tell me how this is accomplished?

Please be kind. I'm very familiar with Microsoft SQL Server but know practically nothing about Oracle.
Oracle DatabaseDatabases

Avatar of undefined
Last Comment
Geert G
Avatar of Alex [***Alex140181***]
Alex [***Alex140181***]
Flag of Germany image

Avatar of Russ Suter
Russ Suter

ASKER

I came here looking for help because Oracle docs are hard to follow. I've read pretty much everything you posted links to already and still don't fully understand all the steps. You have references to expdp and imppdp and rman and clonedb. I don't know what any of these tools are.
Hi Russ,

RMAN Recovery and Backup Manager is an Oracle utility, widely used to backup, restore, recover oracle databases.

Please follow steps mentioned in this article, they are pretty straight forward :

http://allthingsoracle.com/upgrading-a-database-using-recovery-manager-rman-duplicate-command-in-oracle-12c/

You still might want to read more about oracle internals to have a better understanding of each step.
Avatar of Russ Suter
Russ Suter

ASKER

Yes, that works for backing up and restoring within the same version but does not seem to cover my case where I need to backup from 11g release 11.2.0.1.0 and restore to 12c.
It will, take backup of database in 11g, preferably cold.

Use DUPLICATE database using backup on 12c with ‘NO OPEN’ mentioned in link.
Once done, run catupgrd.

So all you need is 12c binaries set up , pfile with right location for datafiles,control file and logfiles and Convert parameters need to be set.

I will try to provide you my own RMAN script/steps for 10g to 11g using backup (in my opinion that too should work fine), but I don't have access to it at the moment.
Avatar of Russ Suter
Russ Suter

ASKER

I tried running the backup command using rman and got the following error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 09/22/2016 15:48:
20
ORA-19809: limit exceeded for recovery files
ORA-19804: cannot reclaim 52428800 bytes disk space from 2048576000 limit

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Geert G
Geert G
Flag of Belgium image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
There are basically two options to move the contents of an Oracle11 database to an Oracle12 database:
1. Use backup, restore and upgrade  (RMAN, etc.)
2. Use export and import (DataPump export and DataPump import)

Both options are documented and supported by Oracle, but they have different advantages and disadvantages.  I'll try to summarize those here.

First for the backup, restore and upgrade approach:
Advantages:
1. This is usually the best (or only practical) option for large databases (multiple terabytes in size).
2.  This is usually faster than the export and import approach.
Disadvantages:
1. This can only be used when the O/S is the same (or similar) on the two servers.
2. This will leave any wasted space in tables or indexes (this varies in different Oracle databases depending on the application) so you may keep some performance problems.

Second, for the export and import approach:
Advantages:
1. This will remove and clean up any/all wasted space in tablespaces, tables and indexes.  So, the resulting database may perform significantly faster.
2. This can accommodate a move to a different server O/S.
Disadvantages:
1. The time required for the import may be substantial.  This may take from 2-20 times longer than the export depending on the number of indexes, foreign keys, PL\SQL objects, views, etc. in the system.
2. This is only practical on Oracle databases of small to moderate size, maybe up to a terabyte or two depending a bit on your server and storage hardware.

Both options will require that you install new Oracle software on the new system.  But, depending on which of these two options you choose, you may need both software version installed on the new system (if you use the backup, restore and upgrade option).
Avatar of Russ Suter
Russ Suter

ASKER

@Geert Gruwez

I got as far as trying to log in after creating the new orapwd file but the login is not working. I'm getting:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

Open in new window

I don't know how to get past this issue.
The orapwd file and this error are unrelated.  This error indicates a problem in your connection configuration files.  On the server these are usually: listener.ora and tnsnames.ora, that are usually in the $ORACLE_HOME/network/admin directory.  If you received this error on a client machine, that means that your local tnsnames.ora file doesn't match what the server is set up to accept.  

These files (not: orapwd) are just plain text files that you can view, and edit if necessary with any text editor.  Be careful though if you edit them manually, to not introduce invisible control characters (like Microsoft Word will do) and be aware that the formatting of these files is fussy.

The orapwd file has a totally different purpose and is not used for "normal" database activities.
Avatar of Geert G
Geert G
Flag of Belgium image

You are trying to login with @Dbname

In cmd:
Set oracle_sid=orcl
Sqlplus / as Sysdba

Orcl is THE name of Your database

That should log you in
Avatar of Geert G
Geert G
Flag of Belgium image

In compmgmt.msc in local user groups on the new (and old) server
Add your user to the group oradba

This might also help
The orapwd file is not required.  That is optional.  You can log onto a new Oracle database without creating an orapwd file.  When you installed the database software or when you created the new database (if you did those tasks separately) you were asked to provide passwords for the SYS and SYSTEM users.  Those are the administrator accounts for the database.  You should try to log on with one of those accounts and the password you set up for it.
Or, on many Oracle servers, at a command prompt, as the owner of the Oracle software, you can type:
sqlplus / as sysdba [Enter]
and that will connect you to the database.
Avatar of Russ Suter
Russ Suter

ASKER

I finally got through it and learned quite a lot in the process. Ultimately, after getting around a couple of bumps this step-by-step instruction guide pretty much did the trick. Thanks!
Avatar of Geert G
Geert G
Flag of Belgium image

Well... Some oracle consultants have a jeep for bumpy rides :)
Oracle Database
Oracle Database

Oracle is an object-relational database management system. It supports a large number of languages and application development frameworks. Its primary languages are SQL, PL/SQL and Java, but it also includes support for C and C++. Oracle also has its own enterprise modules and application server software.

81K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo