cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Query : What is the difference between domain_*, nom_* and nb_* tables ?

romaint
Level 2

Hello,

I'm playing with SQL query in OpsCenter but I don't understand the difference between domain_*, nom_* and nb_* tables.

For example we find many similar informations in domain_Policy, nom_NBPolicy and nb_Policy tables. It seems redundant...

Which table should I use ?

Thanks !

Romain

1 ACCEPTED SOLUTION

Accepted Solutions

areznik
Level 5

nom_* are actually views not tables, they join a bunch of other tables in a predefined way. I think these are remnants from the Netbackup Operations Manager (NOM) days, back in the day what is now OpsCenter was 2 products - NOM and VBR which were duct taped together to make OpsCenter. These views represent queries that need to be run all the time - for example NBPolicy view joins policy, client and schedule tables to give a view thats very like the Policy section of the NB gui. 

I think nb_ tables are a remnant of a time when OpsCenter could connect to other backup products. nb_* tables were for storing info specific to netbackup and I would presume that if you used OpsCenter to collect from Legato or something then these tables would be empty (this is just a guess). 

And domain_* is your generic backup info that can be filled out regardless of what specific backup product you used, though i think since OpsCenter went Netbackup only these tables have taken on a lot of NB specific attributes and are no longer much different from the nb_* tables. 

The short answer is that these different names dont really mean too much anymore; just like it doesnt matter whether your cli commands start with 'bp' or 'nb'. Its just what happens when you have a complicated piece of software that grew in pieces over many years.

Now - which table should you use? What I do is check them all and see which of them has most of the columns you need and try to use that one to avoid making unnecessary joins. If you use nom_* tables keep in mind that just running 'select * from nom_NBPolicy' is executing a rather large query (152 lines) in the background and can reduce performance.

View solution in original post

4 REPLIES 4

areznik
Level 5

nom_* are actually views not tables, they join a bunch of other tables in a predefined way. I think these are remnants from the Netbackup Operations Manager (NOM) days, back in the day what is now OpsCenter was 2 products - NOM and VBR which were duct taped together to make OpsCenter. These views represent queries that need to be run all the time - for example NBPolicy view joins policy, client and schedule tables to give a view thats very like the Policy section of the NB gui. 

I think nb_ tables are a remnant of a time when OpsCenter could connect to other backup products. nb_* tables were for storing info specific to netbackup and I would presume that if you used OpsCenter to collect from Legato or something then these tables would be empty (this is just a guess). 

And domain_* is your generic backup info that can be filled out regardless of what specific backup product you used, though i think since OpsCenter went Netbackup only these tables have taken on a lot of NB specific attributes and are no longer much different from the nb_* tables. 

The short answer is that these different names dont really mean too much anymore; just like it doesnt matter whether your cli commands start with 'bp' or 'nb'. Its just what happens when you have a complicated piece of software that grew in pieces over many years.

Now - which table should you use? What I do is check them all and see which of them has most of the columns you need and try to use that one to avoid making unnecessary joins. If you use nom_* tables keep in mind that just running 'select * from nom_NBPolicy' is executing a rather large query (152 lines) in the background and can reduce performance.

romaint
Level 2

Thank you for your answer.

How do you know that nom_NBPolicy view query is 152 lines ?

Is there a way to see structure of a views ?

areznik
Level 5

Yep, Download Sybase Central, connect to your db and double click on any view, function or stored proc to see how its defined. 

Technote on how to connect here: http://www.veritas.com/docs/000009348

romaint
Level 2

Perfect ! Many thanks areznik :)