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

Creating a sequence alias

Hi!

I would like, without writing a procedure which require the configuration of
an additionnal C-compiler and which is not portable (I am wring à java
application targeted on DB2). And I would like to create a kind of alias of
a sequence. The goal is to have a user access a sequence located in another
schema, but in the same database. I knonw that sequences synonyms do not
work. Did you ever try to do this? Another solution would be to set the
default schema of a user be different from its login name.Is this possible?

Thanks for your attention.
Nov 12 '05 #1
5 4422
Xela, what speaks against qualifying the sequence with the schema name?
You are corret that DB@ supports no ALIAS FOR <sequence>
FWIW in Stinger you don't need the C-Compiler anymore

Cheers
Serge
Nov 12 '05 #2
The goal is to have an identical access for the database objects from the
user that actually own the objects and the schema and the user that can only
use the objects. No schema qualification is needed for the owner, and I
would like tu use the same pattern for the user.

Xela

"Serge Rielau" <sr*****@ca.eye-bee-em.com> wrote in message
news:ZY************@news04.bloor.is.net.cable.roge rs.com...
Xela, what speaks against qualifying the sequence with the schema name?
You are corret that DB@ supports no ALIAS FOR <sequence>
FWIW in Stinger you don't need the C-Compiler anymore

Cheers
Serge

Nov 12 '05 #3
Alexandre,

There are DBA's out there that require that all SQL is always qualified
as part of their "good-coding-practices".
Doing that is never a bad thing for sure and it would make your SQL
equal for the owner and the user.

Cheers
Serge
Nov 12 '05 #4
Well. The idea is to have a kind of "view" of a foreign schema

"Serge Rielau" <sr*****@ca.eye-bee-em.com> wrote in message
news:SS*********************@news01.bloor.is.net.c able.rogers.com...
Alexandre,

There are DBA's out there that require that all SQL is always qualified
as part of their "good-coding-practices".
Doing that is never a bad thing for sure and it would make your SQL
equal for the owner and the user.

Cheers
Serge

Nov 12 '05 #5
In hindsight we should have hooked sequences to CURRENT PATH rather than
CURRENT SCHEMA to begin with *sigh*.
PATH + ALIAS is really all one ever needs....

Cheers
Serge
Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RJMAL | last post by:
Recently we upgraded our server from SQL 7.0 to SQL 2000. I created a new view in Enterprise Manager which pulls data from a linked server's database. When I write the view... CREATE VIEW...
0
by: Brett Selleck | last post by:
We have an issue where the JAXB generated classes are creating an interface which references itself. The Schema is valid, and I have not seen this ran into before. The code is below. What is...
0
by: Max | last post by:
Suppose we have an object hierarchy in XSD. For example, let us take Control, Label, TextBox and LinkLabel windows controls. Each control has some properties which are represented as elements....
2
by: Xela | last post by:
Hello ! I figure how to create a sequence alias, in the same fashion that one can create table alias. Is there a proper way to do so? Thanks !
3
by: serge | last post by:
I have all the scrips to create a database. I have a few questions: 1- I am creating a batch file that it will call many lines like: db2 -td@ -f filename.sql -z output.txt The order i am using...
3
by: rajdb2 | last post by:
Can we create an alias for a sequence in db2 udb? We can do it in oracle. But the same thing is not working in db2. I can create an alias, but when i am trying to use it, there is an error that the...
1
by: Harlin | last post by:
Hi, I am trying to set up the database for LMS on a Linux box. This box is running SLES 9. I am trying to run the following scripts as user: db2inst1 : ../cr_db2db_audit.sh and I receive...
4
by: musicloverlch | last post by:
I used to be able to create PDFs, automatically save them to a file, and mail them out to people. This was on Access 97 with Windows NT. We've changed to Windows XP and Access 2003. Doesn't work...
2
by: pshvarts | last post by:
(I'm new in SOAP) I get some wsdl file (from apache service ). I tried creating SOAP client with .NET - trying to add Web Reference and get error like: "Custom tool error: Unable to import...
32
by: Joe | last post by:
I am just starting to use Object Oriented PHP coding, and I am seeing quite often the following (this example taken from a wiki): $wakka =& new Wakka($wakkaConfig); What exactly is the =&, and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.