Find the database by table name

Here's the scenario: 1.  You have been given a script to run.2.  You do not know the database name.3.  You know which server.Substitute the word "TABLENAME" with the table name in the script and run in query analyzer.  This query will check every database on the server and return the name of the database with […]

2 (1)

2007-04-26 (first published: )

455 reads

Blogs

Daily Coping 26 Jan 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Rowcount estimates when there are no Statistics

By

When you don't have statistics, what does SQL use to calculate the estimated number...

Synapse Analytics and .NET for Apache Spark Example 4 - JOINS

By

This is a bit of a longer one, a look at how to do...

Read the latest Blogs

Forums

Accessing a RESTORING database for test refresh

By Pete Bishop

I have a requirement whereby testers on ServerA need a copy of the production...

How to get value portion key to every rn from 1 to 3 row on one row?

By ahmed_elbarbary.2010

I need to get value portion key to every 3 row on one row...

Median Processing time, Average Procesisng time for created/closed date

By mnr123

  We have sharepoint as the data source and we have 2 dates created...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers