Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2014
    Posts
    10

    Lightbulb Unanswered: Create or Replace making Duplicacy?

    I am createing procedure with create or replace statement. Some times it work but some time it create 2 procedure with same name?

    i.e. old one is still in database and it will create new procedure with same name and parameter.

    Why it will happen??

    Is create replace is not good to use?

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    You could create this procedure in another schema.
    You are not able to create another procedure with the same schema, name, and a number of parameters.
    If you think you did it, please, provide the output of the following select statement with a schema and a name of your procedure.
    Code:
    select ROUTINESCHEMA, ROUTINENAME, ROUTINEMODULENAME, SPECIFICNAME, PARM_COUNT 
    from syscat.routines 
    where routinetype='P'
    and routineschema='...' and routinename='...'
    Regards,
    Mark.

  3. #3
    Join Date
    Oct 2014
    Posts
    10
    Dear,

    actually this problem arises to me when before 2 days. that I got to know that there two procedures at our main server with same name and same parameter as well, but with different specific name.

    so I deleted those using specific name. Although I was confused that how is it possible that DB create same name procedure Twice so that’s why I asked the question?

    Right now I don’t have a scenario like this if I will have in future I will share with you.

    is it a bug or can happen in DB?

    Thanks

  4. #4
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    This mustn't happen in DB2.
    If you face such a situation again, you should open PMR with IBM.
    Regards,
    Mark.

  5. #5
    Join Date
    Apr 2012
    Posts
    1,035
    Provided Answers: 18
    The problem description is incomplete because it does not specify whether the PROCSCHEMA was unique for the dup specificnames & signatures.
    In DB2 LUW the specificname has to be unique within the procschema.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •