Linked servers passwords

1) once a linked server is setup between 2 SQL Servers, do users have to enter the password for the account used in the link each time they want to query the remote server, or once that trust is established is there no need for a password?
2) And secondly, if the link is created with an account with an account with sysadmin permissions, does that mean every user essentially has sysadmin permissions over the remote server?

Hello,
1) No, you don't Need to enter a password again
2) Depends on the user mapping / security settigs for the linked Server, which permissions to current user will have.
For more details see
Security for Linked Servers and the follow up links.
Olaf Helper
[ Blog] [ Xing] [ MVP]

Similar Messages

  • Union All with Linked Servers - Works until loaded on to the report server then fails.

    Hi,
    On our production server I have 2 linked servers.  One that leads to ServiceNow via ODBC and one that leads to an HP Openview database.
    Testing these linked servers works fine.  I have a query that obtains info from each source and 'union all' together.  When i run this query in SQL Server management studio it works fine and I get info from both data sources union-ed together perfectly.
    I transfer this into Visual Studio and create a report, which again runs perfectly.
    I upload this report to the report server and try to run it and get the error: 
    An error has occurred during report processing. (rsProcessingAborted)
    Query execution failed for dataset 'Dataset1'. (rsErrorExecutingCommand)
    For more information about this error navigate to the report server on the local server machine, or enable remote errors
    When I rummage through the log files for the report server, I find very little helpful errors, basically this:
    ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: , Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset 'Dataset1'. ---> System.Data.SqlClient.SqlException: Cannot
    execute the query.
    I did a test where I created a copy of the report and ran only he Servicenow  section of the report and it works, then ran only the HP section of the report and it works.  It seems the UNION ALL is the problem somehow. 
    Anyone have any ideas??
    Thanks
    Kirsty

    Hi Kirsty,
    As you posted, this issue is caused by the security configuration of Linked Server.
    Generally, in a domain environment, we can specify a domain account as the stored credentials for the report, and then configure the Linked Server to "Be made using the login’s current security context".
    However,if we specify a SQL Server login as the stored credentials for the report, please set the Linked Server security to "By using this security context", and then providing the necessary credentials to authenticate at the linked server.
    Please also add the Reporting Services Security role to the Linked Server Remote Server Login Mappings.
    For more information about Creating Linked Servers, please refer to
    http://msdn.microsoft.com/en-us/library/ff772782.aspx
    About Security for Linked Servers, please refer to
    http://msdn.microsoft.com/en-us/library/ms175537.aspx
    Regards,
    Swallow

  • Compare two tables on different server without using Linked Servers

    I have an SSIS package that needs to compare a table to another table on another server.  Then only delete data from the first table if it exists in the second table.  
    I know this is possible with Linked Servers but we are doing away with them in my company.  Is there a way inside of SSIS to do this?
    Oh and I can't use a Data Flow since I don't know the table names or columns at run time (the whole package is dynamic) so I can't map the columns ahead of time.  
    So no MERGE JOIN unless it can be used outside of a Data Flow.  

    You 'll have to use the Data Flow Transformation, thing is, given the constraints, your only option seems to be in generating the package programmatically (using code).
    The type of a program would be a Windows Console. The program would expect a few parameters as the source and target tables along with any necessary connection parameters.
    Then use the merge join (being the easiest to code in) in an Execute SQL Task component.
    Examples of coding packages:
    Samples for creating SSIS packages programmatically
    PS: I can tell you, given your circumstances, at the very minimum the impact on the bottom line of your company is brittle apps accompanied with expensive maintenance which translates into reduced ROI from your tooling.
    Arthur My Blog
    The package is table driven and is a dynamic archival process.  The end user just fills in the framework table and the package archives data from within a certain time range.  The table can exist on any server, any database.  
    That part is done.  The part that still needs to be accomplished is to delete data out of the base table since it is archived.  I need a safe way of doing this and so thought to compare the archive table against the base table.  Because they
    can exist anywhere and can have any name I am not sure how to do this without Linked Servers.  That being said we will not have Linked Servers for this.  
    Is there another safe way to delete data out of the base table?

  • Trying to use Linked Servers in SQL 2005 to connect to RDB 7

    I'm looking for detailed info on how to set up a linked server in SQL 2005 to connect to my Oracle RDB 7 database (running on VMS). I'm able to connect via odbc using VS.Net and Sql Server 2005 Reporting Services. I'm not sure if I need to use the ODP.NET or not. I have created a generic linked server, but it requires me to use the OpenQuery function to access the data, which is not giving me the functionality I'm looking for.

    Hi doanpq,
    Please download and install OLE DB Provider for Visual FoxPro 9.0, which exposes OLE DB interfaces that you can use to access Visual FoxPro databases and tables from other programming languages and applications. Please see:
    http://www.microsoft.com/en-us/download/details.aspx?id=14839
    Then, please follow up the following article to create a linked server:
    Creating Linked Servers:
    http://technet.microsoft.com/en-us/library/ff772782(v=sql.105).aspx
    For more information, you can also take a look at the following article, especially Dave K's comment:
    http://blog.dbase.integralwebsolutions.co.za/2008/10/accessing-your-dbf-tables-via-linked.html
    Elvis Long
    TechNet Community Support

  • Script out all linked servers. Is it possible?

    Hi All,
    Is there any query available for scripting out all linked servers which can be used while migrating from one sql instance to another sql instance? We have like 40 odd linked servers which has to be scripted out and moved to new server.
    We are doing migration from sql server 2008 r2 to sql 2014.
    Thanks in Advance.

    Hello,
    Try the following resource.
    http://www.sqlservercentral.com/scripts/Miscellaneous/30620/ 
    http://sev17.com/2010/07/06/scripting-linked-servers/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Distributed Transactions and Linked Servers

    I'm somewhat of a novice with SQL Server but I'm learning rapidly from an application I'm developing that uses SQL Server very heavily. In conjunction with the development of this application, I have 3-4 systems set up running SQL Server and I am using those
    systems to develop the database that will ultimately support the application. I decided to try to use linked servers because I am moving data back-and-forth among the different servers frequently and I ran into some consequences that I wasn't expecting.
    I was doing a simple delete query on one of the servers (Delete from TableName Where ...) and I was expecting, of course, that it would only impact the server I was running it on; however, when the query finished after running for a long time, it was apparent
    that SQL Server had automatically escalated that simple delete query into a distributed transaction and applied it to all four of the linked servers I had defined.  I was totally surprised by that and it took some time to recover the data that was inadvertently
    lost on the other servers.
    I want to ensure that this doesn't happen again without me expecting it - I think the right way to prevent this from happening is to run the following stored procedure:
    EXEC sp_serveroption 'servername', 'remote proc transaction promotion', 'false';
    Can someone please verify that this assumption is correct and will prevent SQL Server from automatically creating distributed transactions impacting multiple servers?
    Thanks,
    Chuck

    Hello,
    Based on your description, it seems that when you connect to a SQL Server database and execute a DELETE statement to delete a recode on a table, and then the same recode were delete in the linked server which has the same table.
    As pre my understand, the statement executed on one server will not  apply to the linked servers unless you specify the logic yourself in the application. For example, you use dynamic query and exec the query synchronously on  linked servers.
    What's more, did you specify replication between this linked server?
    If I have any misunderstanding, please let me know.
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here.
    Fanny Liu
    TechNet Community Support

  • Linked servers:Using 64 and 32 bit ODBC providers concurrently

    I have a very odd problem that I hope someone can help me with.  I have a 64 bit odbc MySQL driver.  Unfortunately, although I can connect to the data source from the control panel, the linked server cannot connect to the MYSQL data source.  The
    funny thing is that other linked servers (using the same odbc driver) have no problem connecting to their respective hosts.  The problem seems seems to be between the 64 bit linked server and the host (a shoretel IP phone database that runs on top of
    windows).  I know that the 32 bit driver used to work, but when I rebuilt the server to 64 rather than 32 bit the linked server failed.  What I am trying to do is to use both 64 bit driver and 32 bit driver concurrently (I have installed the 32 bit
    version using the WOW 32 bit odbc tool, but because the SSMS provider dialog only allows me to use the 64 bit system dsn.  I am wondering if I can get the 32 bit version to work as well using a user rather than system dsn.  Is this possible?  I
    can send screenshots of the problem if needed.  Thanks in advance for any advice you can offer.

    What I am trying to do is to use both 64 bit driver and 32 bit driver concurrently
    You can not. You can only use provider of the same 32/64 bit architecture as the SQL Server have.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Executed as user: ADMIN\abc-SQLServer. Linked servers cannot be used under impersonation without a mapping for the impersonated login. [SQLSTATE 42000] (Error 7437). The step failed.

    Hi All, 
    We have verified permissions on both sides,current server and linked server, the user has sysadmin.
    Another key piece of information is that this is happening when executing a SQL Job.
    Thanks.

    Related:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/328616e9-42cb-40d7-a4b1-671d6a492d8f/linked-servers-cannot-be-used-under-impersonation-without-a-mapping-for-the-impersonated-login?forum=sqldatabaseengine
    https://support.microsoft.com/kb/2492477?wa=wsignin1.0
    http://sshakespeareblog.co.uk/2013/07/31/sql-linked-server-and-sql-server-agent/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • SQL Server linked servers screens SSMS

    Where in SSMS can you get to the "linked server" screen for configuration details for existing linked servers, as opposed to setting up a new linked server, I want to check the security tab via the software GUI as opposed to running SQL. I cant
    see where you can see them, I know from memory when setting up a new linked server there is a "general", "security" and "server options" tabs, so I assume you can see all of those for already created linked servers.

    Check Server Objects --> Linked Servers  in SSMS object explorer.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Linked servers to many sqlite databases

    I have around 600 sqlite databases and I have to be able to access them in sql server. I can create a linked server for anyone of these database and access data that way. But what should be the approach to be able to access the data (read-only) in all
    of these databases? Please don't suggest data copy :)

    I am sorry, I was not clear enough in my original post. 
    I have Sql Server and all 600+ sqlite databases on the same physical box. I need to be able to execute query (in SQL management studio) like this:
    select a.machine, b.*
    from machines a
    inner join MACHINEDATA...performance b on b.machineid = a.id
    In this query MACHINEDATA is the linked server that points to "performance435" sqlite database and performance is a table in "performance435" sqlite database.
    Everything works just fine, except that I have 614 of these "performanceXXX" sqlite database files and I can't create that many linked servers manually.
    So, the question is - how to arrange access to these 614 databases through SQL server management studio to be able to execute queries similar to the example above.
    Thanks.

  • Linked servers

    HI all,
    i am using oracle10g and operating syustem MS xp.I need to fetch the tables in oracle Db from the sql server 2005.i tried out by linked servers.but itz not working.i know itz not fair posting a question of issue in sql server.bt i would bre appreciate if any one help me in this.
    Thanks in advance

    Please post in the general database forum instead of here; SQL Developer is a tool.
    Anyway, you'd need Oracle's ODBC driver for connecting from third party apps.
    Regards,
    K.

  • Linked Servers or not?

    Our company uses a number of different database platforms, including Oracle, MSSQL, DB2 etc.
    Up to now we have used Linked servers in SQL to link to the other platforms to facilitate data transfer between them, but have been told today that this is not an acceptable practice and we should use a third party (home grown .NET) application, running on a different server, to initiate and process the requests between the servers.
    One reason indicated for this being that it is bad practice to place drivers such as Oracle, Informix, etc on the Database servers and they belong on application servers only.
    We are a little stunned at this news and would like to see what other DBAs think of and reason out this protocol, so we may better understand or, conversely, have some ammunition to place a reasonable argument (apart from the months of re-writes to overcome this change in policy).
    ANY comments from either side of the fence on this would be greatly appreciated.

    Please contact your Sun representative or Sun pre-sales support.
    These forums are only user-to-user.

  • Linked servers query

    where can you see linked servers configured in our sql server instance, is there a SQL query? And will it list under which account the link has been configured?
    By default can everyone make use of this linked server?
    What do people setup linked servers, for what purpose do they serve?

    Linked Query configuration information
    http://support.microsoft.com/kb/203638/en-us
    For other details and security details 
    http://www.databasejournal.com/features/mssql/article.php/3691721/Setting-up-a-Linked-Server-for-a-Remote-SQL-Server-Instance.htm
    Why linked Server,
    remote access to the server
    Query distributed query on heterogeneous data source
    ---Prashanth

  • Linked Servers Msg 7303

    Hi,
    I have some trouble with Linked Servers after upgrade of Sql Server 2005 to SP3. In my previous version the connection to the oracle database worked. Now i try to execute a simple SQL from the SQL Server Management Studio:
    select * from ORATEST1...DUAL
    It endups with the following message:
    OLE DB provider "OraOLEDB.Oracle" for linked server "ORATEST1" returned message "".
    Msg 7303, Level 16, State 1, Line 1
    Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "ORATEST1".
    Anyone more than me that have this problem? Is there a solution?

    Networks team have sorted this. Apparently it was a firewall issue.
    The explanation they gave was:
    Enabled windows port group bi-directionally following example of other links that work across the firewall
    This allows direct machine identity via NETBIOS which avoids lookups via DNS
    For port  info
    http://technet.microsoft.com/en-us/library/cc959833.aspx
    Cheers, AndySugs

  • Error handling not available with linked servers

    Hello,
    I have a stored procedure which inserts data to a linked mysql Server. The table in mysql has a unique key and I try to insert a new record with a conflicting key.
    My problem is that I am not able to do an error handling because my script stops immediatly when the error in the SP occurs.
    The error message itself is ok. But why is the script cancelled? So I don't have a possibility to do some error handling. I am working against SQL Server 2000. No TRY CATCH is available.
    Here is my code:
    DECLARE @RC int
    DECLARE @ItemNr nvarchar(255)
    DECLARE @Hostname nvarchar(255)
    DECLARE @IpAdresse nvarchar(255)
    DECLARE @LogLevel int
    DECLARE @Message nvarchar(1000)
    DECLARE @LocalError int
    -- Error handling is working as expected
    PRINT 1/0
    SELECT @LocalError=@@ERROR
    IF @LocalError<>0
     PRINT 'Error'
    ELSE
     PRINT 'Success'
    SELECT @ItemNr='AN12326m', @Hostname='hostname' ,@IpAdresse='ipadresse', @LogLevel=99, @Message='Test', @RC=0
    -- Error handling does not work
    EXECUTE [Asset].[dbo].[p_kapaya_DbSync_InsertMySqlRecord]
       @AssetNr, @Hostname, @IpAdresse, @LogLevel, @Message OUTPUT, @RC OUTPUT
    -- The following code is not reached, when an error occurs because the execution of the script is cancelled
    SELECT @LocalError=@@ERROR
    IF @LocalError <>0
     PRINT @LocalError
    ELSE
     PRINT 'Success'
    Error Message
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' hat die Meldung '[MySQL][ODBC 5.1 Driver][mysqld-5.0.67-community-nt]Duplicate entry 'AN12326m' for key 1' zurückgeben.
    Meldung 7343, Ebene 16, Status 2, Prozedur p_kapaya_DbSync_InsertMySQLRecord, Zeile 57
    Der OLE DB-Anbieter 'MSDASQL' für den Verbindungsserver 'MySQL' konnte INSERT INTO für die [MSDASQL]-Tabelle nicht ausführen.
    Kind regards
    Patrick

    This is not unique to linked servers. When an error occurs, there are several actions that SQL Server can take. It can abort the batch, it can abort the current scope or it can just termintate the current statement. Any active transaction may or may not
    be rolled back. And this is not all.
    Which of these actions, SQL Server takes it is hard to predict, becuase the developers have to have rolled a dice on deciding which action to take. Although, if you have SET XACT_ABORT ON, it is more consistent: in this case, most errors aborts the batch
    and rolls back the transaction.
    To trap the error, you need to use TRY-CATCH which permits you to trap most (not all) errors. See here for a quick introduction:
    http://www.sommarskog.se/error_handling_2005.html
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Error message when I click on the iTunes store icon in iTunes

    whenever I click on the iTunes store icon in my Itunes it says "iTunes could not connect to the itunes store. Make sure your network connection is active and try again. I run the diagnostic in the help menu and it says my connection is fine and I can

  • Change height of column in Analysis

    Hi, I have a simple analysis that I use to write comment back to the database, it works fine but the users have asked if I can increase the size of the input box on the dashboard. I have had a look and I can't find any default functionality to do thi

  • Layout centering issue with BoxLayout

    The code is two BoxLayout panels placed in a frame with FlowLayout. I cannot get the second panel's label to be centered. I purposely made both panels identical. Any ideas what I am missing? import java.awt.*; import javax.swing.*; public class MVCte

  • Add new administrator to an existing OnPlus site

    Hello, I would like to add myself to an existing OnPlus site (device) as another administrator of the site. My colleague who already has access to the site, did the steps explained in  Adding and Managing Authorized Agents of the Document OnPlus Port

  • May i know how to use Lab Windows CVI to generate serial I/O?

    i'm using CVI labwindow software now, i would like to use it to generate serial digital input/output data by using an instrument data acqusition card,PCI-DIO-32HS. THank you very much.