Feed on
Posts
Comments

SQL0551N does not have the privilege to perform operation “SELECT” on object

If a user receives this error while creating views, make sure the user is granted SELECT privilege individually. Group privileges are not considered for any table or view specified in the CREATE VIEW statement.

No, its not a bug. Its documented :)

Cross-node recovery - TSM

To recover/access the backup image of the database that was backed up from a different server. Typically to access production database from dev/qa

Comment out “PASSWORDACCESS = generate” in file “/usr/tivoli/tsm/client/ba/bin/dsm.sys” by adding a ‘*’ in the beginning of the line.

Now we should be able to query any backup image, provided you have the required details.

db2adutl query db <dbname> nodename <nodename> owner <owner> password <passwd>

Update the following db parameters in the target db with source db values from dsm.sys to restore the db backed-up from a different server

  • TSM_NODENAME
  • TSM_OWNER
  • TSM_PASSWORD

Now restore the database with ‘use adsm’ on the target server.

NOTE:

  • Revert back the dsm.sys & db params after the refresh. Else local backups to TSM will fail.

Other References: IBM Documentation



db2_all “<<+$nodenum<db2 connect to $dbname; db2 export to $filename of del select * from $tablename where nodenumber($partitioningkey)=$nodenumber”

Example:

db2_all “<<+11<db2 connect to testdb; db2 export to /backup/test_table.del.11 of del select * from test_table where nodenumber(ID) = 11; db2 terminate”

NOTE:

  • Useful for large tables.
  • Be sure to export all the partitions in which the table is defined.
  • Export each partition to seperate filesystem for better performance.

Older Posts »