I am trying to move a SQL 2005 db into a SQL 2000 db. I understand that I can not use a backup then restore as the backup file format has changed. I have had some success using the Export function on the SQL 2005 db to move the daata rows but I have not had any success in moving the views and stored procedures from the SQL 2005 db to the SQL 2000 db. If I have not been able to use the Import/Export on SQL 2000 at all.
How can I do this?
Thanks
Have you tried scripting them out to text files using SMO?
Here is a catalog query you can use to extract the SQL source text directly:
select definition + CHAR(13) + CHAR(10) + 'GO' + CHAR(13) + CHAR(10)
from sys.sql_modules as m
join sys.objects as o
on m.object_id=o.object_id
where o.type in ('P', 'V')
go
Regards
|||I have an inconsistency problem regarding exporting the data from SQL 2k5 back to SQL 2k.
Let me give the details of the things ive done before exporting the data.
In 2k5, There is an existing database called Accounting database. Luckily i have the old copy of the same database which i can restore to 2k. I restore the old copy to my 2k.The important things for me is to transfer the tables from 2k5 to 2k without any changes in the data and from there i could move on.
In 2k , i restore the old copy and generate scripts from the tables itself for the drop and create the tables. The reason i do this is to remove the data completely from the tables.
In 2k5 i register the instance of my 2k.
From an instance of my 2k5 together with the registered instance of 2k, the export begins.
after exporting the data.
1. identity values of my tables was restarted to 1.
2. tmstamp colums is not allowing to export
Exporting data from 2k is never been easy.
Any guess whats goin on in here ?
No comments:
Post a Comment