Packager and Linked Servers

dm4714dm4714 Posts: 28
edited April 19, 2005 1:02PM in SQL Packager Previous Versions
Does/Can SQL Packager support the ability to connect to Linked Servers?

I have an application that has local tables and stored procedures. However, I need to connect to a remote server.

I would like SQL Packager to prompt or something for the Linked Server information so it can be automatically created.

If SQL Packager doesn't support this, does anyone know of any workarounds?

Comments

  • Hi

    Packager does not currently have the ability to recognised a linked server, and recreate the link in a target server.

    This is a question that has been raised on occasion, and so far the only work around is to manually create the entry or use the store procedure sp_addlinkedserver, and maybe sp_addlinkedsrvlogin, in a custom script.

    Regards
    Dan
    Daniel Handley
    Red Gate Software Ltd
  • OK--I guess my only other question with this is:

    If I use a custom script, I assume I can include this and run it as part of Packager?

    If so, how can I obtain user input to pass to the script? I mean, it would be different per installation based on user requirements.
  • Danial - you mentino custom scripts. Will Packager support this functionality in the near future?

    Also, it would be nice if the Servername, Login name, Password, and database names could be passed as parameters to a custom script and replaced keywords within the script.

    This way generic .sql scripts can be created that can use fields from SQL Package.

    A script script for example:

    USE master;
    GO
    EXEC sp_addlinkedserver '%SERVERNAME%', 'SQL Server'
    GO
    EXEC sp_addlinkedsrvlogin '%SERVERNAME%', 'false', '%LOCALLOGIN%', 'myremotelogin', '%PASSWORD%'
    GO
This discussion has been closed.