Set a timeout.

From SQLZOO
Revision as of 13:33, 17 July 2012 by Connor (Talk | contribs) (Created page with "Set a timeout. <div class='ht'> <div class=params>schema:gisq</div> <div> Users may accidentally (or deliberately) start queries which would take a very long time to complete....")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Set a timeout.

schema:gisq

Users may accidentally (or deliberately) start queries which would take a very long time to complete. We can set a 'timeout'; this means that the system gives up after a certain amount of time.

 
 
 
 
 
 
SET STATEMENT_TIMEOUT TO 60000
ALTER SYSTEM SET RESOURCE_LIMIT=TRUE;
CREATE PROFILE gisqprofile
   LIMIT CONNECT_TIME 1
   ;
ALTER USER scott PROFILE gisqprofile;
sp_configure 'show advanced options', 1;
reconfigure;
sp_configure 'query governor cost limit', 60;
reconfigure;
sp_configure 'show advanced options', 0
reconfigure