Can I restore a backup which was on SQL Express to sql server server 2008 without any problems - sql

I am going to do a customer SQL upgrade and they currently have SQL Express and I want to upgrade it to Microsoft SQL server 2008.
Will it be okay to restore the SQL Express backup to Microsoft SQL Server 2008?

First off, the comments seem to mention MySQL. I can see that you edited it to say SQL Express. If it is indeed MS SQL Express then yes, as SMM said it will work.
I have done this a few times before, and it worked just fine. Though rather than a backup/restore I would move the .mdf file.
This is done by detaching the DB from the Express instance and attaching it to the Server 2008 instance; this can be easily done via sqlcmd or the Studio Manager. The steps can vary based on systems(s) setup. As such, I did a google search to see if there existed a step by step guide for this rather than typing a bunch of scenarios as shots in the dark. There are a plethora of them:
I just Googled: move sql express .mdf to sql server 2008
I also found this and it would seem to be a good match for your situation and has good information:
http://www.mipsis.com/help/Moving%20SQL%20Express%20Database%20to%20SQL%20Server.pdf
Let me know how it goes, and if you need specific assistance with the process please follow up.

I have done SQL Express to SQL 2000 and SQL 2005 successfully in the (distant) past. I am sure this will work. I don't remember any specific caveats other than making sure that you don't try to go from a later version of Express to an earlier version of SQL.

Related

How to track change in MS SQL Server 2008

I am new with SQL database, I am build some Automation Tool in MS-Excel , which can read and write data in database contain 160 tables, this database is also write and read by other software(X).
my task is find all changes are done by other software(X), in database table. so same think I can be done with excel.
Practically It is hard to check one by one 160 table.
I really appreciate for help, I was Google on it but not found so much.
sorry if any mistake in my question.
You can use SQL Server Change Tracking in SQL Server 2008 Express Edition. See Features Supported by the Editions of SQL Server 2008 R2.

How can I restore a database backup file (.bak) from SQL Server 2012 into SQL Server 2008 Express?

A database that was originally from SQL Server 2008, was restored into SQL Server 2012. A backup from SQL Server 2012 was made and I am trying to restore it on my local SQL Server 2008 Express. However I get an error 'Specified cast is not valid' (SQLManagerUI).
I have generated an SQL Script from 2012 and set it so that it will generate with compatibility to SQL Server 2008. However it is a large sql file, around 700mb.
I recall before that I had tried to run a script of that size before on my local SQLExpress and also got an error.
Is there a way I can get a "large" database from SQL Server 2012 into SQL Server 2008 Express?
Thanks to Marc and Aaron for providing the answers.
The quick answer is no, it's not possible to restore a backup file from a higher version to a lower version of SQL Server.
A work around would be to generate the scripts to create the database.
You can target the script generation to a lower version.
Please see comments above for more information.
Links:
Why an SQL Server Database from a higher version cannot be restored onto a lower version of SQL Server?
Create Database in SQL Server 2012, Script and Use in 2008?
Couple things to add that might be helpful to folks
When scripting large databases using scripting wizard in SSMS it’s really important to check the execution order and be willing to re arrange it manually. Older versions of SSMS had this problem because they (probably) relied on sp_depends that has a bug.
What I’ve found really useful in such cases are tools like ApexSQL Diff that you can use to read database backups and generate scripts that are in correct execution order.
SQL Server database backup restore on lower version
One thing that none of the methods will catch is the thing Aaron mentioned about using functions specific to higher version.
A better option than using the SSMS scripting wizard is to use a similar tool available on Codeplex called SQL Database Migration Wizard - http://sqlazuremw.codeplex.com/releases/view/32334. You want the latest version v4.x to work with SQL Server 2012.
The tool is originally intended to be used for migrating databases between SQL Server and Azure. However the tool works just as well as between SQL Server and SQL Server. The trick is to set SQL Server rather than Azure as the target in the advanced options.
The reason this is a better option than the SSMS scripting wizard is that it uses BCP for the data transfer rather than TSQL and so is much more efficient.

SQL Server 2008 Web edition

My company is planning to migrate it's intranet/internet based ERP to the latest form of MS SQL Database available.
Presently we are using SQL Server 2000 Professional.
And we are planning to shift to SQL Server 2008 Web edition.
Please tell me whether this is the right step and whether it is feasible or not.
Thank you in advance.
"Please tell me whether this is the right step " - that's something you and your company need to decide.
It is feasible, and in the majority of cases straight forward.
Your first step should be to run the Microsoft SQL Server 2008 Upgrade Advisor
Microsoft SQL Server 2008 R2 Feature Pack contains the Microsoft SQL Server 2008 R2 Upgrade Advisor
Formulate and test a rollback plan
Determine your upgrade window and acceptable downtime.
Ensure database consistency: Run DBCC CHECKDB on databases to be upgraded to ensure that they are in a consistent state before performing the upgrade.
Back up all important files: Back up all SQL Server databases from the instance to be upgraded (including master, model and msdb), data and transaction log files, as well as any application files, script files, extract files, etc. so that you can completely restore them in the event of a failure.
It's both feasible and easy. The path from one version of SQL Server to another is usually pretty simple. Do you have any special stored procedures or reports generated in SQL Server that need to be rewritten/re-imported?
As far as right step - the question is, Why? If it's working, do you really need to mess with it?
If it's for intranet (some app for your internal usage) then consider using SQL 2008 Express edition. It's free and you can use it as an instance running along the full 2000 version. That way you will have some extra features from the full version.
But you have to know that applications running on SQL 2000 may not work on 2008 and they are even more probable not to work on 2008 R2.

New project sql server 2005 or 2008

I'll be starting a new project (asp.net) and I'll be using sql server express. Is there a reason NOT to use sql server 2008?
P.S: I was considering Postgres 8.3 until I did some benchmarking and found out that sql server 2005 express is much faster for my needs (better integration I guess).
If the choice is between SQL Server 2005 and SQL Server 2008 with no legacy compatibility issues, you should probably go with SQL Server 2008. The jump from 2005-2008 is much smaller than the jump from 2000-2005 was and you get three years extra lifespan for your application for free. A similar question was asked in this Stackoverflow post, with a more in-depth discussion of the subject.
A reason you might not have considered: will the production hosting location support SQL Server 2008?
Otherwise there's no reason. In fact, if your still stuck using SQL Server 2005, you should be using the 2008 version of management studio! which still works against older db's
I'd prefer Sql Server 2008 because there are too many "killer" enhancements like table valued parameters, merge statement, on the fly encryption, new datetime parameters etc. Table valued parameter is a life saver improvement. If you ever had to deal with multi row insert operations, you know how painful is to do it with xml nodes or openxml methods. On the other hand, you can pass your recursive datatable as a parameter ( SqlDbType.Structured ) and the pain is gone. It's so obvious that the most exciting feature for me is new table valued parameter.
As a sidenote: DiscountASP is selling, for the same price, 300Mb on SQL2005 and 500Mb on SQL2008. So it turns out that SQL2005 is on a statup path to be considered "old legacy" software.
And it is always good to skip future migrations.
I would go with SQL2008.
I am currently using SQL Server 2008 Express for my dev machine. You could use the new T-SQL and save some good time writing those stored procedures. I have this version of SQL Server 2008 Express installed.
It depends on a lot of factors:
Will you sell installable copies to customers? If so, what kind of database engines does your customer demography have? 2000? 2005? 2008?
Are you going to host it yourself? If so, use whatever you'd like
Are you going to use a 3rd party hosting company? If so, what do they support, and how much does it cost?
Unless you're explicitly going to use 2008 features, I wouldn't worry too much about it since generic T-SQL works on all the versions. It's when you start using the new features you might get into trouble.
Update: It seems that they DO allow sql server 2008 (sales people aren't very good at technical stuff) so I'll be using sql server 2008.
Well I asked my host (I have a vps) and they allow only sql server 2005 express, not sql server 2008 express (which is kinda strange). So I'll go with 2005 for now... Thank you all for your opinions.

Restore SQL Server 2008 DB *to* SQL Server 2005

Got myself in a bit of a pickle here ... working on a CMS project, under the assumption that sql server 2008 was greenlighted as the db of choice. Well it wasn't, we now have to backport all of our content out SQL Server 2008 and into SQL Server 2005.
A simple backup/restore procedure yields: "RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)".
Unfortunately, exporting the data to an excel spreadsheet yields multiple OLE errors which I believe is actually a problem in the db of the cms.
Does anyone out there have other approaches they would like to recommend for this task? Thanks in advance
Use RedGate:
tool for comparing and deploying SQL Server database contents.
You can work with live databases, backups, or SQL scripts in source control. Damaged or missing data can be restored to a single row, without the need for a full database recovery.
SQL Data Compare helps you compare and deploy changes quickly, simply, and with zero errors...
There is no way to do this by default. You can generate scripts for 2008 database on 2008 server and then execute these scripts on 2005 version. Note that you’ll have to manually review scripts and remove all parts that are unique to 2008 version.
Another way is to use third party tools such as Red Gate or ApexSQL Diff (move schema) and ApexSQL Data Diff (move data).
Use the Generate SCripts to create the database and schema and ensure you target SQL Server 2005 and script data.
Rather than do a backup and restore you might try using SQL 2005's Import/Export Data wizard.
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
http://msdn.microsoft.com/en-us/library/ms140052(SQL.90).aspx
I've just hit the same problem and here is how I worked around it.
The problem was to copy a database from an operational SQL Server 2008 database to a new SQL Server 2005 database.
I scripted the database using Management Studio on the 2008 server. I only scripted the database design, not the data. I should add also that the DB only has tables and indexes, so I haven't tried this with any cleverer objects although I can't think why they wouldn't work.
On the 2005 server I created a new database by hand and then ran the script to set up all the tables and indexes.
The in Management Studio back on the 2008 server I used the Export Data wizard to export the data from the 2008 server to the 2005 server. It's currently running and seems quite happy moving the data.
Once all the data is across I'll have a couple of small things left to do - create the users and set-up the security in the 2005 DB, but all-in-all it doesn't look like a bad way of doing it. It's not quite point-and-click but it's not too strenuous.
So it seems that the Copy Database wizard won't work (I think because the package ultimately runs on the 2005 server and 2005 Management Studio can't talk to 2008) but the Export Data wizard is quite happy moving data ... as long as the DB already exists on the target server.
Hope that's useful.
It's not possible to restore to previous versions in SQL Server
Is there no SQL 2005 backup around? Otherwise you really are limited to export the entire database in 2008, and re-import back into 2005, or the Import/Export wizard in 2008
Or rely on 3rd party tools. e.g. Red Gate Data Compare is able to sync. the DATA between 2 servers/databases
I only use mysql but can you export your data into sql statments, and then import then into sql2005? Just a thought..
I faced a similar problem (sql 2005 to sql 2000), and found that I happened to have a blank database at the older version. I used bcp.exe to copy all the data.
check this link click here
You can create the database script in sql server 2008 and you can use it sql server 2005 and lower version....