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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Site running very slow after Database Restore?

Author  Topic 

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 18:13:03
Here is the situation;

We currently have the website running at adxtactical.com just fine with the database.

We purchased a Virtual Plan with a different hosting company, and I plugged in the adxtactical.NET domain temporarily to the Virtual Server until everything is running flawlessly - then I will switch it over to .com on the new server.

Anyways, I had the Database backed up from the old Hosting Company and I restored it today onto the new server.

Notice now when you go to adxtactical.net, the site is VERY slow and whenever you click on a link, I receive a Database Error.

Where should I look first in finding a solution to this?

Thanks!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:17:16
You should probably rebuild all indexes or update statistics on all indexes. You can run sp_updatestats @resample = 'resample' or perhaps you'll need a full scan.

What error are you receiving?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 18:26:44
Do I put that in my script window and run it?

And unfortunately, the error is a generic error with no form of error ID. It basically just says 'Database Connection Problem'

http://www.adxtactical.net/store/pc/dbError.asp
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:28:11
Yes put that in a "New Query" window and run it. Make sure to navigate to the correct database first though. There's a drop-down to select it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 18:31:36
Ok, it says "Query Executed Successfully" and there is a bunch of text created. However I am still getting DB Errors on the website
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:35:04
The next thing we can do is defragment the indexes. Here's my script from my blog: http://weblogs.sqlteam.com/tarad/archive/2008/09/03/Defragmenting-Indexes-in-SQL-Server-2005.aspx

Once you've created it in a database (by copying the sql code into a new query window and executing it), we then run it. I stick DBA objects in a database called either Admin or DBA.

Here's a sample call to my object:
EXEC isp_ALTER_INDEX
@dbName = 'DatabaseName',
@statsMode = 'SAMPLED',
@defragType = 'REBUILD',
@minFragPercent = 10,
@maxFragPercent = 100,
@minRowCount = 1000

If that doesn't help, then we need to check SQL Profiler next.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:36:04
By the way, I'm leaving the office soon so if you don't get help from other people while I'm away, I'll respond tonight and then also tomorrow.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 18:43:59
Remember, I am very new to this.

I pasted the defrag script in the query and attempted to execute. This is what I got:

Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'Tara'.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:45:42
Make sure that nothing is highlighted when you execute it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 18:48:14
Now I am getting this:

Msg 2714, Level 16, State 3, Procedure isp_ALTER_INDEX, Line 199
There is already an object named 'isp_ALTER_INDEX' in the database.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:51:07
It created it then, so now let's run it. The only things you need to change with the below are to replace DatabaseName with your database name and also to ensure that you are pointed to the database where isp_ALTER_INDEX was created.

EXEC isp_ALTER_INDEX
@dbName = 'DatabaseName',
@statsMode = 'SAMPLED',
@defragType = 'REBUILD',
@minFragPercent = 10,
@maxFragPercent = 100,
@minRowCount = 1000


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-07 : 18:51:59
If that doesn't improve performance, I'd run these next:

DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS

If none of that works, we'll need to discuss SQL Profiler.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-07 : 19:06:39
Ok, I ran both of those, and they say they completed successfully! But I didn't help with the DB problems =(
Go to Top of Page

hey001us
Posting Yak Master

185 Posts

Posted - 2009-01-07 : 21:14:32
May i know what is the error that you're getting?

hey
Go to Top of Page

BlackReefDesigns
Starting Member

27 Posts

Posted - 2009-01-08 : 00:49:58
hey001us, here is the exact error. It's just a generic DB error when something goes wrong with the DB:

http://www.adxtactical.net/store/pc/dbError.asp
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-01-08 : 01:19:19
Could you check if you have SQL Profiler installer? It's a tool we use to check for performance and other issues inside SQL Server. I'm not sure if it comes with the Express tools.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -