USP_SCHEMA_DB_GETHOSTINGLINKINFO

Returns the extended database properties that are needed to build a link to a hosted Infinity server

Parameters

Parameter Parameter Type Mode Description
@DATABASEID uniqueidentifier INOUT
@SITEINFOID uniqueidentifier INOUT
@LINKURL nvarchar(500) INOUT
@ISHOSTED bit INOUT

Definition

Copy



CREATE procedure dbo.USP_SCHEMA_DB_GETHOSTINGLINKINFO

    @DATABASEID uniqueidentifier = null output,
    @SITEINFOID uniqueidentifier = null output,
    @LINKURL nvarchar(500) = null output,
    @ISHOSTED bit = null output

with execute as owner

as

    set nocount on;

    declare @ID nvarchar(36);

    select @ID=cast(value as nvarchar(36)) from sys.extended_properties where class=0 and name=N'Hosting_DatabaseID';

    if not @ID is null
        set @DATABASEID = cast(@ID as uniqueidentifier);

    set @ID = null;
    select @ID=cast(value as nvarchar(36)) from sys.extended_properties where class=0 and name=N'Hosting_SiteInfoID';

    if not @ID is null
        set @SITEINFOID = cast(@ID as uniqueidentifier);

    select @LINKURL = cast(value as nvarchar(500)) from sys.extended_properties where class=0 and name=N'Hosting_LinkURL';

    select @ISHOSTED = INSTALLATIONINFO.ISHOSTED from dbo.INSTALLATIONINFO where INSTALLATIONINFO.ID = 1;

    return 0;