Any databasers out thurr?

CmdrFly

Perma-Hammed
Adventurer
Joined
Aug 19, 2004
Messages
12,593
Age
43
Location
Valhalla
Linkshell
PheonixPimps
FFXIV
Cmdr Fly
Our Cisco Unity voicemail server has 6 databases:
  • master
  • model
  • msdb
  • ReportDb
  • tempdb
  • UnityDb
Two questions:
  1. Which of those are standard databases on MS SQL servers?
  2. ReportDb is currently "recovering". What does that mean?

Another thing, I'm looking for a specific table in one of these databases. I don't know what the table is called, I only know what one of the record fields is called. Is there any way to run a search on all databases on this server, by looking for a record field only?

I've tried looking through the tables one by one, but there's something to the collective tune of 600 tables in these databases. Very good chance I missed the table I need.
 
Skabump. There's gotta be some sort of db nerd perusing these forums.
 
Heh, I'm more of a PostgreSQL guy, but I'd say you're screwed if you don't know what table it was coming from. However, you could check the query log for the the fields that you know and from that figure out which table its accessing.

Although, this depends on a few things. Are they running the Windows version of MySQL or the UNIX version (like they should be ;-) )?

Also, the mysqld process should have been executed with a '-log' switch to log all queries that come through on the server.

Anyway, if general query logs were enabled, you have to check in the data/ directory on the server itself for the text dumps. If you don't have general access to the server (or if it's UNIX and you don't have root access), then you're kinda stuck looking for the table by hand.


To answer your other questions; None of those databases are 'standard'. If anything, 'tempdb' might have been setup at compile/install time and never removed. Although, it would be empty if that was the case. As regular user connecting to the DB, you wouldn't be able to see the internal databases in the 'show database' list anyway (stuff that houses user information, etc).

As far as 'recovering' goes, there might have been a data corruption that it was repairing, or perhaps its one node on a database cluster and it's recovering from the master server. It's hard to say from here.
 
It's Windows SQL I think. I haven't dabbled with, nor know how to dabble with, command-line queries so I'm using the Enterprise Manager snap-in for MMC. I would imagine Unix SQL doesn't have such a snap-in but I could very well be wrong. Both our CallManagers and our Unity servers are all running Win2k as the gui.

I'll peruse the disk and look for some dumps, I know I saw a few db folders I can scan. As for permissions, I manage the IPT system here so I have full admin rights to the servers.

I thought some of those db's would be created by default, but I stand corrected on that. The contents of those db's are mostly... crap. Stuff I can't even decipher, just fields like pkid and MSTransRep and so on. Figured they were installed by default with SQL server to serve as master key references or something of the sort, but this goes to show how little I know of SQL. All of those db's have tables and are populated with records.

That database is also no longer 'recovering' so I guess it fixed itself. There's no cluster for these db's, just single hosts collecting minor data.

Thanks for the help Raz, appreciate it.
 
CmdrFly said:
It's Windows SQL I think. I haven't dabbled with, nor know how to dabble with, command-line queries so I'm using the Enterprise Manager snap-in for MMC. I would imagine Unix SQL doesn't have such a snap-in but I could very well be wrong. Both our CallManagers and our Unity servers are all running Win2k as the gui.

I'll peruse the disk and look for some dumps, I know I saw a few db folders I can scan. As for permissions, I manage the IPT system here so I have full admin rights to the servers.

I thought some of those db's would be created by default, but I stand corrected on that. The contents of those db's are mostly... crap. Stuff I can't even decipher, just fields like pkid and MSTransRep and so on. Figured they were installed by default with SQL server to serve as master key references or something of the sort, but this goes to show how little I know of SQL. All of those db's have tables and are populated with records.

That database is also no longer 'recovering' so I guess it fixed itself. There's no cluster for these db's, just single hosts collecting minor data.

Thanks for the help Raz, appreciate it.

Ah, I see. Yeah, I haven't had much experience with Windows database solutions so they very well could have default databases for all I know.

No problem, good luck :)
 
DISCLAIMER: I am NOT a MS SQL pro. However, I am an expert in a different datase system and can apply common database knowledge here.

query the data dictionary. the data dictionary contains meta-data about the database.

I believe MS SQL has a COLUMNS view in the INFORMATION_SCHEMA schema. Perfect view to query if all you know is the column name.

This sql statement should return your column name and table name. just replace the database_name, and column_name for actual values.

Code:
Select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
From [I]database_name[/I].Information_Schema.Columns
Where COLUMN_NAME = '[I]column_name[/I]'

I don't actually have an MS SQL database to test this on.
If anything, this will at least give you a lead.

you may also have to run this for each database, though I think you want the UnityDb.
I don't know if you can query across databases.
 
Last edited:
Freakin wootz, I'll try it oro. Thanks a titload.
 
Oropher said:
Code:
Select TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
From [I]database_name[/I].Information_Schema.Columns
Where COLUMN_NAME = '[I]column_name[/I]'
[/quote]
 
Microsoft Access? lol
 
Back
Top