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
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 how does cache work?

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-04-15 : 12:03:59
is it possible that sql statements cached from a program running this morning (that has now ended) and that they are still running in the sql?
I see records being added when they shouldn't be now and i'm wondering if sql could have cached the statements as the server was very slow at the time.

please advise?

nr
SQLTeam MVY

12543 Posts

Posted - 2008-04-15 : 12:36:47
Sql statements can still be running after the client app has ended (usually crashed).
Depending on how it is coded when it finishes it could then notice that the connection has been lost then rollback.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-04-15 : 12:54:12
so is there anyway of knowing what and how much is in cache?
i guess that's what happened -- I stopped the application because it was eating up the cpu but it's still continuing...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-15 : 12:59:55
Try running profiler to see what's happening in background.
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-15 : 13:21:59
first see what locks are taken with sys.dm_tran_locks.
then check the activiy monitor for the offending spid.
kill it.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-04-17 : 05:34:19
ok profiler is not installed - does it come with 2005?

there are no processed marked as blckby
what else do i check?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2008-04-17 : 05:41:21
profiler is a client tool. like ssms. and yes it comes with the server.

are you having a similar problem to this:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=98747
?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-04-17 : 07:05:03
strange it's not on the server.
I will have to see if i can get the sysadmin to install

what happens is that i have a vbs that runs exec statements (inserting to the db)
even when that stops the inserts seem to still be going and sql uses up 99% of the cpu.
the big issue is the cpu is being used and the server becomes not usable.. and i'm trying to figure out why and i'm wondering if it could be this program.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-17 : 22:51:41
Did you see that process in process list in ssms?
Go to Top of Page
   

- Advertisement -