title: Find database location of a table
body: <p>I have several databases in my SQL Server 2008. And I forgot where some tables from, so I need to ask if there's a such query that finds the database location of a certain table?</p>
  
  <p>I need something goes like this:</p>
  
  <pre><code>SELECT DATABASE_NAME FROM SQLSERVER WHERE TABLE= "TBL_PRODUCTS"
  </code></pre>
  
  <p>Addition:
     Now, i need to know the database location of certain Views and Stored Procedures</p>
  
  <p>Something like this:</p>
  
  <pre><code>SELECT DATABASE_NAME FROM SQLSERVER WHERE VIEW= "VW_PRODUCTS"
  
  SELECT DATABASE_NAME FROM SQLSERVER WHERE StoredProcedure= "SP_PRODUCTS"
  </code></pre>
  
  <p>Thanks!</p>