timeout period elapsed prior to completion of the operation

i am try'g run the script below on a sql 2000 database, which usually works ok. this database is a little large (4gb+) and i get timeout error. how can i extent or eliminate the timeout. keep in mind that i am in the "KISS" mode ;-)

declare database_cursor CURSOR for select name from master..sysdatabases
declare @database_name sysname

open database_cursor
fetch next from database_cursor into @database_name
while @@FETCH_STATUS=0
begin
  print @database_name
  dbcc checkdb(@database_name) with no_infomsgs
  fetch next from database_cursor into @database_name
end

close database_cursor
deallocate database_cursor
tortogaAsked:
Who is Participating?
 
jorge_torizResearch & Development ManagerCommented:
Are you executing inside SSMS?

Change the default timeout going to Tools -> Options -> Query execution -> Execution time-out
0
 
Anthony PerkinsCommented:
How are you execution the query?
0
 
tortogaAuthor Commented:
thanks for the reply. i mistakenly clicked on the .net. i'm using ms sql admin studio. your suggestion was there also. i changed the 60 to 100000 and the error hasn't appear'd yey, but i'm wait'g. i'll let you know.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
tortogaAuthor Commented:
fast response
0
 
tortogaAuthor Commented:
you wouldn't know how to save the error results in the script window?
0
 
jorge_torizResearch & Development ManagerCommented:
To save them automatically?

Handly you can right click and save them...

If I would like to save them automatically, I would use a try catch block and then inside the catch block use the ERROR_MESSAGE() function and store the message in a table
0
 
tortogaAuthor Commented:
i try'd that, but although i can hi-lite, there's no option to copy or save.
0
 
jorge_torizResearch & Development ManagerCommented:
Right click in your query editor -> Results to -> Results to file

Whey you execute your query, the editor will ask you to the name and the location of the result file
0
 
tortogaAuthor Commented:
hi, sorry for the delay in get'g back. i using ms sql 2000 and SQL Admin Studio. i can't find where to right click. i've looked just about everywhere.
0
 
jorge_torizResearch & Development ManagerCommented:
Oooo, sorry, I thought that you are working with SS2005 :S

Sorry man, I've not worked about of 7 years in SS2000 :S

I can't remember how is the interface
0
 
tortogaAuthor Commented:
thanks anyway. our current version of the software is using sql 2005. i'll probably need some help there in the future, but you've help'd a lot. thanks again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.