dbTalk Databases Forums  

Does a backup capture binds?

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss Does a backup capture binds? in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard
 
Posts: n/a

Default Does a backup capture binds? - 05-07-2010 , 12:08 PM






I was told to run this command to fix an issue we're having in a dev
environment.

db2 connect to my-db
db2 bind @db2cli.lst blocking all grant public sqlerror continue
CLIPKG 5

If I backup my-db in this enviroment and restore it in another
environment where the
bind has not been done, do I need to run the bind in the new
environment, or does the
affect of the bind come over in the backup?

Thanks.

Reply With Quote
  #2  
Old   
Ian
 
Posts: n/a

Default Re: Does a backup capture binds? - 05-07-2010 , 01:23 PM






On 5/7/10 10:08 AM, Richard wrote:
Quote:
I was told to run this command to fix an issue we're having in a dev
environment.

db2 connect to my-db
db2 bind @db2cli.lst blocking all grant public sqlerror continue
CLIPKG 5

If I backup my-db in this enviroment and restore it in another
environment where the
bind has not been done, do I need to run the bind in the new
environment, or does the
affect of the bind come over in the backup?

Thanks.
Binding creates entries in SYSCAT.PACKAGES. So, yes, a
backup/restore will include all bound packages.

That said, it's usually a good idea to bind the CLI packages
(contained in db2cli.lst) and utility packages (contained in
db2ubind.lst) on the target system, just to ensure that you're
binding the correct code.

Reply With Quote
  #3  
Old   
Richard
 
Posts: n/a

Default Re: Does a backup capture binds? - 05-07-2010 , 04:05 PM



Quote:
Binding creates entries in SYSCAT.PACKAGES. *So, yes, a
backup/restore will include all bound packages.

That said, it's usually a good idea to bind the CLI packages
(contained in db2cli.lst) and utility packages (contained in
db2ubind.lst) on the target system, just to ensure that you're
binding the correct code.
Thanks for the reply.

So if I do the binds again on the target, won't I end up with an
additional set of records
in syscat.packages? That is, 5 from the first bind in source
database, and then another
5 from the second bind on the target database (that was restored from
source backup)?

Should I be unbinding (however that's done) in the target before I run
the bind again?

Thanks, again. :-)

Reply With Quote
  #4  
Old   
Helmut Tessarek
 
Posts: n/a

Default Re: Does a backup capture binds? - 05-08-2010 , 04:23 AM



Hi Richard,

Quote:
So if I do the binds again on the target, won't I end up with an
additional set of records
in syscat.packages? That is, 5 from the first bind in source
database, and then another
5 from the second bind on the target database (that was restored from
source backup)?
No, the packages are overwritten, that is, if they have the same version
identifier and the same package name. The version identifier can be specified
by the VERSION keyword in the 'db2 prep' command.

This means, if you use the same bind files, the packages will be overwritten.

The CLIPKG keyword is used to change the number of possible statement handles
available to an CLI application.

Quote:
Should I be unbinding (however that's done) in the target before I run
the bind again?
No, this is not necessary, since they are overwritten. The correct command for
deleting packages would be 'db2 drop package'.

--
Helmut K. C. Tessarek
DB2 Performance and Development

/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/

Reply With Quote
  #5  
Old   
Richard
 
Posts: n/a

Default Re: Does a backup capture binds? - 05-08-2010 , 08:25 AM



Thanks so much for the answers. :-)

Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.