473,387 Members | 1,578 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,387 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 4429
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...
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...

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.