473,412 Members | 2,174 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,412 software developers and data experts.

How to alter sequence in db2 luw in porcedure

We are using DB2 LUW Version 10.5.0.5 on Linux (x86_64) We have written a procedure to alter a sequence to restart with a certain number. The procedure takes the sequence name and the number to restart with as parameters. The procedure got created successfully . We have granted developers connect access on the database and execute access on the procedure. But they are getting SQL -551 (permission issue for alter sequence sql) upon executing the procedure. Create sequence works perfectly fine when it is executed in a procedure by anyone who even doesn't have create sequence access. Is there a reason why the alter sequence command doesn't work in a procedure? Is there a way to allow developers to alter a sequence in a database without granting alter access on the sequence itself?
Apr 26 '20 #1
0 7741

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

Similar topics

3
by: Hans-Dieter Franz | last post by:
Hello, I have a problem with a Java user-defined stored procedure and the "alter sequence" statement. I use DB2 8.1.2 and had the same problem with 8.1.0, but not with 7.*. I get the following...
4
by: gimme_this_gimme_that | last post by:
Hi, I Oracle one can have : select to_char(a_id_seq.nextval,'0000') from dual Which fetches a sequence value and pads it with zeros on the left. When the sequence value is more than 4...
2
by: Shea Martin | last post by:
I am moving my database from a machine running 7.4 to a machine running 7.2. My sequences are not out of wack, is there a way to set the current value of a sequence? I though ALTER SEQUENCE would...
2
by: Oscar Tuscon | last post by:
I'm looking at ways to get batches of sequence values s faster. I don't want to set cache or increment to a large number for a variety of reasons. I need to grab id's in batches of varying numbers at...
4
by: Sim Zacks | last post by:
I am in the process of converting an existing database to PostGreSQL and wrote a generic script to update all of the sequences as they default at 1. I thought it would be useful to other people who...
5
by: tojigneshshah | last post by:
Hi, How to restart sequence number once the data is imported/loaded into the tables? Please advise. regards Jignesh
5
by: zgh1970 | last post by:
Hi, We have some tables with db2 generated field. How can I find the next generated sequence fot those fields. Thanks,
0
by: wmos4995 | last post by:
Hi, I am writing a procedure to alter the value of a sequence to max value of the table column. This is what i have written till now. CREATE PROCEDURE RESET_SEQ ( IN TABNAME VARCHAR(50),...
0
by: Mikelowe | last post by:
Would like to know is there an automated way to copy the maxvalue of sequence number from db2 production to db2 test. When we copy data from our production that uses a sequence number value as its...
0
by: asiangirl | last post by:
I am doing db2 database migration to 10.5 from 9.5. After loading data. I'll need to reset all sequence value. I have this shell script produce a file after executing below SQL. But it gave me...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.