Solved

Backup SQL Server 2008 database to 2005 Using Csharp

Posted on 2011-02-17
8
293 Views
Last Modified: 2012-05-11
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
Comment
Question by:ankouny
  • 4
  • 4
8 Comments
 
LVL 16

Accepted Solution

by:
EvilPostIt earned 250 total points
ID: 34916210
You cannot restore a backup that is from a newer version of SQL. It just wont work.
0
 

Author Comment

by:ankouny
ID: 34916370
But it works if use the wizard to export the database from 2008 to 2005 or 2000
0
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34916395
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
 

Author Comment

by:ankouny
ID: 34916445
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34916469
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
 

Author Comment

by:ankouny
ID: 34916530
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
 
LVL 16

Expert Comment

by:EvilPostIt
ID: 34916595
So your trying to write a program to just copy a database. That sounds like it going to be tricky.
0
 

Author Comment

by:ankouny
ID: 34916629
yea to copy a sql server 2008 database to a sql server 2005 database on a different server.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now