The Sybase libraries (the C-level ones, not the python ones) use
"errors" to communicate all kinds of things (like database names after
"use database").  Catch the exception and check for message
3216.&nbsp; Since it's a known message, you can ignore it.<br>
<br>
-Chris<br>
<br>
P.S.&nbsp; Of course, you'll need to be sure that you won't need to
signal a volume change during the backup, becase you need the
information in the message to be able to do that properly.<br><br><div><span class="gmail_quote">On 11/25/05, <b class="gmail_sendername">Wang King</b> &lt;<a href="mailto:wangkknd@gmail.com">wangkknd@gmail.com</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Sybase Module for python had been installed successful.<br>My commands like this:
<br><font style="background-color: rgb(102, 255, 255);">&gt;&gt;&gt; from Sybase import *<br>&gt;&gt;&gt; a = connect('SYBASE','sa','')<br>&gt;&gt;&gt; a
</font><br>&lt;Sybase.Connection instance at 0x0093BBC0&gt;<br><br><font style="background-color: rgb(102, 255, 255);">&gt;&gt;&gt; cur = a.cursor()<br>&gt;&gt;&gt; cur</font><br>&lt;Sybase.Cursor instance at 0x00934350&gt;
<br><font color="#000000">
<font style="background-color: rgb(51, 255, 255);">&gt;&gt;&gt; cur.execute('dump database test to &quot;c:\\test&quot; ')</font><br></font><br>The result like this:<br><br><font style="background-color: rgb(255, 153, 102);">
Traceback (most recent call last):
<br>&nbsp;&nbsp;File &quot;&lt;stdin&gt;&quot;, line 1, in ?<br>&nbsp;&nbsp;File &quot;D:\Python24\Lib\site-packages\Sybase.py&quot;, line 764, in execute<br>&nbsp;&nbsp;&nbsp;&nbsp;self.description = fetcher.start(self.arraysize)<br>&nbsp;&nbsp;File &quot;D:\Python24\Lib\site-packages\Sybase.py&quot;, line 515, in start
<br>&nbsp;&nbsp;&nbsp;&nbsp;return self._start_results()<br>&nbsp;&nbsp;File &quot;D:\Python24\Lib\site-packages\Sybase.py&quot;, line 619, in _start_results<br>&nbsp;&nbsp;&nbsp;&nbsp;status, result = self._cmd.ct_results()<br>&nbsp;&nbsp;File &quot;D:\Python24\Lib\site-packages\Sybase.py&quot;, line 200, in _servermsg_cb
<br>&nbsp;&nbsp;&nbsp;&nbsp;raise DatabaseError(_fmt_server(msg))<br>Sybase.DatabaseError: Msg 3216, Level 10, State 1, Line 1<br>Backup Server session id is:&nbsp;&nbsp;47.&nbsp;&nbsp;Use this value when executing the 'sp_volchan<br>ged' system stored procedure after fulfilling any volume change request from the
<br>Backup Server.<br>Msg 404101, Level 1, State 1, Procedure bs_write_header<br>Backup Server: <a href="http://4.41.1.1" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">4.41.1.1</a>: Creating new disk file c:\test.
</font></div>
<div><font style="background-color: rgb(255, 153, 102);"></font>&nbsp;</div>
<div><font style="background-color: rgb(255, 255, 255);">But the database has been dumped successful.</font></div>
<div>&nbsp;</div>
<div>How can I dump database by python?</div>

<br>_______________________________________________<br>Python-sybase mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Python-sybase@www.object-craft.com.au">Python-sybase@www.object-craft.com.au
</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase" target="_blank">https://www.object-craft.com.au/cgi-bin/mailman/listinfo/python-sybase
</a><br><br><br></blockquote></div><br><br clear="all"><br>-- <br>Nervous passengers are advised to wear a blindfold.