Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSrepl_getOraclepackageversion

  No additional text.


Syntax

CREATE PROCEDURE sys.sp_MSrepl_getOraclepackageversion
(
    @publisher          sysname,
    @packageversion     nvarchar(256)  OUTPUT
)
AS
BEGIN
    set nocount on
    DECLARE @retcode            int
    DECLARE @versionreturn      varchar(256)
    DECLARE @version            nvarchar(256)
    DECLARE @InsColumnList	nvarchar(2000)
    DECLARE @SelectColumnList	nvarchar(2000)

    -- Security check.  'sysadmin' or db_owner of distribution db required.
    EXEC @retcode = sys.sp_MSreplcheck_publish
    IF @@ERROR <> 0 or @retcode <> 0
        RETURN (1)

    -- Define sp_ORAremotequery support table
    create table #hquery
    (
        seq	int identity(2,1),
        cmd	nvarchar(4000)
    )

    -- Define #VERSION support table
    create table #VERSION
    (
        version		varchar(256)
    )

    -- Populate a temp table with the version information from the publisher
    SELECT @InsColumnList    = 'version'
    SELECT @SelectColumnList = 'SQLSERVERVERSION'

    -- Query publisher for version information
    INSERT INTO #hquery(cmd) VALUES ('SELECT * FROM HREPL_VERSION ')

    BEGIN TRY 	
        EXEC @retcode = sp_ORAremotequery
            @Server		= @publisher,
            @InsTable		= '#VERSION',
            @InsColumnList	= @InsColumnList,
            @SelectColumnList	= @SelectColumnList
    END TRY 	

    BEGIN CATCH
        -- Treat a failure to obtain the version string as a NULL version string
        DROP TABLE #VERSION
        DROP TABLE #hquery
        SET @packageversion = NULL
        RETURN (0)
    END CATCH

    IF  (@@error <> 0 )
    BEGIN
        DROP TABLE #VERSION
        DROP TABLE #hquery
        SET @packageversion = NULL
        RETURN (0)
    END

    -- Return the Oracle package version string
    SET @versionreturn = (SELECT version from #VERSION)
    SET @packageversion = CONVERT(nvarchar(256),@versionreturn)

    IF  (@@error <> 0 )
    BEGIN
        DROP TABLE #VERSION
        DROP TABLE #hquery
        SET @packageversion = NULL
        RETURN (0)
    END

    DROP TABLE #VERSION
    DROP TABLE #hquery

    RETURN (0)
END

 
Last revision 2008RTM
See also

  sp_getOraclepackageversion (Procedure)
sp_MSdrop_repltran (Procedure)
sp_MSrepl_checkOraclepackageversion (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