By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,924 Members | 1,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,924 IT Pros & Developers. It's quick & easy.

Creating a sequence alias

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.