Retrieve information from CSDB - Whereabouts of the data


Userlevel 2
Badge +3

When creating workflows or reports you need to refer CSDB directly.
If you can find out appropriate views or examples (in this community for instance), this would be helpful.
But most of the cases there's no clue to identify the whereabouts of the data which you need to retrieve, this is a technique how to find out the data from CSDB.

Suppose you want to identify the table location of subclient entry like:

 

First prepare for "Full-text search" on CSDB using this kind of technique:
Search all tables, all columns for a specific value SQL Server [duplicate]
, this query can search all tables for specific text, I'm creating this query as stored procedure for convenience and pass some literals to find out.

Next, you should create easily-to-search text like:

Then search entire CSDB using the query above, results like this:


Bingo, the subclient content must be stored in a table named APP_ScFilterFile .
There should be some knowledge to exclude unnecessary information, for instance, 3rd one indicates Audit Trail history data which indicates you inserted a new content path, so this won't contain the actual configuration values.

So let's see the table itself:

This is it but something we cannot see the actual structure of this table, so excluding where clause:

There exist 2 entries for same "componentNameId" value as 33, what does it mean, ...?

Answer is, this indicates Subclient ID, which I briefly explained in this article, so let's look into App_Application table:

This should be correct but cannot be 100% sure from the subclientName as default, so let's check backupSet name from the ID as 25:

Yes this is the one as I used errortest backupset for this search:

This technique can be used for any other, slightly tricky but serving the purpose.

Hope this helps,


0 replies

Be the first to reply!

Reply