Forums: Community: Campground:
Hear ye, hear ye
RSS FeedRSS Feeds for Campground

Premier Sponsor:

 


reno


Mar 16, 2010, 4:14 PM
Post #1 of 5 (399 views)
Shortcut

Registered: Oct 30, 2001
Posts: 18283

Hear ye, hear ye
Report this Post
Can't Post

All ye SQL Gods, come forth and hear my plea:

If a given server has multiple DBs on it, is there a way to determine if there are TWO databases that have the same table name within?

So, SQLDB1 and SQLDB9 both exist on ServerABC.

Can I, without manually scrolling through, determine if there is a table "dbo.table1" in BOTH SQLDB1 and SQLDB9?

Make sense?

Thanks,


Partner neuroshock


Mar 17, 2010, 8:40 AM
Post #2 of 5 (356 views)
Shortcut

Registered: Nov 5, 2003
Posts: 680

Re: [reno] Hear ye, hear ye [In reply to]
Report this Post
Can't Post

What databases are being used? Both Oracle? One Postgresql and one MySQL? etc.

You mean something done in one query spanning DBs versus having to run a query per database?

-Mike


reno


Mar 17, 2010, 3:08 PM
Post #3 of 5 (328 views)
Shortcut

Registered: Oct 30, 2001
Posts: 18283

Re: [neuroshock] Hear ye, hear ye [In reply to]
Report this Post
Can't Post

neuroshock wrote:
What databases are being used? Both Oracle? One Postgresql and one MySQL? etc.

You mean something done in one query spanning DBs versus having to run a query per database?

-Mike

Both are SQL2005.

And yes... trying to determine if a given table name is used in more than one DB.


bill413


Mar 18, 2010, 6:01 AM
Post #4 of 5 (308 views)
Shortcut

Registered: Oct 19, 2004
Posts: 5674

Re: [reno] Hear ye, hear ye [In reply to]
Report this Post
Can't Post

reno wrote:
neuroshock wrote:
What databases are being used? Both Oracle? One Postgresql and one MySQL? etc.

You mean something done in one query spanning DBs versus having to run a query per database?

-Mike

Both are SQL2005.

And yes... trying to determine if a given table name is used in more than one DB.

Well, if no one else chimes in with a nicer way to do it, my (hopefully) quick and dirty way would be to run out a list of all the table names in each db (SELECT * FROM INFORMATION_SCHEMA.TABLES) into a file, load it into Excel (or whatever), and check for duplicates there.

I do have a tool for finding duplicates in a spreadsheet column, if you would find that useful.


Banzorred


Mar 18, 2010, 6:18 AM
Post #5 of 5 (304 views)
Shortcut

Registered: Mar 18, 2010
Posts: 4

Re: [reno] Hear ye, hear ye [In reply to]
Report this Post
Can't Post

phpMyAdmin should tell you that quickly.


Forums : Community : Campground

 


Search for (options)

Log In:

Username:
Password: Remember me:

Go Register
Go Lost Password?



Follow us on Twiter Become a Fan on Facebook