Subject | Re: [firebird-support] Re: Migrating from IB5.6 to FB1.5: deleting procedures with keyword names |
---|---|
Author | Paul Vinkenoog |
Post date | 2007-07-10T22:29:50Z |
Hi Falko,
Anything within double-quotes is supposed to be a string constant.
In a case like that, the logical thing to try would be to set the
*client* dialect to 3, and then re-issue the drop procedure "MONTH"
command. However, this will probably give you the following error:
Statement failed, SQLCODE = -817
Dynamic SQL Error
-SQL error code = -817
-Metadata update statement is not allowed by the current database SQL dialect 1
So here's a nice Catch-22: Dialect 1 was invented to allow legacy
databases to work under IB6 and be upgraded, but even in dialect 1 you
can't use the new keywords for object names. Double-quoting would be a
solution, but that's not supported in Dialect 1. Setting the client
dialect to 3 would be the next solution, but in this case that route
will be blocked by the database dialect. So you need to go back to 5.6
to drop the procedures, but that's not an option, as you have
explained.
I guess that you will have to go to the system tables after all. It
looks like changing the procedure name (or deleting the rows involved)
in rdb$procedures and rdb$procedure_parameters should do the trick,
but please don't take this as expert advice... try it on a copy and
test the functioning of the database thoroughly afterwards.
Of course you'll also have to update any SPs and triggers that call
the procedures in question.
Cheers,
Paul Vinkenoog
>>>> drop procedure "MONTH"Ah... now I see: dialect 1 doesn't support delimited identifiers.
>>>
>>> thanks,
>>> but that doesn't help.
>>
>> What's the error message this time? Again "token unknown" ?
>
> Yes
Anything within double-quotes is supposed to be a string constant.
In a case like that, the logical thing to try would be to set the
*client* dialect to 3, and then re-issue the drop procedure "MONTH"
command. However, this will probably give you the following error:
Statement failed, SQLCODE = -817
Dynamic SQL Error
-SQL error code = -817
-Metadata update statement is not allowed by the current database SQL dialect 1
So here's a nice Catch-22: Dialect 1 was invented to allow legacy
databases to work under IB6 and be upgraded, but even in dialect 1 you
can't use the new keywords for object names. Double-quoting would be a
solution, but that's not supported in Dialect 1. Setting the client
dialect to 3 would be the next solution, but in this case that route
will be blocked by the database dialect. So you need to go back to 5.6
to drop the procedures, but that's not an option, as you have
explained.
I guess that you will have to go to the system tables after all. It
looks like changing the procedure name (or deleting the rows involved)
in rdb$procedures and rdb$procedure_parameters should do the trick,
but please don't take this as expert advice... try it on a copy and
test the functioning of the database thoroughly afterwards.
Of course you'll also have to update any SPs and triggers that call
the procedures in question.
Cheers,
Paul Vinkenoog