Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSget_new_errorid

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_MSget_new_errorid
(
    @errorid int OUTPUT,
    @xact_seqno varbinary(16) = NULL,
    @command_id int = NULL
)
AS
begin
    set nocount on

    SELECT @errorid = NULL

    BEGIN TRAN sp_MSget_new_errorid

    SELECT TOP(1) @errorid = id FROM dbo.MSrepl_errors with (UPDLOCK PAGLOCK)
        ORDER BY id DESC

    IF @errorid IS NULL
        SELECT @errorid = 1
    ELSE
        SELECT @errorid = @errorid + 1

    INSERT INTO dbo.MSrepl_errors(id, time, error_type_id, source_type_id, source_name,
				error_code, error_text, xact_seqno, command_id, session_id)
		VALUES (@errorid, GETDATE(), NULL, /* Error with type NULL is placeholder, refer to sp_MSget_repl_error */
				NULL, NULL, NULL, NULL, @xact_seqno, @command_id, NULL)

    /* return an 0 error_id if failed to insert the row */
    IF @@ERROR <> 0
        SELECT @errorid = 0

    SELECT @errorid

    COMMIT TRAN
end

 
Last revision 2008RTM
See also

  sp_instdist (Procedure)
sp_MSadd_distribution_history (Procedure)
sp_MSadd_logreader_history (Procedure)
sp_MSadd_merge_history (Procedure)
sp_MSadd_merge_history90 (Procedure)
sp_MSadd_qreader_history (Procedure)
sp_MSadd_snapshot_history (Procedure)
       



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