Tuesday, May 5, 2009

Stupid issue in accessing tables !!

Stupid me.. !! And I guess thats how I learn new things... !!

I got a request from our performance team that we have to move tables from default tablespace to new tablespace to improve performance.

So I did following

1. Created a duplicate tables
2. Preserved data by "insert into temp select * from main"
3. generated DDL with grants,aliases etc.
4. change the tablespace name in DDL
5. Drop main tables
6. Created new tablew with modified DDL containing new tablespace
7. Insert into new tables select * from temp
8. Runstats

Now , apps people came into pictures. Complain was that they can not access the table...!!

hmmm??? I was confused and could not find any visible issue with any of the grants !!

And finaly after 1 hour of excersice I figured out that when these tables were created by a content management product using application userid so that ID was the definer of those tables and did not need any grants.

I recreated these tables with dbadmin ID and so definer was dbadmin, not that application user.

So, what I did was just to recreate those tables using app userid and BINGOOO !!

Apps people were happy and I am happy....!!

Now I should go and eat something !!

C u all later,
Darshan
Finaly getting into this Blogging thing !!

Yes !! It is about DB2 UDB database administration and I am currently working on V8.2 and we are trying to move on to V9.5 but not sure when.

I hope whoever comes to visit this blog (if any... ) may tell me something new about the things that I don't know about DB2 UDB or about something else (which covers almost everything..!! )

So please join me and help me to learn something new about DB2 UDB Administration !!! Thanks, Darshan