If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Problem with aliase name procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-16-11, 05:38
divya.s divya.s is offline
Registered User
 
Join Date: Jul 2011
Posts: 36
Question Problem with aliase name procedures

We had moved the db from windows to Linux and we had created 2 users one for admin and other for the users.

Tried giving alias names for procedures but was throwing an error,was able to give alias names for rest of them except for functions and procedures.
----
------following are the errors i was getting while trying on procedures kindly help
db2 => CREATE ALIAS proc1 FOR db2.proc1!

DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0601N The name of the object to be created is identical to the existing
name "db21.proc1" of type "ALIAS". SQLSTATE=42710

db2 => CREATE OR REPLACE ALIAS proc1 FOR PROCEDURE db2.proc1!
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N Expected tokens may include: "<space>". SQLSTATE=42601

db2 => CREATE OR REPLACE ALIAS proc1 FOR db2.proc1!
SQL0403W The newly defined alias "db21.proc1" resolved to the
object "db2.proc1" which is currently undefined. SQLSTATE=01522

db2 => CREATE PUBLIC ALIAS proc1 FOR db2.proc1!
SQL0403W The newly defined alias "SYSPUBLIC.proc1" resolved to the
object "db2.proc1" which is currently undefined. SQLSTATE=01522
Reply With Quote
  #2 (permalink)  
Old 11-16-11, 07:29
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Looking at the documentation for CREATE ALIAS (CREATE ALIAS - IBM DB2 9.7 for Linux, UNIX, and Windows), I read as the first sentence:
Quote:
The CREATE ALIAS statement defines an alias for a module, nickname, sequence, table, view, or another alias. Aliases are also known as synonyms.
I don't see stored procedures mentioned as a valid target for an alias. Hence, you can't create aliases for SPs. You could create a new stored procedure with the desired name and that new procedure just calls the other one.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On