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 > Put Data secure from Admin

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-25-07, 06:03
sachinmiraje sachinmiraje is offline
Registered User
 
Join Date: Oct 2007
Posts: 3
Question Put Data secure from Admin

Hi Friends.....

This is sachin. working as DB2 DBA.

Accidentally, I fired following a command on production db
ALTER TABLE tablename ACTIVATE NOT LOGGED INITIALLY;

It got executed for a very important table.
Due to this command I loosed whole data from that table.

I had to get data restored from backups and log files...
I am thinking, if we had no backups then i will be out of job now.....
It is possible to restrict admin privilleges form such a commands.
But We are looking for a better solution for data security..
Let me know if i can do better than removing admi privilleges.....
Reply With Quote
  #2 (permalink)  
Old 10-25-07, 07:38
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
If you are working with admin privileges/authorization, you should know exactly what you are doing (and also document it).

It seems to me that you are missing a good setup for database administration tasks with the proper management of authorizations/privileges. So you should use some other user with SYSCTRL, SYSMAINT or whatever privileges you need for a specific task and no other, higher privileged user.

Also, activating NLI for a table doesn't change anything of you have auto-commit activated and/or if you don't change data in the transaction where NLI is active. If you had auto-commit (the default), then the data loss has a different reason.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 10-30-07, 10:02
sachinmiraje sachinmiraje is offline
Registered User
 
Join Date: Oct 2007
Posts: 3
Thanks stolze

Yes.
I am planning to generate a user with less privilleges and use it.

In the scenario, i was having auto commit on.
The statement made a data loss. I dont know for what reason i loosed the whole table data.

Thanks Stolze.
Reply With Quote
  #4 (permalink)  
Old 10-30-07, 10:49
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
As I said: if you had auto-commit on and run the ALTER TABLE statement, an implicit commit is executed at the end of the statement. That commit turns NLI off again. That's why I'm fairly certain that your data loss has a different reason and you should investigate that.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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