Significant Performance Reduction After Migration From SQL 2000 To SQL 2005

Jan 5, 2006

Hi all,
 
I am wondering if anyone has similar experience.
 
I did the migration by detaching the database from SQL 2000 running on W2K Pro and attaching it to SQL 2005 running on XP Pro.  Some queries with simple aggregate functions such as AVG() have been slowed by at least an order of magnitude.  I understand that SQL server can intelligently adapt to improve the performance.  I am not sure how much it can improve at this point of time.
 
H

 

View 7 Replies


ADVERTISEMENT

Significant Performance Difference If SELECT Command Contains User

Oct 25, 2006

SQL 2000 Connection String:user id=MyUserName;password=MyPassword;initial catalog=MyDB;server=MyServer;Connect Timeout=30 This SELECT statement returns its 10 results nearly instantly:SELECT * FROM MyTableDitto from above, but completes in 30-40 seconds:SELECT * FROM [dbo].[MyTable]Ditto from above, but completes nearly instantly:
SELECT TOP 1000 * FROM [dbo].[MyTable] Obviously I have stopped using the [dbo] syntax in my SqlCommand's (SELECT's and EXECUTE's) but still would like to know why this is.vr, Rich

View 3 Replies View Related

SQL Server 2012 :: Significant Performance Dropping When Use CASE Statement

Oct 14, 2014

1. I have a simple JOIN statement between A and B, e.g. Cities A JOIN Countries B:

SELECT A.City_Name, B.Country_Code, B.Country_Area
FROM Cities A
JOIN Countries B
ON B.Country_Id = A.Country_Id
WHERE B.Country_Type='ABC';

That statement works absolutely fine, very fast (less than a second) and returns me 2 records

2. I need to replace Country Area column with 1 for Europe and 0 for all the rest. I implement so in the following way:

SELECT A.City_Name, B.Country_Code, CASE B.Country_Area WHEN 'EUR' THEN 1 ELSE 0 AS Country_Area
FROM Cities A
JOIN Countries B
ON B.Country_Id = A.Country_Id
WHERE B.Country_Type='ABC';

Now to get the same two records it takes 03:55 minutes (!)

I have looked into Estimated Execution Plan, but couldn't spot any difference - all straight forward.

It is SQL 2012 SP1 with compatibility level set to 110

View 9 Replies View Related

Temporary Table Insert Performance Degraded After Migration To 2005 By 50%.

Apr 11, 2007

Hi,



I have a series of queries which have doubled in the amount of time they take to execute since moving to SQL Server 2005. The queries being performance tested are utilising hardware that is very similar to that of the comparison SQL Server 2000 server. They have 6 CPUs exactly the same and we have swapped RAM around to eliminate that difference.



There are 4 parts to the query suffering performance degredation.



1. Create temporary results table

2. Create (using SELECT INTO) and populate temporary working table 1 - 212,263 rows

3. Create (using SELECT INTO) and populate temporary working table 2 - 5,102 rows

4. Insert into temp results table matches found in temp work table 1 and temp work table 2 - 382 rows



On 2000, the queries take a total of 15 secs. On 2005, they take 30 seconds. Part four of the query takes approx 17 secs on its initial run. However, if i truncate the temp results table and re-run just the last query it only takes 1 sec. Query Plan caching?



I have reviewed the forum for a solution to the problem but with no luck. Many of the solutions presented appear to relate to permanant user tables. Solutions such as UPDATE STATISTICS and recompiling stored procedures have no positive effect. When reviewing the query plans, there are very little differences. Some expected between versions right?



The following code snippet is the query from part 4.




Code Snippet

INSERT #MatchingResults

(Table1IDNo, Table2IDNo, MatchRunNo)

SELECT DISTINCT #Table2.IDNo AS Table2IDNo,

#Table1.IDNo AS Table1IDNo,

1 AS MatchRunNo

FROM #Table1

INNER JOIN #Table2

ON ( #Table2.LastName = #Table1.LastName )

AND ( #Table2.AddressDetails = #Table1.AddressDetails )

AND ( #Table2.Country = #Table1.Country )

AND ( ( #Table2.FirstName = #Table1.FirstName) OR ( #Table1.FirstName = '' ) )

AND ( ( #Table2.Title = #Table1.Title ) OR ( #Table1.Title = '' ) )



The query plan shows a hash join on both servers. I have tried removing the distinct statement and forcing a Loop Join (query hint).



I have also run SQL Profiler. The only differences there appear to be with the "SELECT StatMan" statements.



On 2000, part of the query duration is 1719 and is as follows:


Code SnippetSELECT statman([AddressDetails],[LastName],[FirstName],[Title],[Country],@PSTATMAN)
FROM (SELECT TOP 100 PERCENT [AddressDetails],[LastName],[FirstName],[Title],[Country] FROM [dbo].[#TMCT04042007101009_________________________________________________________________________________________________000000000096] WITH(READUNCOMMITTED,SAMPLE 3.675520e+001 PERCENT) ORDER BY [AddressDetails],[LastName],[FirstName],[Title],[Country]) AS _MS_UPDSTATS_TBL OPTION (BYPASS OPTIMIZER_QUEUE, MAXDOP 1)



On 2005, part of the query duration is 5188 and is as follows:


Code Snippet

SELECT StatMan([SC0], [SB0000]) FROM (SELECT TOP 100 PERCENT [SC0], step_direction([SC0]) over (order by NULL) AS [SB0000] FROM (SELECT [AddressDetails] AS [SC0] FROM [dbo].[#TMCT04042007101009_________________________________________________________________________________________________00000000000E] WITH (READUNCOMMITTED,SAMPLE 7.946877e+001 PERCENT) ) AS _MS_UPDSTATS_TBL_HELPER ORDER BY [SC0], [SB0000] ) AS _MS_UPDSTATS_TBL OPTION (MAXDOP 1)



Its clear that the sampling rate is higher. I assume this could have something to do with it. Can this be modified?



Thank-you for your help in advance..



Cheers



Tim















View 9 Replies View Related

Migration Of DTS From 2000 To 2005

Apr 4, 2008

Gurus!!

I have to transfer existing DTS packages from sqlserver 2000 to sqlserver 2005, Please let me know the steps by which i can migrate all the runing DTS into SSIS into sqlserver 2005

Thanks
Chander

View 4 Replies View Related

Migration Of SQL 2000 To SQL 2005

Apr 15, 2008

Hi,
I have one basic question.
What things should i check when i want to upgrade DB Server version to SQL 2000 server to SQL 2005 Server.

Thanks in advance.
-- Chetan

View 1 Replies View Related

SQL 2000 To SQL 2005 Migration

Feb 18, 2007

I have to migrate our existing SQL Server 2000 (standard edition) running on Windows 2000 server (32 bit) to a new windows 2003 server (64 bit) (SQL 2005 standard edition). I am thinking of doing this migratin after hours (or may be on weekend so a

I have planned the following steps (in order).

1. Install SQL Server 2005 on new server.(windows authenticatin and a SQL server will be running on a separate domain account)

2. Download SQL server upgrade advisor on current SQL Server 2000 (windows 2000) and run a report.

3. Back up (Full) SQL Server 2000

4. Script logins and schedule tasks on SQL 2000

5. Restore database on SQL 2005

6. Create jobs by runing Jobs scripit on SQL 2005

7. Create users and passwords by running the exported script file.
Please refer to:
How to transfer logins and passwords between instances of SQL Server
http://support.microsoft.com/kb/246133/en-us

I am aware that I might face issues of
db compatibility level, statistics out of date so I need to update statistics and may be redindex all my tables

PLEASE LET ME Know if I am missing something obvious? Not sure about our existing DTS packages? Any information. Right now I am just thiking of running all my existing 2000 DTS in 2005 as legacy

Note: Rob, Tara, Michael Valentine Jones, Mladen or Nigel , if you cam provide some input from your wealth of experience on this matter. I would sincerely appreciate it.

View 4 Replies View Related

Migration From SQL 2000 To 2005

Oct 18, 2006

HiWe are going to upgrade from SQL 2002 to 2005. We have approx. 100mrows of data on the main table and hand of stored procs and views.What we had in mind was that we would dts the data out, script thestored procs and view out and import the it back into SQL 2005.Is there smarter way of doing this?The key thing is that the data must be cleanThanks

View 2 Replies View Related

SQL 2000 -&&> SQL 2005 Migration.

Apr 9, 2008

Hi SQL Community,

Looking a preparing a SQL 2000 to SQL 2005 Migration Plan to include the following points. It will be a side-by-side migration where the current environment will run in parallel with the new.

1. Assessment of current SQL 2000 environment. (Hardware, Databases, SQL components such as DTS)
2. Seqence for Steps to perform duing the migration
3. Required resources
4. TimelinesAnyone have such as plan?

Tan

View 1 Replies View Related

Migration From Sql 2000 To Sql 2005

Oct 12, 2006

Hi

I am trying to migrate Databases from MS SQL 2000 (server A) to MS sql 2005 (server B).

The problem i have when i use database copy wizard is that it gives an error and the login will not be migrated .

I tried backup and restore of the databases as well as detach and attach.All cases the logins will have a problem.

For example say for database intranet all the tables stored procedures etc gets migrated but under security >>users (say intrauser) i double click user and the the login name wont appear .and when i try to close the window it says login name must be specified(SQLmanagerUI)

Please help.



View 8 Replies View Related

New To Sql 2000 And 2005, Have Migration Question

Jul 22, 2006

Hi all,
i was just thrown into SQL stuff at my job. For now I need to complete a migration, but soon i'm being sent to training to make sure that I can do this easier later. Heres my question

I backed up the database, then restored it to the new server. That worked fine. I couldn't log in...so i did some searching and found out about the sp_change_users_login command, I got my login fixed and I can log in. Now, I have about 1000 other users to change and I don't want to do those manually. Noone is using this database, so if needed, I could back it up and restore it differnetly if needed or If someone can give me a .sql file to run to fix all usernames and tell me how to run a .sql (i'm that new to it) that would be REALLY appreciated. Anyway, thanks in advance, looking forward to SQL administration.


Matt

View 6 Replies View Related

SQL 2000 To SQL 2005 Server Migration...

Apr 4, 2007

OK so I'm just the Network Admin here, but our DBA's are off doing other stuff. So I thought I may inquire here about how the easiest way to migrate from SQL Server 2000 to 2005? The first server I'd like to migrate is just databases with a few users, no DTS packages or anything like that... The only problem is that there are several hundred db's, so moving them one at a time is not an option. Has anyone here had successful experience with doing this? Thanks in advance for your help!
-Andrew

View 2 Replies View Related

Data Migration From Sql 2000 To Sql 2005

Aug 28, 2007

hi. i am currently migrating data from sql server 2000 to sql server 2005 and i was wondering if any of you can help me. i found this tutorial

http://www.aspfree.com/c/a/MS-SQL-Server/Moving-Data-from-SQL-Server-2000-to-SQL-Server-2005/

and it seems really straight forward. does this tutorial cover everything i need to do for data migration? do i need to watch out for anything? if anyone knows of a better tutorial please let me know. thanks for the help.

View 6 Replies View Related

Help With Data Migration 2000 To 2005

Mar 7, 2008

Hi all. I'll say from the get go that I'm no SQL guru. I'm primarily a web dev who has been given the data jobs kind of by default so I'm definitely no DBA.

Anyway, having established my noobness, I have encountered an issue. The employer recently decided to upgrade our databases from 2000 to 2005 and I have been tasked to migrate the data from old to new. I have discovered the Import/Export Wizard and got it to move all the data in a dev database we use...but there was one problem. It seems that the tables in 2000 that had columns designated as identity columns do not have the identity attribute when they arrive in 2005.

I haven't figured a way to alter them to give them that attribute once they're in 2005 so I'm wondering if there's something I can do/change in the import process that would retain the identity property of the columns if I were to re-import them.

This is my first migration attempt so dumping it and starting over is no great loss...but any help would be most appreciated.

View 6 Replies View Related

Jobs Migration From SQL 2000 – 2005

Mar 19, 2008

I am trying to migrate few of my SQL jobs to SQL2K5. Can I simply script and execute them on the new environment. I hope the script is forward compatible.


------------------------
I think, therefore I am - Rene Descartes

View 2 Replies View Related

Migration From MS SQL 2000 To MS SQL 2005 With NHibernate.

Mar 12, 2008



Hello,


We are using an ASP.Net Application with MS SQL 2000 as the backend and NHibernate as the Interface.
Now we are planning to migrate to MS SQL 2005 with NHibernate only as the the interface.
I wish to knwo what are the possible issues,risks and impacts if we go for this migration on the Application,
NHibernate and the Enterprise Manager.

Please Guide.


Thanks
Arpan Gutgutia
arpangutgutia@rediff.com

View 1 Replies View Related

Migration From SQL Server 2000 To 2005

Mar 2, 2007

I have a fairly large web application that was built with SQL Server 2000 and .NET 1.1. We're planning on moving to .NET 2.0 eventually, but there's a lot of work to be done before that happens. In the short term, we're looking to purchase a new database server and would like to upgrade to SQL Server 2005 at the same time. Is it as simple as recreating our databases on this new system and changing the connection string, or are there other gotchas? As far as what we're doing with SQL Server 2000, it's really nothing more than tables, views, and stored procedures. Thanks in advance for any advice.

View 4 Replies View Related

SQL Server 2000 To 2005 Migration

Feb 19, 2007

I am in a process of migration our current SQL Server 2000 (Standard Edition with SP3 running on 32 bit windows 2000 server) to SQL Server 2005 (Standard with SP1 running on X64 windows 2003 server)?

For migration does current SQL Server 2000 requires Service Pack 4 Installed?

View 1 Replies View Related

Migration Problem Of Sql 2000 To SQL 2005

Sep 18, 2006

Hi all,

We migrated our database from SQL 2000 to SQL 2005. But we faced some problems, according to the requirements of our project we dont want to apply some constraints on some fields of some tables. But when we run the database script of our old database on SQL 2005, it applied many constraints which causing some serious problems in our project. There are about 100+ tables in our database and some one told me that we have to false every constraint manually. Now, my question is that is there any solution of our this problem.



Best Regards

View 3 Replies View Related

Collation Problem After Migration From 2000 To 2005

Nov 6, 2007

Hi. Wondered if I might get a bit of advice on a minor collation problem I've experienced after migrating a database form SQL Server 2000 to 2005?

Users reported an error appearing in pages in a web-based application and I traced the problem to a stored procedure that was using a temporary table. I retained the original collation - SQL_Latin1_General_CP1_CI_AS - after migration and the error showing up was 'Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.' This makes sense as I guess temporary tables are assuming tempdb's collation. Resolution in this case was fairly simple, which was to apply an explicit collation to one of the columns in the temporary table (it only had three columns, only one requiring the collation). However the longer-term question is should I: (a) resolve similar issues in the same way as and when they arise; (b) change the collation of the migrated database to that of the default for system and new databases under 2005 - i.e. Latin1_General_CI_AS; or (b) change the collation of tempdb and the other system databases to match that of the migrated databases (sounds risky)?

I would probably go for (a) or perhaps (b) but could use some expert advise on the matter.

Regards,

YaHozna.

View 4 Replies View Related

Migration From 2000 To 2005 Issues/tips

Feb 10, 2008

Hi all..!!

this is my first posting in this forum and I registered since it is very informative and active...

I am looking for pointers to go ahead with migration of DB/DTS from 2000 to 2005.

Any gurus in this forum who can point me any existing links or any info will be highly appreciated..


Thanks

View 1 Replies View Related

Migration Issue From DTS 2000 To SSIS SQL 2005

Jul 13, 2007

Hi,

Hi,



I am trying to migrate DTS 2000 packages to SQL 2005 SSis using Package Wizard. When I am invoking and after the passing server information of source and destination, while reading the packages it is giving error

TITLE: Microsoft SQL Server

------------------------------



This wizard will close because it encountered the following error:



For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.UI.WizardFrameworkErrorSR&EvtID=UncaughtException&LinkId=20476



------------------------------

ADDITIONAL INFORMATION:



Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index (mscorlib)


Could someone can help in this regards. As this is a important task for me and I am stuck on this which has to be resolved by end of today.

Thanks

-VD

Venkatesh

View 1 Replies View Related

Collation Problem After Migration (2000 To 2005)

Feb 28, 2008

Hi.

I had an SQL 2000 database with Turkish collation. (Note: Default database collation was Latin)

Today i transfered data from that to SQL 2005 with Latin collation.

There is no problem with old data. I transfered them correctly. But when i insert/update at new database, Turkish characters change to Latin. (Like i->i, g->g)

When i put an N before the value, it works.

For example INSERT INTO T1 (A) VALUES (N'A')

Must i put N to all of them? I think not. What can be the solution?

Note: Database for Snitz Forums like here.

View 2 Replies View Related

Migration Of VB Net 2005 (Pro) App Using Access 2000 DB (DAO && ADO) To SQL Express

Nov 3, 2006

I've downloaded the migration tool to convert an Access 2000 DB to a SQL DB. The VB code utilizes DAO (3.6) for hourly automatic compaction and the creation of an encrypted security database. ADO is used for the data maintenance functions. I expect the current connection methodology of ODBC using Jet 4.0 will need to be modified (many articles here address this). All the SQL code is inline and also must be modified. The Coldfusion code utilizes Micrsoft Access with Unicode via an ODBC connection with only SQL Select statements. At another job, I migrated an Informix 7 database to MS SQL 7 and for the most part the SQL code remained the same except for the wildcard spec from * to %.

I'm looking for insights and/or shortcuts on this effort, primarily in the SQL command mods area. I'm perusing the threads here as we speak, but hoped someone knew of a specific thread I could go to....laziness is alive and well for us chronologically gifted people, i.e. over 55.

Any help or links are greatly appreciated!

View 1 Replies View Related

Application Slow After Migration From 2000 To 2005

Mar 8, 2008

Hi,

Recently our database has been migrated from SQL 2000 to SQL 2005 on a new server(machine) with windows 2003(previously windows 2000). If the database is retained on the same machine but with a named instance of 2005, the application(websphere 5.1) is behaving normal whereas if i configure the aplication to the new server it is running slow for some of the queries but not all.

This change will have to be implemented in production very soon. Any advise will be of great benefit

Thanks

Raam

View 6 Replies View Related

Migration To Sql Express 2005 From Sql Server 2000

Apr 24, 2008

The Environment:
I have an old Windows 2000 BackOffice server (Retail but with no media) that hosts a small database (<50mb) that is hosted on the local SQL Server 2000 installation. The network has 8 PCs that connect to the database via ODBC connections. I just purchased a new server running Windows Server 2003 Standard Edition (OEM).

What I€™m Trying to Accomplish:
I want to decommission the old 2000 BackOffice server and move the database to the new 2003 Standard server. I€™m trying to do this on the cheap, so I really want to avoid spending thousands on a new SQL server license.

Things I€™m Considering:
1) Migrating the database from SQL 2000 Standard to SQL 2005 Express
2) Moving the database from SQL 2000 Standard to MS Access
3) Purchasing SQL Server 2005 licenses and upgrading
4) Purchasing SQL 2000 Server licenses


The options are pretty much listed in my order of preference. I€™d like to move from SQL 2000 Server to SQL 2005 Express, but I haven€™t really found a lot of material on the subject since people customarily go the other way.

Any advice or alternative recommendations would be much appreciated!

View 6 Replies View Related

Project Plan Template For Migration From MS SQL 2000 To MS Sql 2005

Jun 27, 2007

Hello:



I'm looking for a Project Plan template for Migration from MS SQL 2000 to MS sql 2005.



We apporeciate your help.



regards



William

View 8 Replies View Related

2005 Migration Do You Have To Migrate The 2000 System Databases?

Sep 20, 2007

Hi all

I was just wondering on if I have to migrate the systems databases from 2000 ie. Master , Model & MSDB ??




Thanks

View 4 Replies View Related

Data Migration From SQL 2000 To SQL Sever 2005 Express

Oct 24, 2007

We have a SQL Server 2000 and want to migrate to SQL Server 2005 Express.

It's possible?
SQL Server 2005 Express have support to do this?

View 6 Replies View Related

Data Migration Using Import/export Wizard SQL 2000 To SQL 2005

Mar 16, 2007

I am trying to import data from SQL 2000 to SQL 2005

The Data schemas are the same in both (tables, relationships, key and triggers).

Using the wizard I am trying to import data from SQL 2000 to SQL 2005. The issue I face is to manage the Idenity columns. I do not want the identity values from the SQL 2000 DB which may be at say 5000, instead I want to use the identity values from the SQL 2005 database which will problably start at 1

Is there a way to do this, should I use a custom query instead of a direct table dump. If using a custom query do I need to just specify a Select query or does it have to be a specific "INSERT INTO Table ..." type query

If I do import the data directly with Identity "ON" how can I advance the identity column value to current +1 on the SQL 2005 table.

Thanks

javahar

View 3 Replies View Related

SQL 2000 Vs SQL 2005 Performance

Jun 22, 2007

I have sql 2000 running with a client database that is about 200 people per day. A VB front end runs it. I have some problems with performance. Would upgrading to Sql 2005 improve my database performance?

View 5 Replies View Related

UDF Performance Drop From 2000 To 2005

Oct 18, 2007

Hi all,

We are in the process of upgrading a sql 2000 database over to 2005 and have noticed some substancial performance drops with scalar udfs in 2005.

I have already read the following post
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=491984&SiteID=1
and recognise that udfs are not the most performant option in the first place, but was surprised how much slower these have become on 2005.

Has anyone else had this sort of issue, we really don't want to go away from the udf's but would like to know if there is a design issue within a udf that might be causing this (or even a usage issue). What I am getting as is: Is there certain types of queries, or keywords that should be avoided in udfs on 2005?

A simple example we have is a udf that returns an exchange rate stored in the db, this has parameters of "from currency", "to currency", and date.



SET @ret = ( SELECT TOP 1 TELE_TRANSFER_RATE

FROM dbo.EXCHANGE_RATES

WHERE EXCH_CURRENCY_NO = @from

AND CURRENCY_NO = @to

AND RATE_DATE <= @date

ORDER BY RATE_DATE DESC )

RETURN @ret


And then this is called from a script that returns financials, standard select statement, with udf call in select clause.

Any comments?

Thanks in advance.
Clint Colefax

View 6 Replies View Related

Performance When Migrating From 2000 To 2005

Feb 10, 2008

Hi guys
We are in the process of moving from SQL Server 2000 to 2005. In this process in general I have noticed that performance is better as a result of the move but in a couple of specific cases performance is about 10 time worse as a result of the move and i am wondering if anyone can tell me why.

1) Should I be noticing that calling functions from within a where clause are slower in 2005.

2) Has the and/or logic processing been changed between the different versions.

3) Why does this segment of code run really slow in 2005 but really fast in 2000 (note, i know that its not nice looking but it is pre-existing code from before we came on board and there are more examples of these so its a bit of a change to go through and fix it all up to what it should be but i need to know why before i can move on and as i said i know its not nice and one should expect it to be slow but i specially need to know why it would run fine in 2000 and not on 2005):

.....
AND (Deleted = 0)
AND (DATEDIFF(d, dbo.GetStartOfDate(ReviewedDate), dbo.GetStartOfDate(GETDATE())) = 3)
OR (ProgressPointId = 32)
AND (Deleted = 0)
AND (DATEDIFF(d, dbo.GetStartOfDate(ReviewedDate), dbo.GetStartOfDate(GETDATE())) = 3)
OR (ProgressPointId = 30)
AND (Deleted = 0)
AND (DATEDIFF(d, dbo.GetStartOfDate(ReviewedDate), dbo.GetStartOfDate(GETDATE())) = 3)
....

Thanks for your help.
Anthony

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved