[python-sybase] Sybase.DatabaseError when execute "dump database" commmand use Sybase.connect().cursor().execute()

Wang King wangkknd at gmail.com
Fri Nov 25 19:17:26 EST 2005


Sybase Module for python had been installed successful.
My commands like this:
>>> from Sybase import *
>>> a = connect('SYBASE','sa','')
>>> a
<Sybase.Connection instance at 0x0093BBC0>

>>> cur = a.cursor()
>>> cur
<Sybase.Cursor instance at 0x00934350>
>>> cur.execute('dump database test to "c:\\test" ')

The result like this:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\Python24\Lib\site-packages\Sybase.py", line 764, in execute
    self.description = fetcher.start(self.arraysize)
  File "D:\Python24\Lib\site-packages\Sybase.py", line 515, in start
    return self._start_results()
  File "D:\Python24\Lib\site-packages\Sybase.py", line 619, in
_start_results
    status, result = self._cmd.ct_results()
  File "D:\Python24\Lib\site-packages\Sybase.py", line 200, in _servermsg_cb
    raise DatabaseError(_fmt_server(msg))
Sybase.DatabaseError: Msg 3216, Level 10, State 1, Line 1
Backup Server session id is:  47.  Use this value when executing the
'sp_volchan
ged' system stored procedure after fulfilling any volume change request from
the
Backup Server.
Msg 404101, Level 1, State 1, Procedure bs_write_header
Backup Server: 4.41.1.1: Creating new disk file c:\test.

But the database has been dumped successful.

How can I dump database by python?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.object-craft.com.au/pipermail/python-sybase/attachments/20051125/438b0f80/attachment.htm


More information about the Python-sybase mailing list