Re: Exception thrown executing "reorg rebuild"
Sébastien Sablé <[email protected]> Fri, 28 Aug 2009 16:31:08 +0200
| Newsgroups | gmane.comp.python.sybase |
|---|---|
| Message-ID | <[email protected]> |
Hi Jeffrey,
According to the following page:
http://manuals.sybase.com/onlinebooks/group-as/asg1250e/svrtsg/@Generic__Bo=
okTextView/77787;pt=3D62077/*
"""This is an informational message. Unless otherwise specified, no =
action is required. Contact your System Administrator about any warning =
issued in the message."""
So I think the following patch should correct your problem:
Index: Sybase.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Sybase.py (r=E9vision 443)
+++ Sybase.py (copie de travail)
@@ -258,13 +258,15 @@
raise IntegrityError(msg)
elif mn =3D=3D 2812: ## Procedure not found
raise StoredProcedureError(msg)
- elif mn in (0, 5701, 5703, 5704) or ((mn >=3D 6200) and (mn < 6300)):
+ elif mn in (0, 1918, 5701, 5703, 5704, 11932) or ((mn >=3D 6200) and =
(mn < 6300)):
# Non-errors:
# 0 PRINT
+ # 1918 Non-clustered index is being rebuilt.
# 5701 Changed db context
# 5703 Changed language
# 5704 Changed character set (Sybase)
# 6200-6299 SHOWPLAN output (Sybase)
+ # 11932 Beginning REORG REBUILD of table
hook =3D _output_hooks.get(conn)
if hook:
hook(conn, msg)
regards
--
S=E9bastien Sabl=E9
Jeffrey Zelt a =E9crit :
> I would like to execute =93reorg rebuild=94 on the server. Whenever I do =
> this, python-sybase throws a Sybase.DatabaseError exception as shown here:
> =
> =
> =
> Traceback (most recent call last):
> =
> File =
> "/home/jeffreyz/workspace-3.5/sybase-tests/src/connection_tests.py", =
> line 41, in <module>
> =
> cursor.execute('reorg rebuild Client') =
> =
> File "build/bdist.linux-i686/egg/Sybase.py", line 546, in execute
> =
> File "build/bdist.linux-i686/egg/Sybase.py", line 695, in _start
> =
> File "build/bdist.linux-i686/egg/Sybase.py", line 709, in _mainloop
> =
> File "build/bdist.linux-i686/egg/Sybase.py", line 753, in _raise_error
> =
> Sybase.DatabaseError: Msg 11932, Level 10, State 1, Line 1
> =
> Beginning REORG REBUILD of table 'Client'.
> =
> Msg 1918, Level 10, State 1, Line 1
> =
> Non-clustered index (index id =3D 2) is being rebuilt.
> =
> =
> =
> Does anyone know how this can be avoided?
> =
> =
> =
> I have just patched python-sybase to use ASE 15.x capabilities (to allow =
> identifiers longer than 30 characters). However, I still throw the =
> Sybase.DatabaseError exception shown above when executing =93reorg rebuil=
d=94. =
> =
> =
> =
> The same exception was also thrown _/before/_ I patched python-sybase to =
> use ASE 15.x capabilities.
> =
> =
> =
> Does anyone know if this exception can be avoided somehow? Thanks in =
> advance.
> =
> =
> =
> Regards,
> =
> Jeffrey
> =
> =
> ------------------------------------------------------------------------
> =
> -------------------------------------------------------------------------=
-----
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-D=
ay =
> trial. Simplify your report design, integration and deployment - and focu=
s on =
> what you do best, core application coding. Discover what's new with =
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> =
> =
> ------------------------------------------------------------------------
> =
> _______________________________________________
> Python-sybase-misc mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/python-sybase-misc
---------------------------------------------------------------------------=
---
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day =
trial. Simplify your report design, integration and deployment - and focus =
on =
what you do best, core application coding. Discover what's new with =
Crystal Reports now. http://p.sf.net/sfu/bobj-july