473,836 Members | 1,254 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to granr reorg privilege to any db2 user

3 New Member
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 11398
vijay2082
112 New Member
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
ikhtear
3 New Member
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 New Member
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
ikhtear
3 New Member
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 New Member
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
7553
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 restored and roll-forwarded to a timestamp <ts3> on Wednesday. Now my question is: because the entire database is being roll-forwarded, I suppose the database roll forward operation will
2
8324
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 - is there a way to do this? More importantly, would you WANT to do this? 2. We plan on doing inplace reorg's due to the 24x7 nature of our database servers. Are there any "undocumented" issues with these for V8.1, FP2 or FP6?
16
5472
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 - and can get runstats to be online but reorg only offers offline at the activities settings. I have tried to understand why - I thought that online was always offered ? I think that all my indexes are type 2 - I ran some reorg indexes all on the...
9
7150
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 not regaining as much space as anticipated. Additionally, the syscat.tables and syscat.indexes show my usage to be small. How do I determine who is using all the space ? The list tablespaces shows - Usable pages = 7.4 GB Used pages = 6.2 GB
9
17779
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 following "REORG". Expected tokens may include: "TABLE". SQLSTATE=42601
12
8031
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
3849
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 fine. The other night 3 of them failed due to the log file system filling up. I resumed them individually and they all completed successfully. To eliminate the log space problem I changed the script to wait for one to complete before startng...
33
11875
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 (NT_AUTHORITY\SYSTEM). I understand that when the service starts, no user may be logged in, but that's ok, as the app I am monitoring can only be run by a logged in user. Do I need to use WMI to get the user context of Explorer.exe or is there a...
5
1621
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 registry etc, due to insufficent rights for the user If I create a keyfile and set my app to full trust in project settings, many
0
2253
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
9813
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10829
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10582
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10245
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5645
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4446
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3106
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.