• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

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
0
tortoga
Asked:
tortoga
  • 6
  • 4
1 Solution
 
jorge_torizCommented:
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
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
tortogaAuthor Commented:
fast response
0
 
tortogaAuthor Commented:
you wouldn't know how to save the error results in the script window?
0
 
jorge_torizCommented:
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_torizCommented:
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_torizCommented:
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now