|
reno
Mar 16, 2010, 11:14 PM
Post #1 of 5
(412 views)
Shortcut
Registered: Oct 30, 2001
Posts: 18283
|
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,
|
|
|
|
|
neuroshock
Mar 17, 2010, 3:40 PM
Post #2 of 5
(369 views)
Shortcut
Registered: Nov 5, 2003
Posts: 680
|
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, 10:08 PM
Post #3 of 5
(341 views)
Shortcut
Registered: Oct 30, 2001
Posts: 18283
|
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, 1:01 PM
Post #4 of 5
(321 views)
Shortcut
Registered: Oct 19, 2004
Posts: 5674
|
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, 1:18 PM
Post #5 of 5
(317 views)
Shortcut
Registered: Mar 18, 2010
Posts: 4
|
phpMyAdmin should tell you that quickly.
|
|
|
|
|
|