Creates a resource limit.

sp_add_resource_limit name, appname, rangename, limittype, limitvalue [, enforced [, action [, scope]]]

Parameter information :
»name : The name of login or null to specify an application name.
»appname : The name of an application or null.
»rangename : The name of an existing timerange.
»limittype : Type of limit. Possible values: elapsed_time : The maximum amount of time for a batch or transaction (wall clock time)., io_cost : The io cost (estimated or real) for processing a query., row_count : To maximize the number of rows returned by a query., tempdb_space : Restricts the number of pages a tempdb database can have during a single session.
»limitvalue : The value applicable to limittype.
»enforced : Indicates if the limit should be enforced before or during query execution. Possible values: 1 : Before execution., 2 : During execution., 3 : Before and during execution.
»action : What should be done when a limit is exceeded. Possible values: 1 : Give a warning., 2 : Abort the batch., 3 : Abort the transaction., 4 : Kill the session.
»scope : Scope of the limit. Possible values: 1 : Query., 2 : Query batch., 4 : Transaction., 6 : Batch and transaction.