• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Backup SQL Server 2008 database to 2005 Using Csharp

Hello,
I was trying to backup sql server 2008 to sql server 2005 and get the .bak file and put it somewhere on the server, but It is not working for me.
Please notice the sql server 2008 is on one server and the 2005 is on a different one, and I'm trying to extract the code from the 2005 server.
Please help !!!
0
ankouny
Asked:
ankouny
  • 4
  • 4
1 Solution
 
EvilPostItCommented:
You cannot restore a backup that is from a newer version of SQL. It just wont work.
0
 
ankounyAuthor Commented:
But it works if use the wizard to export the database from 2008 to 2005 or 2000
0
 
EvilPostItCommented:
Yes thats an export wizard not a backup restore. With the wizard it is effectivly creating the db schema and then streaming the data in which you could techincally do to oracle. But still oracle would not be able to restore a SQL Server backup.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ankounyAuthor Commented:
Ok then How can I export database from 2008 to 2005 or 2000 programmatically using csharp or vb.net using the same process the wizard does.
0
 
EvilPostItCommented:
With the wizard you can get it to create an SSIS package to transfer the data, with regards to the schema, this is pretty simple if you have visual studio 2010 as you can just do a schema compare with an empty database and use that script!
0
 
ankounyAuthor Commented:
I cant do a schema because the program is going to be like this:
the user will choose the database that he will export it and each database is different from the other.
I don't know if there is a way I can do that Or I can run a script inside the application to create a new database in the sql server 2005 and insert into it the data.
0
 
EvilPostItCommented:
So your trying to write a program to just copy a database. That sounds like it going to be tricky.
0
 
ankounyAuthor Commented:
yea to copy a sql server 2008 database to a sql server 2005 database on a different server.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now