SIM v5
latest
  • Requirements
  • Installation
  • Manual
  • Knowledge Base
    • KB00001 - Silver Monkey Database Backup
    • KB00002 - Testing the SIM Web Service Test Tool
    • KB00003 - Setting Up Fixed WMI Ports
    • KB00004 - Restoring SIM Database
    • KB00005 - Resetting SIM Packaging Jobs
    • KB00006 - Establishing SCCM FolderID
    • KB00007 - Creating an IIS Website for Silver Monkey
    • KB00008 - Sending an Email in PackWF at the Push of a Button
    • KB00009 - Computer Refresh - AdminHowTo
    • KB00010 - Adjusting the IIS IDLE Timeout
    • KB00011 - Changing IIS App Pool to Service User
    • KB00012 - Full SQL Connection Pool
    • KB00013 - Activating and Updating License Key
    • KB00014 - Finding Log Files and ‘Configuration.xml’
    • KB00015 - Creating a System Report
    • KB00016 - Reinitializing AD Sync
    • KB00017 - Configuration Manager Rights
    • KB00018 - SCCM OS Notation
    • KB00019 - Installing and Configurating SQL
    • KB00020 - SIM SQL Database Rights
    • KB00021 - Disabling AD Sync
    • KB00022 - Known Issues
    • KB00023 - Copy Files fix Documentparsing
    • KB00024 - Create Serverlink with Alias and withCreds
  • Changelog
  • Supported Configurations
  • Support
SIM v5
  • Docs »
  • Knowledge Base »
  • KB00024 - Create Serverlink with Alias and withCreds
  • Edit on GitHub

KB00024 - Create Serverlink with Alias and withCreds¶

Use this sample SQL script to create an SQL serverlink to the wanted server. You can specify an alias and credetials in this script, default placeholders in the name of the linkedserverobject can be used to reference different sitenames.

-- Creates an SQL Server Link to the specified Server, provides an Alias with 'XXX' as placeholder for an Suffix. Specify an SQL User that is used for the Connection in the last lines.

USE [master]
GO
EXEC master.dbo.sp_addlinkedserver @server = N'SIM_CONFIGMGR_XXX', @srvproduct=N'sql_server', @provider=N'SQLNCLI11', @datasrc=N'SQLSERVERNAME'
-- Specify SQL Servername like this "simserver,1433" or specify the instance via backslash. 
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'connect timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'use remote collation', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SIM_CONFIGMGR_XXX', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
USE [master]
GO
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'SIM_CONFIGMGR_XXX', @locallogin = NULL , @useself = N'False', @rmtuser = N'SQLUSERNAME', @rmtpassword = N'SQLUSERPASSWORD'
GO
Next Previous

© Copyright 2018, Silver Monkey GmbH Revision 20a39559.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.