Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle SQL Developer copy database step by step

I'm having big trouble in copying an Oracle DB to the same server but with another name, to use as a development DB.

I'm used to SQL Server, I'm new to Oracle (11g).

I wanted to use the 'Database copy' from SQL Developer, but I'm getting errors all the way. First it was about missing tablespaces. Then when I manually created them in my new empty DB the errors were about missing users. I wanted to create the users manually, but then I first needed to create missing roles. When all that was done, it failed on missing indexes...

How do I copy everything I need with 'Database copy'?

Any advice is greatly appreciated!

like image 289
SonOfGrey Avatar asked Nov 07 '12 14:11

SonOfGrey


People also ask

How do I copy a table from one Database to another in Oracle SQL Developer?

When copying between Oracle databases, you should use SQL commands (CREATE TABLE AS and INSERT) or you should ensure that your columns have a precision specified. The USING clause specifies a query that names the source table and specifies the data that COPY copies to the destination table.

How do I export a Database in Oracle SQL Developer?

Using the main menu, select Tools->Database Export. An Export wizard will open. At the top of the screen, enter a directory and file name.


1 Answers

SQL Developer copy will only copy objects between schemas. Do you want to just make a copy of a schema? Or a whole new database, including all schemas?

Judging by your question, I'm assuming the latter. If so, RMAN "database duplication" may help you.

See http://www.oracle-base.com/articles/11g/duplicate-database-using-rman-11gr2.php at Tim Hall's excellent site.

like image 195
Colin 't Hart Avatar answered Oct 09 '22 00:10

Colin 't Hart