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

create nickname

P: n/a
Hi,

Is there any reason why a CREATE NICKNAME statement fails if the remote
object is an ALIAS ?

I actually have an ALIAS that is used to point to the correct table in the
remote DB, and would like the nickname to point to this alias, avoiding the
obligation to drop and recreate the nickname any time.

Thanks for your help,

Jean-Marc
Sep 7 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jean-Marc Blaise wrote:
Hi,

Is there any reason why a CREATE NICKNAME statement fails if the remote
object is an ALIAS ?
What's the exact error?
I actually have an ALIAS that is used to point to the correct table in the
remote DB, and would like the nickname to point to this alias, avoiding
the obligation to drop and recreate the nickname any time.
You can drop/recreate the table independent of the nickname anyways. You
just have to make sure that the table schema/structure doesn't change.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Sep 8 '06 #2

P: n/a
Hi Knut,

1. Regarding the error, I get:

DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1822N Unexpected error code "Cannot create a nickname against an alias
(TYPE = 'A') " received from data source "". Associated text and tokens are
"". SQLSTATE=560BD

2. My intent is to switch ALIAS from tables having the same structure on the
source DB (I don't have to recreate the tables), and I hoped that the
nickname could refer the alias, therefore I didn't have to switch the
nickname to the right table.

My question is: why being so strict and forbid aliases (I forgot to tell
both DB are DB2) ?

Regards,

Jean-Marc

"Knut Stolze" <st****@de.ibm.coma écrit dans le message de
news:ed**********@lc03.rz.uni-jena.de...
Jean-Marc Blaise wrote:
Hi,

Is there any reason why a CREATE NICKNAME statement fails if the remote
object is an ALIAS ?

What's the exact error?
I actually have an ALIAS that is used to point to the correct table in
the
remote DB, and would like the nickname to point to this alias, avoiding
the obligation to drop and recreate the nickname any time.

You can drop/recreate the table independent of the nickname anyways. You
just have to make sure that the table schema/structure doesn't change.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany

Sep 8 '06 #3

P: n/a
Jean-Marc Blaise wrote:
Hi Knut,

1. Regarding the error, I get:

DB21034E The command was processed as an SQL statement because it was not
a
valid Command Line Processor command. During SQL processing it returned:
SQL1822N Unexpected error code "Cannot create a nickname against an alias
(TYPE = 'A') " received from data source "". Associated text and tokens
are
"". SQLSTATE=560BD
That's a restriction in the DB2 wrapper. The error message doesn't even
originate from the remote data source. Besides this being rather annoying,
it is also an incorrect error message, I'd say. I'll pass this along.
2. My intent is to switch ALIAS from tables having the same structure on
the source DB (I don't have to recreate the tables), and I hoped that the
nickname could refer the alias, therefore I didn't have to switch the
nickname to the right table.
You could do the same thing. Create a regular table instead of the alias,
create a nickname for that table, drop the table and create the nickname
instead.
My question is: why being so strict and forbid aliases (I forgot to tell
both DB are DB2) ?
Good question, I don't know the answer.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Sep 9 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.