QUERY_TIMEOUT= Data Set Option

Specifies the number of seconds of inactivity to wait before canceling a query.

Valid in: DATA and PROC steps (when accessing DBMS data using SAS/ACCESS software)
Category: Data Set Control
Alias: TIMEOUT= [Greenplum, HAWQ, Microsoft SQL Server, SAP IQ]
Default: LIBNAME option value
Interaction: Set the SAS SQLIPONEATTEMPT system option to disable PROC SQL from trying the query again after the first query times out.
Data source: Amazon Redshift, Aster, DB2 under UNIX and PC Hosts, Greenplum, Hadoop, HAWQ, Impala, JDBC, Microsoft SQL Server, Netezza, ODBC, PostgreSQL, SAP HANA, SAP IQ, Snowflake, Spark, Vertica, Yellowbrick
Notes: Support for Spark was added in SAS 9.4M7.
Support for Yellowbrick was added in SAS 9.4M7.
See: QUERY_TIMEOUT= LIBNAME option, SQLIPONEATTEMPT system option

Table of Contents

Syntax

QUERY_TIMEOUT=number-of-seconds

Details

QUERY_TIMEOUT= 0 indicates that there is no time limit for a query. This option is useful when you are testing a query, you suspect that a query might contain an endless loop, or the data is locked by another user.

Last updated: February 3, 2026