Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_fulltext_querytimeout

  No additional text.


Syntax
create proc sys.sp_fulltext_querytimeout
    @ftcat      sysname,        -- full-text catalog name
    @timeout   int = null         -- query timeout in ms
as
    set nocount on

    -- sp_fulltext_querytimeout will run under read committed isolation level
    set transaction isolation level READ COMMITTED

    -- CHECK PERMISSIONS (must be a dbowner)
    if (is_member('db_owner') = 0)
    begin
        raiserror(15247,-1,-1)
        return 1
    end

    if (db_name() in ('master','tempdb','model'))
    begin
        raiserror(9966, -1, -1)
        return 1
    end

    -- VALIDATE PARAMS
    if @ftcat is null OR datalength(@ftcat) = 0 -- allow spaces in the name, but not a 0-length string
    begin
        raiserror(15600,-1,-1,'sys.sp_fulltext_querytimeout')
        return 1
    end

    -- DISALLOW USER TRANSACTION
    set implicit_transactions off
    if @@trancount > 0
    begin
        raiserror(15002,-1,-1,'sys.sp_fulltext_querytimeout')
        return 1
    end

    declare @ftcatid int
    select @ftcatid = fulltext_catalog_id from sys.fulltext_catalogs where name = @ftcat
    if @ftcatid is null
    begin
		declare @curdbname sysname
		select @curdbname = db_name()
		declare @curdbnamelen int
		select @curdbnamelen = LEN(@curdbname)
		raiserror(7641,-1,-1,@ftcat, @curdbnamelen, @curdbname)
        return 1
    end

    declare @dbid int
    select @dbid=db_id()

    --if timeout is null we print current timeout value
    if(@timeout is null)
    begin
        DBCC CALLFULLTEXT ( 22, @dbid, @ftcatid)
    end
    else
    begin
        -- @timeout needs to be > 0
        if(@timeout < 0)
        begin
            raiserror(15600,-1,-1,'sys.sp_fulltext_querytimeout')
            return 1
        end

        DBCC CALLFULLTEXT ( 21, @dbid, @ftcatid, @timeout)
    end

    return 0

 
Last revision
News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash