If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Snapshot table functions Vs GET SNAPSHOT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-10-07, 11:51
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Snapshot table functions Vs GET SNAPSHOT

I read in an article that GET SNAPSHOT needs instance attachment whereas any SNAPSHOT TABLE FUNCTION needs database connection.What is the reason behind this difference??
Reply With Quote
  #2 (permalink)  
Old 12-10-07, 12:27
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Because the Table function definitions are stored in the database and SQL statement has to be executed to get the snapshot.

Cheers
Sathyaram

Quote:
Originally Posted by nivasreddy007
I read in an article that GET SNAPSHOT needs instance attachment whereas any SNAPSHOT TABLE FUNCTION needs database connection.What is the reason behind this difference??
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 12-10-07, 12:30
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
So,the tables functions are stored as metadata ?? What about the info for the GET SNAPSHOT FUNCTION..They are also stored in tables right??
Reply With Quote
  #4 (permalink)  
Old 12-10-07, 12:46
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
http://publib.boulder.ibm.com/infoce...c/r0001449.htm

This is the API that gets snapshot information.

The GET SNAPSHOT command and the TABLE FUNCTIONS (which is EXTERNAL LANGUAGE C, BTW) are two different interfaces that call this API to get the information.

All table functions(whether snapshot or not) has to reside in a database and can be called using SQL. In the case of snapshot functions, the table function is an EXTERNAL LANGUAGE C function. The C program calls the snapshot API. Hence, to get the snapshot you have to connect to the database.

In case of GET SNAPSHOT command, the program for calling the snapshot API is invoked directly(ie, without going through SQL) and hence does not need a database connection.

In both cases, the instance snapshot information is held by DB2 in the same place (NOT inside the database).

These are just two different methods for accessing that information.


HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #5 (permalink)  
Old 12-10-07, 15:11
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Thanks for the information.Where does the information(counters) of the snapshot monitors get stored ??Does it get stored in system monitor heap??
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On