Trying to fully copy a database into a new one to no avail
Posted: Sat 07 Oct 2006 05:42
im trying to use MySQLDump to achieve this but im finding it very hard to do.
i need to duplicate a "master" database which is on the server into a new database, with everything from triggers to stores procedures.
if i use the .ExportAll = TRUE option to export the triggers and procedures i find i can't actually achieve what i want. the .DumpText shows that when i use ExportAll it has a statement of the sort USE [fromdb] instead of the USE [todb] that i need.
i've tried to play with settings for over an hour, including the .Database setting, .Connection.Database setting, etc. the documentation is actually not very clear on this issue and the Intellisense neither. e.g. if i type MySQLDump.Database, intellisense says "get or set database to dump data from".
so it would make sense to me to have my connection open to my TODATABASE database, assign this connection to the dump, assign the .Database property of the Dump to my FROMDATABASE. this doesnt work like i expect actually.
would you please direct me on how to proceed to achieve this that i want? summing it up: i have a "master" database which i need to duplicate in its entirety to another newly created database, triggers and procedures and all. i would like the dump to have the create database statements for the new db and drop tables that already exist. i also don't want to store the dump in a text file and make modifications to it, i would like it all to be in memory, very fast.
thanks for your help
P
i need to duplicate a "master" database which is on the server into a new database, with everything from triggers to stores procedures.
if i use the .ExportAll = TRUE option to export the triggers and procedures i find i can't actually achieve what i want. the .DumpText shows that when i use ExportAll it has a statement of the sort USE [fromdb] instead of the USE [todb] that i need.
i've tried to play with settings for over an hour, including the .Database setting, .Connection.Database setting, etc. the documentation is actually not very clear on this issue and the Intellisense neither. e.g. if i type MySQLDump.Database, intellisense says "get or set database to dump data from".
so it would make sense to me to have my connection open to my TODATABASE database, assign this connection to the dump, assign the .Database property of the Dump to my FROMDATABASE. this doesnt work like i expect actually.
would you please direct me on how to proceed to achieve this that i want? summing it up: i have a "master" database which i need to duplicate in its entirety to another newly created database, triggers and procedures and all. i would like the dump to have the create database statements for the new db and drop tables that already exist. i also don't want to store the dump in a text file and make modifications to it, i would like it all to be in memory, very fast.
thanks for your help
P