Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Friday, March 23, 2012

Moved SQL DB to SQL2005 and it is slow

Hello,
I moved a sql 2000 DB to SQL 2005 and it seems to be very slow.
The same DB on a slower machine running 2000 runs mutch faster.
For example one SP on 2000 takes 5 seconds but on SQL 2005 it takes 102
seconds, 20 times slower.
I reindexed and that did not help.
Any Ideas?
Why the same DB with same indexes behaving that way, what Am I missing'
This is the release version of sql2005, Stardard edition, RTM...
Thanks
SAAre you accessing the database from a .Net 1.1 application using the standar
d
SqlConnection / related classes? I found that my .NET 1.1 apps would not
connect to a SQL Server 2005 instance using a shared memory connection.
Recompiling the same code with the .NET 2.0 framework resolved the issue -
the application again connected using shared memory and was sigificantly
faster. I don't know how to go about determining what mode (tcp / names
pipes / shared memory) a given connection is using, but I'm sure a quick
search will answer that.
Ross
"MSDN" wrote:

> Hello,
> I moved a sql 2000 DB to SQL 2005 and it seems to be very slow.
> The same DB on a slower machine running 2000 runs mutch faster.
> For example one SP on 2000 takes 5 seconds but on SQL 2005 it takes 102
> seconds, 20 times slower.
> I reindexed and that did not help.
> Any Ideas?
> Why the same DB with same indexes behaving that way, what Am I missing'
'
> This is the release version of sql2005, Stardard edition, RTM...
>
> Thanks
> SA
>
>|||Have you run UPDATE TATISTICS with FULLSCAN option?
"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:OD02m01NGHA.2668@.tk2msftngp13.phx.gbl...
> Hello,
> I moved a sql 2000 DB to SQL 2005 and it seems to be very slow.
> The same DB on a slower machine running 2000 runs mutch faster.
> For example one SP on 2000 takes 5 seconds but on SQL 2005 it takes 102
> seconds, 20 times slower.
> I reindexed and that did not help.
> Any Ideas?
> Why the same DB with same indexes behaving that way, what Am I
> missing'
> This is the release version of sql2005, Stardard edition, RTM...
>
> Thanks
> SA
>|||Sorry
UPDATE STATISTICS
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:OMQ9gf3NGHA.3864@.TK2MSFTNGP10.phx.gbl...
> Have you run UPDATE TATISTICS with FULLSCAN option?
>
>
> "MSDN" <sql_agentman@.hotmail.com> wrote in message
> news:OD02m01NGHA.2668@.tk2msftngp13.phx.gbl...
>|||MSDN (sql_agentman@.hotmail.com) writes:
> I moved a sql 2000 DB to SQL 2005 and it seems to be very slow.
> The same DB on a slower machine running 2000 runs mutch faster.
> For example one SP on 2000 takes 5 seconds but on SQL 2005 it takes 102
> seconds, 20 times slower.
> I reindexed and that did not help.
> Any Ideas?
> Why the same DB with same indexes behaving that way, what Am I
> missing'
As Uri pointed you must run UPDATE STATISTICS WITH FULLSCAN on all your
tables. The statistics from SQL 2000 are invalidated when you upgrade.
There may be more to it than that, but start there.
If you need further assistence, please be more specific of what is slow.
Is it certain queries, or is it slower overall? If you run queries from
Query Analyzer, is there still any differences (to rule out connection
issues as suggested in Ross's post). If you run from the local machine
(to exclude network issues)?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Perhaps it's not the database, but configuration of the SQL Server
installation. Also, if this database is running on a new server box, it may
be related hardware or OS configuration.
The following was copied from the MSDN article titled: Checklist: SQL Server
Performance
Use default server configuration settings for most applications.
Locate logs and the tempdb database on separate devices from the data.
Provide separate devices for heavily accessed tables and indexes.
Use the correct RAID configuration.
Use multiple disk controllers.
Pre-grow databases and logs to avoid automatic growth and fragmentation
performance impact.
Maximize available memory.
Manage index fragmentation.
Keep database administrator tasks in mind.
http://msdn.microsoft.com/SQL/2000/...enetcheck08.asp
"MSDN" <sql_agentman@.hotmail.com> wrote in message
news:OD02m01NGHA.2668@.tk2msftngp13.phx.gbl...
> Hello,
> I moved a sql 2000 DB to SQL 2005 and it seems to be very slow.
> The same DB on a slower machine running 2000 runs mutch faster.
> For example one SP on 2000 takes 5 seconds but on SQL 2005 it takes 102
> seconds, 20 times slower.
> I reindexed and that did not help.
> Any Ideas?
> Why the same DB with same indexes behaving that way, what Am I
> missing'
> This is the release version of sql2005, Stardard edition, RTM...
>
> Thanks
> SA
>sql

Monday, March 12, 2012

move server

I have to move SQL Server along with three live databases from 'C' drive which runs out of space to 'E' drive (same server).
I will appreciate any guidance you could provide.
Thank you,
Alan.
Alan,
No need to move the database. Just move the Data and Log files.
Right click on each database and in ALL Tasks detach all of them, then
simply move the .mdf and .ldf files to e:. Then use ATTACH database to
attach them again.
Harman Sahni
Database Administrator
Fareportal Inc.
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.

move server

I have to move SQL Server along with three live databases from 'C' drive whi
ch runs out of space to 'E' drive (same server).
I will appreciate any guidance you could provide.
Thank you,
Alan.Hi,
I will suggest you to move the MDF and LDF files of these 3 databases to E
drive. Let the SQL server program files be there in C drive.If you need to
move the sql server programs then you need to reinstall SQL server.
How to Move the databases from C drive to E Drive
1. detach the databases
SP_DETACH_DB <dbname1>
go
SP_DETACH_DB <dbname2>
go
SP_DETACH_DB <dbname3>
2. Create a new folder in E drive
3. Move the MDF and LDF files of the database detached in step 1
4. Use attach database command to attach it back to sql server
SP_ATTACH_DB
'dbname1','e:\mssql\data\dbname1.mdf','e:\mssql\data\dbname1.ldf'
go
SP_ATTACH_DB
'dbname2','e:\mssql\data\dbname2.mdf','e:\mssql\data\dbname2.ldf'
go
SP_ATTACH_DB
'dbname3','e:\mssql\data\dbname3.mdf','e:\mssql\data\dbname3.ldf'
Note
Replace the database names and physical file names based on ur requirement.
Thanks
Hari
MCDBA
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.|||Alan,
No need to move the database. Just move the Data and Log files.
Right click on each database and in ALL Tasks detach all of them, then
simply move the .mdf and .ldf files to e:. Then use ATTACH database to
attach them again.
Harman Sahni
Database Administrator
Fareportal Inc.
"Alan" <anonymous@.discussions.microsoft.com> wrote in message
news:F59F19C4-EF00-434C-8A5F-DA8514FC4AD0@.microsoft.com...
> I have to move SQL Server along with three live databases from 'C' drive
which runs out of space to 'E' drive (same server).
> I will appreciate any guidance you could provide.
> Thank you,
> Alan.