title: What is the reasoning for using OPENQUERY within a tsql stored procedure?
body: <p>I am currently reviewing some jobs that run stored procedures on a database.  All of these stored procedures are connecting to a linked server(s).  I am not too familiar with this functionality.  I am at the moment attempting to determine why these were used versus just a normal query as the queries I am running seem to be pulling in the data.</p>
  
  <p>I read this, which is MSDNs explanation of openquery. :</p>
  
  <p><a href="http://technet.microsoft.com/en-us/library/ms188427.aspx" rel="noreferrer">http://technet.microsoft.com/en-us/library/ms188427.aspx</a></p>
  
  <p>I also read this, which is a stackoverflow link talking about why not to use it on local server. :</p>
  
  <p><a href="https://stackoverflow.com/questions/2374741/why-is-using-openquery-on-a-local-server-bad">Why is using OPENQUERY on a local server bad?</a></p>
  
  <p>My question is do you basically just use this when the stored procedure requires the embedded credentials of the linked server?  Or are there more reasons for using OpenQuery that I am not aware of?</p>