You can set the command timeout using the SMO object, as shown below:
Server server = new Server(new ServerConnection(new SqlConnection(ConnectionString)); server.ConnectionContext.StatementTimeout = 10800; server.ConnectionContext.ExecuteNonQuery(script);
For more information about the SMO object command timeout, see this link .
Rajesh
source share