zoukankan      html  css  js  c++  java
  • SQL Server 创建链接服务器的脚本,自定义链路服务器的简短名称

    USE [master]
    GO

    /****** Object:  LinkedServer [SQL01]    Script Date: 2020/4/9 11:51:17 ******/
    EXEC master.dbo.sp_addlinkedserver @server = N'SQL01', @srvproduct=N'', @provider=N'SQLNCLI', @datasrc=N'域名或者IP'
     /* For security reasons the linked server remote logins password is changed with ######## */
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'SQL01',@useself=N'False',@locallogin=NULL,@rmtuser=N'账户',@rmtpassword='密码明文'

    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'collation compatible', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'data access', @optvalue=N'true'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'dist', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'pub', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'rpc', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'rpc out', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'sub', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'connect timeout', @optvalue=N'0'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'collation name', @optvalue=NULL
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'lazy schema validation', @optvalue=N'false'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'query timeout', @optvalue=N'0'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'use remote collation', @optvalue=N'true'
    GO

    EXEC master.dbo.sp_serveroption @server=N'SQL01', @optname=N'remote proc transaction promotion', @optvalue=N'true'
    GO



  • 相关阅读:
    第九篇装饰器基本原理
    第八篇迭代器协议和生产器
    python第六篇文件处理类型
    Python开发【第十篇】:模块
    习题练习
    2.2.6 集合
    第七篇 python基础之函数,递归,内置函数
    Python开发【第五篇】:Python基础之杂货铺
    Python开发【第四篇】:Python基础之函数
    详解CSS position属性
  • 原文地址:https://www.cnblogs.com/hualiuliu/p/12665909.html
Copyright © 2011-2022 走看看