Welcome to Sign in | Join | Help
in Search

Link server

Last post 11-07-2008, 9:13 AM by tebbaerty. 5 replies.
Sort Posts: Previous Next
  •  11-06-2008, 6:13 PM 6088

    Link server

        Se poate crea un link server programatic ? adica sa fac un script care sa fie apelat si sa creeze el link server?

    stiu sa o fac in mod vizual dar as dori sa o fac programatic ...

    Orice tutorial e binevenit:D

    Multumesc anticipat
  •  11-06-2008, 6:14 PM 6089 in reply to 6088

    Re: Link server

    Din cate stiu pentru orice exista operatiune exista o procedura in spate... dar cum o gasesc? :(
  •  11-06-2008, 6:51 PM 6090 in reply to 6088

    Re: Link server

    sp_addlinkedserver sau din SMO
    Cind vrei sa afli cum face Management Studio vreo operatiune  potzi sa atasezi Profiler-ul la server si sa spionezi ce T-SQL foloseste SSMS.

    http://rusanu.com
  •  11-06-2008, 6:55 PM 6091 in reply to 6089

    Re: Link server

    BOL(msdn la mine Smile) zice pentru inceput sp_addlinkedserver (Transact-SQL) http://msdn.microsoft.com/en-us/library/ms190479.aspx 

    Late Edit: Trebuia sa dau refresh la pagina inainte de a posta mea culpa X3

     

  •  11-06-2008, 9:53 PM 6092 in reply to 6089

    Re: Link server

    tebbaerty:
    Din cate stiu pentru orice exista operatiune exista o procedura in spate... dar cum o gasesc? :(

    sau / ┼či


    Rezultat:

    USE [master]
    GO
    EXEC master.dbo.sp_addlinkedserver @server = N'LINK_SQL2000', @srvproduct=N'SSMS', @provider=N'SQLNCLI', @datasrc=N'server\instanta'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'collation compatible', @optvalue=N'false'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'data access', @optvalue=N'true'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'rpc', @optvalue=N'false'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'rpc out', @optvalue=N'true'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'connect timeout', @optvalue=N'0'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'collation name', @optvalue=null
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'query timeout', @optvalue=N'0'
    GO
    EXEC master.dbo.sp_serveroption @server=N'LINK_SQL2000', @optname=N'use remote collation', @optvalue=N'true'
    GO
    USE [master]
    GO
    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'LINK_SQL2000', @locallogin = NULL , @useself = N'True'
    GO

  •  11-07-2008, 9:13 AM 6095 in reply to 6092

    Re: Link server

    ooo ce tare e asta :D .... ma gandeam eu ca exista si se poate face ceva de genu (cum exista si la tabele ---script to create table ...) dar nu gaseam aici :D mutumesc :D
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems