LorneCash
asked on
How can I create an exact copy of an oracle database in MS SQL 2008 Standard
Or what is the best way? I had an Idea to create linked servers and that once linked I could find a stored proceedure somewhere that would run and get all the table names and data and create them on my MS SQL 2008 Server. I only want a snapshot to be taken I do not need the data to be updated at all.
What about CTAS? I don't know SQL Server that well so I'm not sure it will work, but I would think it should.
You should be able to do something like:
create table <tab> ... as select * from <tab>@<link>;
You could wrap that in a procedure that did a select on user_tables@<link> to loop through all the tables.
You should be able to do something like:
create table <tab> ... as select * from <tab>@<link>;
You could wrap that in a procedure that did a select on user_tables@<link> to loop through all the tables.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>How can I create an exact copy of an oracle database in MS SQL 2008 Standard<<
You will not be able to create an exact copy. Something similar perhaps, but not exactly the same.
You will not be able to create an exact copy. Something similar perhaps, but not exactly the same.
ASKER
I think I need to be more specific... All I need is the tables populated with the data no code, no users and no permissions just tables with the same number of columns and the same number of rows that contain the same data.
If you have linked the databases then: Then johnsone's post in http:#a35198971
or insert into table (select * from linked_table)
Do have DTS (Data Transformation Services) with sql server?
If they aren't linked you can create a delimited flat file.
or insert into table (select * from linked_table)
Do have DTS (Data Transformation Services) with sql server?
If they aren't linked you can create a delimited flat file.
ASKER
SSMA is the way to go in this case
There is an Oracle package: dbms_metadata and a function called get_ddl in the newer versions of Oracle.
This will extract the structures. I've not heard of a utility that will port the code automatically.