Can't drop table
Posted in 2010
Topics: Server Administration, Third-Party Tools & Monitoring
I have the following problem. Some user created a table with an unreadable character in the beginning and now I can drop the table, is there a way that I can drop this table?? I tryed with DBaccess, OAT and even with squirrelSQL and it sends back an Syntax error. Currently using IDS 11.5 FC5 on RedHat EL. Tank you in advance. Javier Hernández
You can try this:
1. Shutdown the engine.
2. Set and export DELIMIDENT=1 in the engine's environment
3. Restart the engine.
4. Set and export DELIMIDENT=1 in your runtime environment.
5. in dbaccess run the DROP TABLE with the offending tablename in double
quotes, including the unprintable character. If you have to, use vi to
create the DROP statement (you should be able to enter any character code in
vi using ^V to quote it).
6. Shutdown the engine.
7. Unset DELIMIDENT.
8. Restart the engine.
If that doesn't do it call IBM and open a support case, they can "dial-in"
and fix the problem.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
2010/8/25 JAVIER HERNáNDEZ <javier_hdzt@yahoo.com.mx>
> I have the following problem. Some user created a table with an unreadable
> character in the beginning and now I can drop the table, is there a way
> that I
> can drop this table?? I tryed with DBaccess, OAT and even with squirrelSQL
> and
> it sends back an Syntax error.
>
> Currently using IDS 11.5 FC5 on RedHat EL.
>
> Tank you in advance.
>
> Javier Hernández
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016e645b768a33e2b048ea81f9a
> I have the following problem. Some user created a table with an unreadable > character in the beginning and now I can drop the table, is there a way > that I > can drop this table?? I tryed with DBaccess, OAT and even with squirrelSQL > and > it sends back an Syntax error. > > Currently using IDS 11.5 FC5 on RedHat EL. > > Tank you in advance. > > Javier Hernández > If the database is small you may be able to export it. Revomove the table reference from the import SQL and do an import.
You could build the drop sql using systables.
unload to drop.sql delimiter '<tab>'select 'drop table "'||tabname||'";'
from systables
where tabid = ?
This way you don't even need to identify the unprintable character, just the
tabid.
Art Kagel Wrote:
>You can try this:
>
>1. Shutdown the engine.
>
>2. Set and export DELIMIDENT=1 in the engine's environment
>
>3. Restart the engine.
>
>4. Set and export DELIMIDENT=1 in your runtime environment.
>
>5. in dbaccess run the DROP TABLE with the offending tablename in double
>
>quotes, including the unprintable character. If you have to, use vi to
>
>create the DROP statement (you should be able to enter any character code in
>
>vi using ^V to quote it).
>
>6. Shutdown the engine.
>
>7. Unset DELIMIDENT.
>
>8. Restart the engine.
>
>If that doesn't do it call IBM and open a support case, they can "dial-in"
>and fix the problem.
>
>Art
>
>Art S. Kagel
>Advanced DataTools (www.advancedatatools.com)
>IIUG Board of Directors (art@iiug.org)
>
>Disclaimer: Please keep in mind that my own opinions are my own opinions and
>do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
>organization with which I am associated either explicitly, implicitly, or by
>inference. Neither do those opinions reflect those of other individuals
>affiliated with any entity with which I am affiliated nor those of the
>entities themselves.
>
>2010/8/25 JAVIER HERNáNDEZ <javier_hdzt@yahoo.com.mx>
>
>> I have the following problem. Some user created a table with an unreadable
>> character in the beginning and now I can drop the table, is there a way
>> that I
>> can drop this table?? I tryed with DBaccess, OAT and even with squirrelSQL
>> and
>> it sends back an Syntax error.
>>
>> Currently using IDS 11.5 FC5 on RedHat EL.
>>
>> Tank you in advance.
>>
>> Javier Hernández
>>
>>
>>