Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Ravikumarc
Yak Posting Veteran
51 Posts |
Posted - 2010-10-06 : 13:47:58
|
Dear All,We are moving our databases from SQL server 2000 sp4 to SQL server 2008 R2,some of the queries that is running in sql server 2000 is throwing errors. For example: select * FROM Customer (nolock) where c_customer_source_Session_id=0works in sql server 2000, column c_customer_source_Session_id is a varchar column where as in sql server 2008 column value for c_customer_source_Session_id has to be in single quotes to make the query work.Example: select * FROM Customer (nolock) where c_custmer_source_Session_id = '0' . It would be very difficult to find update all scripts in the application, is there a setting(like global setting) that can be done in one place so that all scripts need not be updated |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Ravikumarc
Yak Posting Veteran
51 Posts |
Posted - 2010-10-06 : 14:16:52
|
quote: Originally posted by tkizer You could try running it in 80 compatibility level, however you will not get to use the new features in 90 or 100.But really, when you upgrade, you need to do a full regression test to identify all of the problem areas and correct them.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog
Hi Tara,Yes i have tried in 80 compatibility level..but still im getting the error.Let me know is there any sql environment settings which we have to change..Thanks & RegardsRavi |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Kristen
Test
22859 Posts |
Posted - 2010-10-07 : 02:37:00
|
If NOLOCK is your main problem then strip them all out of the code (rather than fixing them by adding "WITH" as is now required). They are incredibly dangerous (do you know why? if not please ask). Use READ_COMITTED_SNAPSHOT (which is a database setting) instead and all your READS will not block WRITEs (I am making a bold assumption that is why you are using NOLOCK).Have you used the Upgrade Advisor? I don't know if that will find all your incompatible code, but whatever it finds you can fix before you start your regression test, which will reduce the number of regression cycles you have to do!See also SQL2008 Migration: Hints and Tips SQL 2008 |
 |
|
|
|
|
|
|