I have strange scenario in which if I create database using SQL Server 2008 Express (database compatibility level SQL Server 2008) and perform insert using xml datatype, it executes indefinitely, but when same query is executed on database with compatibility level SQL Server 2005 it runs fine and executes in less than one minute.
Thanks
Microsoft has whitepapers about changes between SQL2005 and 2008. I would look there for any related breaking changes. If you expect to get an adequate answer on this site I would suggest posting code.
Related
I am facing an issue of migrating from 2008 sql server to 2012 sql server.
I am seeing two methods of migration in-house and parallel ones which one is better and how to do?
It is better to migrate to PostgreSQL.:) otherwise, i guess always better to make pure sql dump (in sql server management studio chose command in context menu Generate scripts, where choose structure and data) and simply execute it on new database
I'm asking for the proper way, in SQL Server's T-SQL (I think that's what it is) code or using another language, to import data from a Microsoft Access MDB Database into a new SQL Server Database.
Now, typically I would just import it in. The problem is I'm writing a .SQL script (I could use another technology if needed) to do all this leg work as this will need to be done fairly regularly. Likely at least once a week, for about 5 months in the year.
To digress a tad, I had wanted to implement a single database and distinguish separate source database using something like a DatabaseID field, but the powers that be overthrew me there.
I was previously using SQL Server Management Studio 2012 with SQL Server 2008 running the T-SQL (on a production machine) that worked fine. I've now migrated to a local SQL Server Management Studio 2012 with SQL Server 2012 (for development) and the code that used to work doesn't anymore.
This code is what used to work: SELECT * INTO [dbo].[Controls] FROM OpenDataSource('Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\Show.mdb; Jet OLEDB:Database Password=BobSaget')...[Control] The password has been obfuscated for security ...
That's likely a sloppy solution. What's the ideal way?
Thanks in advance!
I would recommend using Microsoft's SQL Server Migration Assistant for Access.
SQL Server Migration Assistant (SSMA) is a free supported tool from Microsoft that simplifies database migration process from Access to SQL Server. SSMA for Access automates conversion of Microsoft Access database objects to SQL Server database objects, loads the objects into SQL Server, and then migrates data from Microsoft Access to SQL Server.
SSMA for Access v5.2 is designed to support migration from Microsoft Access 97 and higher to all editions of SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, and SQL Azure.
You can find it here.
You may need to fix the structure after the migration as it tends to over exaggerate many of the data types.
Have you checked your DCOM security on MSDAINITIALIZE?
I had this problem when moving to a local instance of SSMS 2012.
http://blogs.msdn.com/b/dataaccesstechnologies/archive/2011/09/28/troubleshooting-cannot-create-an-instance-of-ole-db-provider.aspx
I have a problem with my website. When I publish my site on server, I got an error message:
The database '----------------------------.MDF' cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported.
What can I do about this?
You can't push a 2008 mdf file into a 2005 server. It just won't work. The problem is that sql 2005 has no idea what features you may have used in the 2008 database which doesn't exist under 2005.
Your only real option is to:
1. Create a blank database on the sql 2005 server.
2. Script your tables, views, procs, functions, etc from the 2008 server.
3. Run that script on the 2005 server.
IF you used some advanced features, then the 2005 server will not be able to run the script. Fix what you have to.
Yes... in SQL 2008, generate scripts for your DDL and DML; the vast majority of the scripts will be compatible, but you may need to make the odd tweak to accommodate SQL 2005.
Upload and run on your SQL 2005 instance...
There maybe a number of 3rd party tools that can aid you, particularly to generate the insert statements.
If your DB is particularly large, you might want to is SSIS to move the data across.
how can we get the restore in sql server 2000 of sql server 2005 data
You can't restore data from sql 2005 to 2000 only if you generate scripts with sql server 2000 compatibility. If you want create and restore backup can't do.
I recently found myself in a similar position on a client site. I came across an article on the MSDN SQL Server Forum (second response from top) with a detailed walk-through on this issue.
I ran into a few issues with scripting users & had to hack my way through it a little bit, but it was a great starting point for me.
I do not think this is possible. You can't go from 2005 to 2000, what you would have to do is install SQL 2005 Express then restore to that and you should be able to manage the backup from there.
If you only need the database structure you can generate scripts for the entire database.
Try this:
In the Properties window of the SQL 2005 Database you can set the compatibility level of that database to SQL 2000. Then perform the backup and then restore to SQL 2000.
If you don't want change the compatibilty level of your original database, just do a backup first and restore the database as a dummy in SQL 2005 and set that database's compatibility level.
alt text http://img411.imageshack.us/img411/8541/clipboard01lro.jpg
Use RedGate SQL Compare and RedGate SQL Data Compare to push the tables and data from SQL 2005 to SQL 2000.
You may be able to script the whole database from SQL 2000 compatibility mode, but getting the data requires something besides a backup and a restore. You could try bulk saving and bulk loading data, too...
Should I be scared of upgrading the database to SQL Server 2008?
Is it a simple auto-upgrade and everything works?
Is it worth it?
The upgrade from SQL Server 2005 to 2008 is a lot less "scary" than the upgrade from SQL Server 2000 to 2005. There are fewer T-SQL enhancements this time around, and the tools to manage SQL Server are very similar (so less of a learning curve).
The one thing that most people forget to do is to change the compatibility level of their databases after the server has been upgraded; you need to do this in order to use the new features inside a particular database after the server has been upgraded.
Perhaps you need to check out the features before asking a question like this.
Here's a link.
and here