473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to granr reorg privilege to any db2 user

I'm very new at db2 i'd like to grant reorg privilege to an user i tried with the following command
db2 => grant reorg on database DB_NAME to USR_NAME;

but it shows following error. can anyone help me on this

DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "reorg" was found following "grant ". Expected
tokens may include: "READ". SQLSTATE=42601
Mar 6 '11 #1
5 11300
vijay2082
112 100+
Hi,

FYI

There is no reorg privilege as such. The error shows it all.

Reorganizing tables online
An online or inplace table reorganization allows users to access the table while it is being reorganized.

You must have SYSADM, SYSCTRL, SYSMAINT, or DBADM authority, or you must have CONTROL privilege on the table to reorganize a table. You must have a database connection to reorganize a table.
You can perform an inplace table reorganization using a CLP command, using an SQL call statement, or through a DB2 API.
To reorganize a table online using the CLP, issue the REORG TABLE command using the INPLACE option :
db2 reorg table test.employee inplace

** After reorganizing a table, you should collect statistics on the table so that the optimizer has the most accurate data for evaluating query access plans

Cheers, Vijay
Mar 6 '11 #2
Hi vijay,

Thanks for information

i have give privilege as below to the group like below and restart db

update dbm cfg using SYSMON_GROUP user_group

and put the user on that group

But it shows the following error
SQL2214N The user does not have the authority to run the REORG utility on
table "TEMP".

Can you please help me on this regard

Regards,
Ikhtear
Mar 7 '11 #3
vijay2082
112 100+
Hi,

Are you using domain user groups ? Still the particular user doesn't have the privilege to perform reorg for the table.

What I will suggest you to give a privilege like one below to the particular user and paste the exact command and their output if you further get this error.

Step 1 ) db2 "connect to <DB_NAME>"
Step 2) db2 "grant DBADM on database to user <USER_NAME>"

Step 3) now connect to that database with user in step 2

db2 connect to <DB_NAME> USER <USER_NAME> password <USER_PWD>

Step 4) Once you connect to the database with the user successfuly, execute your reorg command.

Paste the output for each step if you have further issues.

Cheers, Vijay
Mar 7 '11 #4
Thanks vijay for your reply. i got it. i dont like to give dbadm to other than inst user.
Mar 7 '11 #5
vijay2082
112 100+
Hi,

If you don't want the DBADM then you can grant the control privilege on the table to individual user.

CONTROL
Grants:
All of the appropriate privileges in the list, that is:
ALTER, CONTROL, DELETE, INSERT, INDEX, REFERENCES, SELECT, and UPDATE to base tables
CONTROL, DELETE, INSERT, SELECT, and UPDATE to views
ALTER, CONTROL, INDEX, and REFERENCES to nicknames
The ability to grant the above privileges (except for CONTROL) to others.
The ability to drop the base table, view, or nickname.
This ability cannot be extended to others on the basis of holding CONTROL privilege. The only way that it can be extended is by granting the CONTROL privilege itself and that can only be done by someone with SYSADM or DBADM authority.

The ability to execute the RUNSTATS utility on the table and indexes.
The ability to execute the REORG utility on the table.
The ability to issue the SET INTEGRITY statement against a base table, materialized query table, or staging table.
The definer of a base table, materialized query table, staging table, or nickname automatically receives the CONTROL privilege.

The definer of a view automatically receives the CONTROL privilege if the definer holds the CONTROL privilege on all tables, views, and nicknames identified in the fullselect.


Cheers, Vijay
Mar 7 '11 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Raquel | last post by:
This question if for UDB on LUW. Suppose I take regular database backups of my database Monday: database backup <ts1> Tuesday: Tablespace reorged and imagecopied <ts2> Friday: database...
2
by: TomHorner | last post by:
I have several quick questions about reorg's, and a request (favor). 1. The documentation says that reorg "Reorganizes an index or a table" I cannot see how one would reorg ONE particular index...
16
by: andy.standley | last post by:
Hi, we are running DB2 V8.2 (8.1.0.80) on redhat linux and I am trying to set the reorg to be online. I use the control center on the box - db2cc and then configure automatic maintenance wizard -...
9
by: mike_dba | last post by:
I am using DMS raw. I have a tablespace which is defined with 5 containers each allocated at 1.5 GB for a total of about 7.5 GB. I did a major deletion followed by a reorg and a runstats. I am...
9
by: Mikael | last post by:
Must admit, I am new to DB2: Seems I can not issue command REORG TABLESPACE: Commands Entered: REORG TABLESPACE SBO_DB.TS_SBO_SAFE; SQL0104N An unexpected token "TABLESPACE" was found...
12
by: wheels619 | last post by:
How can I get access for another user's special folder locations? A configuration file is stored in the users' appData folder and the program altering it will be ran under the admin.
2
by: sethwai | last post by:
Hi, I have a nightly script that executes inplace reorgs allow write access for several tables after a previous script does a large number of delete operations. It usually has been executing...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
5
by: Steve | last post by:
Hi All I have several vb.net 2005 apps which have run fine until now A new customer has set up windows XP with restricted users When my application starts I get errors, when accessing the...
0
by: bwmiller16 | last post by:
Hi All - OSName: AIX NodeName: dr_aixdb01 Version: 5 Release: 3 dr_aixdb01$db2level DB21085I Instance "db2inst1" uses "64" bits and DB2 code release "SQL08027"
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.