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

create nickname

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
3 7602
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ryan Kuan | last post by:
Hi All, Has anyone tried creating a trigger that update a remote table via a nickname? Thanks Ryan
3
by: Evan Smith | last post by:
I have a federated database (7.2 FP11, AIX 4.3) that seems to work fine in most aspects. Today I'm trying to add a new user mapping with the following statement: create user mapping for mngdrq01...
2
by: Guru | last post by:
Hi All Can someone explain what is the difference between Alias and Nickname? Warm Regards Guru
0
by: Dmitry Krivov | last post by:
Hi, Sorry for my english, my native is russian I have an Oracle-nickname in DB2 UDB 7.2 database, but when i'm trying to select fields an returning result set contain ???? instead of cyrillic...
6
by: _link98 | last post by:
Problem: getting SQL0181N for queries on nicknames to remote Union-All-View. Can't see what I'm doing wrong yet, maybe someone has seen this before. Environment: UDB ESE 8.1 + FIXPAK 9A, on...
5
by: Jiggaz | last post by:
Hi, Look my stored procedure : __________________ ALTER PROCEDURE dbo.CreateAccount @Nickname varchar(30), @Password varchar(15), @Email varchar(50), @Date datetime,
6
by: Prasad | last post by:
Hi, We have DB2 7 fixpak 14 on AIX 5.1. There are federated links (nicknames) established for tables in Informix database. One of the table was modified in Informix. The table has now got 3...
13
by: CindySue | last post by:
I have a table of providers that has a license number and fullname field, among others. Deman helped me with being able to enter a nickname and having it change to the fullname if a nickname exists...
1
by: ebusiness | last post by:
I am trying to create nicknames for tables in a remote database. The federated database and remote database are both DB2 UDB V8.2, both OS are AIX. Could anyone tell me how to create a nickname...
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
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.