we has all web applications and databases on one server.recently we
did an excercise to move all databases to a new server and connecting
it through the application server.
The database is in sql server and all applications are in .Net
the database server response time is very slow and all applications
are running slow and even throwing time out errors.
I checked on the CPU utilization. the sqlserver.exe is taking almost
100% CPU utilization.
It never happened with the previous server.checked the server
configuration.it's same as of the previous one.
Any suggestions to resolve this.
Uri Dimant - 31 Oct 2007 12:22 GMT
Hi
http://dimantdatabasesolutions.blogspot.com/2007/04/whats-version-of-sql-server.html
It could be lots of reasons.
1) Loking/blocking --check sp_who
2) Stored procedures/queries that generate a bad execution plan
---Turn on Profiler to see what is going on
......
> we has all web applications and databases on one server.recently we
> did an excercise to move all databases to a new server and connecting
[quoted text clipped - 7 lines]
> configuration.it's same as of the previous one.
> Any suggestions to resolve this.
Maninder - 31 Oct 2007 14:25 GMT
On Oct 31, 6:51 am, arora.di...@gmail.com wrote:
> we has all web applications and databases on one server.recently we
> did an excercise to move all databases to a new server and connecting
[quoted text clipped - 7 lines]
> configuration.it's same as of the previous one.
> Any suggestions to resolve this.
You can also check you Network speed/card configuration. Check to see
if this is configured to runa t 10 or 100 in Full duples or Half
Duplex.
Also check for any bottle necks in SQL server itself.
Run Queries against Sysprocesses Tables.
As mentioned check sp_who. Open Perf Monitor and check CPU/Mem Usages
Which SQL version are you using. Check for server configuration. Also
Check your IIS Configurations. Flush out the Cache and then erun you
webapps.
Sylvain Lafontaine - 31 Oct 2007 14:40 GMT

Signature
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
> we has all web applications and databases on one server.recently we
> did an excercise to move all databases to a new server and connecting
[quoted text clipped - 7 lines]
> configuration.it's same as of the previous one.
> Any suggestions to resolve this.
Sylvain Lafontaine - 31 Oct 2007 14:52 GMT
The most likely explanation is a use of bad query plans because the
statistics are out of date or the first times the SP are called - and
compiled -, they are with atypical parameters. The first step would be to
update the statistics using the sp_updatestats stored procedure (or use
UPDATE STATISTICS is you want to work on a more detailed level) and clean
the caches after that:
DBCC FLUSHPROCINDB
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
After that, you can think about reindexing and - very important -, you can
take some precautions about the use of atypical parameters and
recompilations in order to eliminate the reuse of bad query plans. See:
http://sqlknowledge.com/index.php?option=com_content&task=view&id=65&Itemid=41
Reindexing:
http://blog.sqlauthority.com/2007/01/31/sql-server-reindexing-database-tables-an
d-update-statistics-on-tables/
Good article on the use of the With Recompile option and of intermediary
variables in
order to deactivate the parameters sniffing from SQL-Server (the use of
intermediary variables is probably better than to use the With Recompile
option because recompiling big procedures take time):
http://blogs.msdn.com/khen1234/archive/2005/06/02/424228.aspx . (It's
useless to use both at the same time).
If you are with SQL-Server 2005, you can also play with the OPTIMIZE FOR
option instead of deactivating the parameters sniffing or using the With
Recompile option; see:
http://www.sql-server-performance.com/articles/per/using_plan_guides_p1.aspx
and
http://www.sql-server-performance.com/articles/per/new_query_hints_p1.aspx
Finally, a good reference on recompilation:
http://www.microsoft.com/technet/prodtechnol/sql/2005/recomp.mspx

Signature
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
> we has all web applications and databases on one server.recently we
> did an excercise to move all databases to a new server and connecting
[quoted text clipped - 7 lines]
> configuration.it's same as of the previous one.
> Any suggestions to resolve this.