Home » RDBMS Server » Server Administration » What will be the fastest way to move a db data to another db(has data)? (Oracle 10.2.0.4, RHEL 5.5)
What will be the fastest way to move a db data to another db(has data)? [message #523545] |
Mon, 19 September 2011 05:33  |
snowball
Messages: 229 Registered: April 2006 Location: China
|
Senior Member |

|
|
Hi, guys
I have a requirement from our client.
There is two database A and B.
They has the same DB software version with the same platform.
Assume that we wanna to merge all the data in A db into B db.
What will be the most fastest solution for this scenario?
PS: B db has some data.
I wanna to try use transport tablespaces, but I am worrying about the pl/sql objects, such as package, function, procedure, trigger.
Any idea?
Thanks very much.
BR,
Milo
|
|
|
|
|
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #523601 is a reply to message #523568] |
Mon, 19 September 2011 08:37   |
snowball
Messages: 229 Registered: April 2006 Location: China
|
Senior Member |

|
|
cookiemonster wrote on Mon, 19 September 2011 19:50snowball wrote on Mon, 19 September 2011 11:52PL/SQL objects, procedures, function, trigger,etc.
No, A db and B db are not the same branch.
That answers my first question but not the other two.
Do they have equivalents in the other DB? If so which version do you want?
1. What do you means equivalents? You means they have same definition? If so, no.
2. If the first question is what you mean, then i don't have the version to keep in both site. 
Thanks,
Milo
[Updated on: Mon, 19 September 2011 08:49] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #523691 is a reply to message #523687] |
Mon, 19 September 2011 23:09   |
snowball
Messages: 229 Registered: April 2006 Location: China
|
Senior Member |

|
|
BlackSwan wrote on Tue, 20 September 2011 11:19>In short, the original schemas in DB B can not be changed according to this merging, the conflict schemas, in DB A should be adjusted.
Forgive me, but what exactly does "adjusted" mean with regards to SQL & schemas?
How will you or I or anyone recognize when correct solution has been posted?
"Adjust" means rename the conflict objects , developers will also modify the sql according to this situation.
Such as, there is a conflict name "proc_fetch_product" in DB B, so it may need to renamed with "proc_fetch_product_1" in DB A before or during merging.
If it's still not clear, please tell me which items you wanna to know or give me a example. 
Thanks.
Milo
[Updated on: Mon, 19 September 2011 23:12] Report message to a moderator
|
|
|
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #523784 is a reply to message #523741] |
Tue, 20 September 2011 07:20   |
 |
Baranor
Messages: 83 Registered: September 2011 Location: Netherlands
|
Member |
|
|
Well, yes and no... you can store the relevant information in tables , import the tables into the new DB (i.e. source code, names, tables but not information et all) and write a package to check this info against objects in the new DB and rename if be, and then automatically update your tables with the new name ( and re-process a package or procedure if the renaming means it has to be re-done due to a change in a related package)... but its a hell of a lot of work, and unless you have thousands upon thousands of objects or have to do this on a regular basis, you're better off by doing it manually and then importing the data.
However, if done well then this system would be generic, in that you can grab a schema and export it via seperate tables, import tables and then compare. We use a similar system to roll out patches, but we only compare tables and keys, we simply overwrite all the packages, triggers and synonyms. There will be copious use of DBMS_SQL however, so you'd better know how to handle that, and having a good knowledge of all the relevant views also helps.
[Updated on: Tue, 20 September 2011 07:22] Report message to a moderator
|
|
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #523880 is a reply to message #523784] |
Tue, 20 September 2011 21:14   |
snowball
Messages: 229 Registered: April 2006 Location: China
|
Senior Member |

|
|
Baranor wrote on Tue, 20 September 2011 20:20Well, yes and no... you can store the relevant information in tables , import the tables into the new DB (i.e. source code, names, tables but not information et all) and write a package to check this info against objects in the new DB and rename if be, and then automatically update your tables with the new name ( and re-process a package or procedure if the renaming means it has to be re-done due to a change in a related package)... but its a hell of a lot of work, and unless you have thousands upon thousands of objects or have to do this on a regular basis, you're better off by doing it manually and then importing the data.
However, if done well then this system would be generic, in that you can grab a schema and export it via seperate tables, import tables and then compare. We use a similar system to roll out patches, but we only compare tables and keys, we simply overwrite all the packages, triggers and synonyms. There will be copious use of DBMS_SQL however, so you'd better know how to handle that, and having a good knowledge of all the relevant views also helps.
It seems that a little bit complicate for me. But, it's a still look like a convient solution.
Thanks.
|
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #523940 is a reply to message #523880] |
Wed, 21 September 2011 04:04   |
 |
Baranor
Messages: 83 Registered: September 2011 Location: Netherlands
|
Member |
|
|
snowball wrote on Tue, 20 September 2011 21:14Baranor wrote on Tue, 20 September 2011 20:20Well, yes and no... you can store the relevant information in tables , import the tables into the new DB (i.e. source code, names, tables but not information et all) and write a package to check this info against objects in the new DB and rename if be, and then automatically update your tables with the new name ( and re-process a package or procedure if the renaming means it has to be re-done due to a change in a related package)... but its a hell of a lot of work, and unless you have thousands upon thousands of objects or have to do this on a regular basis, you're better off by doing it manually and then importing the data.
However, if done well then this system would be generic, in that you can grab a schema and export it via seperate tables, import tables and then compare. We use a similar system to roll out patches, but we only compare tables and keys, we simply overwrite all the packages, triggers and synonyms. There will be copious use of DBMS_SQL however, so you'd better know how to handle that, and having a good knowledge of all the relevant views also helps.
It seems that a little bit complicate for me. But, it's a still look like a convient solution.
Thanks.
Basically what you do is copy most of Oracle's Data Dictionary into seperate tables and then write code to compare and update. But it depends on your requirements, like I said... its not worth it for a one-off. I work for a company where constant patching and expanding of the software is normal, and then you need a better delivery system that does the job every time.
|
|
|
|
Re: What will be the fastest way to move a db data to another db(has data)? [message #524115 is a reply to message #523940] |
Wed, 21 September 2011 22:12  |
snowball
Messages: 229 Registered: April 2006 Location: China
|
Senior Member |

|
|
Baranor wrote on Wed, 21 September 2011 17:04snowball wrote on Tue, 20 September 2011 21:14Baranor wrote on Tue, 20 September 2011 20:20Well, yes and no... you can store the relevant information in tables , import the tables into the new DB (i.e. source code, names, tables but not information et all) and write a package to check this info against objects in the new DB and rename if be, and then automatically update your tables with the new name ( and re-process a package or procedure if the renaming means it has to be re-done due to a change in a related package)... but its a hell of a lot of work, and unless you have thousands upon thousands of objects or have to do this on a regular basis, you're better off by doing it manually and then importing the data.
However, if done well then this system would be generic, in that you can grab a schema and export it via seperate tables, import tables and then compare. We use a similar system to roll out patches, but we only compare tables and keys, we simply overwrite all the packages, triggers and synonyms. There will be copious use of DBMS_SQL however, so you'd better know how to handle that, and having a good knowledge of all the relevant views also helps.
It seems that a little bit complicate for me. But, it's a still look like a convient solution.
Thanks.
Basically what you do is copy most of Oracle's Data Dictionary into seperate tables and then write code to compare and update. But it depends on your requirements, like I said... its not worth it for a one-off. I work for a company where constant patching and expanding of the software is normal, and then you need a better delivery system that does the job every time.
Hi, Baranor
It should be the one-off moving as far as I know. But it's good to know there is a reusable solution. 
Thanks,
Milo
|
|
|
Goto Forum:
Current Time: Sun Feb 23 15:33:17 CST 2025
|