|
From: hopfgartner <hop...@ro...> - 2002-11-26 06:18:53
Attachments:
spTest.py
spTest2.py
|
Hello,
since we are suning SQL Server 2000 the whole day I'm
working on some tools that should help us to:
1) get quickly all objects as text files in DDL, that can
be processed by CVS
2) export the database schme to DIA.
3) eventually help porting the objects to SQL:1999 or
PostgreSQL
Many things work now, but when I try to run a stored
procedure, sp_helpconstraint, I get a lot of problems.
The system I'm working on is:
Server:
Windows 2000 SP2
SQL Server 2000 SP2
Client:
Debian testing
Python 2.1.2 and Python 2.3 pre-packages
sybase-3.6pre1
The problem is included in the 2 attachments. They contain
2 different invokations of the the stored procedure.
The first test gives me:
bonobo@bonobo:~/devel/dbweaver$ python spTest.py
[('DEFAULT on column alrm_time', 'DF_Alarme_Time', '(n/a)',
'(n/a)', '(n/a)', '(n/a)', '(getdate())'), ('PRIMARY KEY
(non-clustered)', 'PK_Alarme', '(n/a)', '(n/a)', '(n/a)',
'(n/a)', 'alrm_id')]
Traceback (most recent call last):
File "spTest.py", line 8, in ?
curs.close()
File "/usr/lib/python2.1/site-packages/Sybase.py", line
350, in close
self._close()
File "/usr/lib/python2.1/site-packages/Sybase.py", line
262, in _close
status = self._cmd.ct_cancel(CS_CANCEL_ALL)
File "/usr/lib/python2.1/site-packages/Sybase.py", line
145, in _servermsg_cb
raise DatabaseError(_fmt_server(msg))
Sybase.DatabaseError: State 1, Procedure sp_helpconstraint,
Line 276
Msg 15470, State 1, Procedure sp_helpconstraint, Line 287
No foreign keys reference this table.
The second gives simply:
bonobo@bonobo:~/devel/dbweaver$ python spTest2.py
Segmentation fault
Could somebody help me?
Thank you very much for your attention.
Peter Hopfgartner
|
|
From: Dave C. <dj...@ob...> - 2002-11-28 21:42:01
|
> Hello, since we are suning SQL Server 2000 the whole day I'm working
> on some tools that should help us to:
>
> 1) get quickly all objects as text files in DDL, that can be
> processed by CVS
>
> 2) export the database schme to DIA.
>
> 3) eventually help porting the objects to SQL:1999 or PostgreSQL
>
> Many things work now, but when I try to run a stored procedure,
> sp_helpconstraint, I get a lot of problems.
>
> The system I'm working on is:
>
> Server:
> Windows 2000 SP2
> SQL Server 2000 SP2
>
> Client:
> Debian testing
> Python 2.1.2 and Python 2.3 pre-packages
> sybase-3.6pre1
>
> The problem is included in the 2 attachments. They contain 2
> different invokations of the the stored procedure.
You don't say whether or not you are using FreeTDS. I also get
segfaults in FreeTDS 0.60 when I try to call stored procedures. I
have not tried the current CVS version of FreeTDS. Something to try a
bit later.
> The first test gives me:
>
> bonobo@bonobo:~/devel/dbweaver$ python spTest.py
> [('DEFAULT on column alrm_time', 'DF_Alarme_Time', '(n/a)',
> '(n/a)', '(n/a)', '(n/a)', '(getdate())'), ('PRIMARY KEY
> (non-clustered)', 'PK_Alarme', '(n/a)', '(n/a)', '(n/a)',
> '(n/a)', 'alrm_id')]
> Traceback (most recent call last):
> File "spTest.py", line 8, in ?
> curs.close()
> File "/usr/lib/python2.1/site-packages/Sybase.py", line
> 350, in close
> self._close()
> File "/usr/lib/python2.1/site-packages/Sybase.py", line
> 262, in _close
> status = self._cmd.ct_cancel(CS_CANCEL_ALL)
> File "/usr/lib/python2.1/site-packages/Sybase.py", line
> 145, in _servermsg_cb
> raise DatabaseError(_fmt_server(msg))
> Sybase.DatabaseError: State 1, Procedure sp_helpconstraint,
> Line 276
> Msg 15470, State 1, Procedure sp_helpconstraint, Line 287
> No foreign keys reference this table.
Is it an error to have the stored procedure error message reported as
an exception?
> The second gives simply:
>
> bonobo@bonobo:~/devel/dbweaver$ python spTest2.py
> Segmentation fault
This is exactly what I get with FreeTDS.
- Dave
--
http://www.object-craft.com.au
|
|
From: hopfgartner <hop...@ro...> - 2002-11-29 02:18:31
|
On 28 Nov 2002 13:42:01 +1100
Dave Cole <dj...@ob...> wrote:
>
> > Hello, since we are suning SQL Server 2000 the whole
> day I'm working
> > on some tools that should help us to:
> >
> > 1) get quickly all objects as text files in DDL, that
> can be
> > processed by CVS
> >
> > 2) export the database schme to DIA.
> >
> > 3) eventually help porting the objects to SQL:1999 or
> PostgreSQL
> >
> > Many things work now, but when I try to run a stored
> procedure,
> > sp_helpconstraint, I get a lot of problems.
> >
> > The system I'm working on is:
> >
> > Server:
> > Windows 2000 SP2
> > SQL Server 2000 SP2
> >
> > Client:
> > Debian testing
> > Python 2.1.2 and Python 2.3 pre-packages
> > sybase-3.6pre1
> >
> > The problem is included in the 2 attachments. They
> contain 2
> > different invokations of the the stored procedure.
>
> You don't say whether or not you are using FreeTDS. I
> also get
> segfaults in FreeTDS 0.60 when I try to call stored
> procedures. I
> have not tried the current CVS version of FreeTDS.
> Something to try a
> bit later.
>
Sorry, I've forgot to mention it. Indeed, I'm using FreeTDS
0.6.
> > The first test gives me:
> >
> > bonobo@bonobo:~/devel/dbweaver$ python spTest.py
> > [('DEFAULT on column alrm_time', 'DF_Alarme_Time',
> '(n/a)',
> > '(n/a)', '(n/a)', '(n/a)', '(getdate())'), ('PRIMARY
> KEY
> > (non-clustered)', 'PK_Alarme', '(n/a)', '(n/a)',
> '(n/a)',
> > '(n/a)', 'alrm_id')]
> > Traceback (most recent call last):
> > File "spTest.py", line 8, in ?
> > curs.close()
> > File "/usr/lib/python2.1/site-packages/Sybase.py",
> line
> > 350, in close
> > self._close()
> > File "/usr/lib/python2.1/site-packages/Sybase.py",
> line
> > 262, in _close
> > status = self._cmd.ct_cancel(CS_CANCEL_ALL)
> > File "/usr/lib/python2.1/site-packages/Sybase.py",
> line
> > 145, in _servermsg_cb
> > raise DatabaseError(_fmt_server(msg))
> > Sybase.DatabaseError: State 1, Procedure
> sp_helpconstraint,
> > Line 276
> > Msg 15470, State 1, Procedure sp_helpconstraint, Line
> 287
> > No foreign keys reference this table.
>
> Is it an error to have the stored procedure error message
> reported as
> an exception?
>
This should not be an error from the SQL server, but I will
look closer to it. This is simply a message telling that
there are no FK referencing this table. When running from
Query Analyser, this message appears in the 'Messages' tab,
wheras results are in the 'Grid' tab.
Anyway, I've tryed it with a table that has FK-constraints,
and what I get is the following:
bonobo@bonobo:~/devel/dbweaver$ python spTest.py
[('DEFAULT on column PAPOS', 'DF_positionen_PAPOS',
'(n/a)', '(n/a)', '(n/a)', '(n/a)', '(0)'), ('DEFAULT on
column PARTI', 'DF_positionen_PARTI', '(n/a)', '(n/a)',
'(n/a)', '(n/a)', "(' ')"), ('DEFAULT on column
pos_menge_ist', 'DF_positionen_pos_menge_ist', '(n/a)',
'(n/a)', '(n/a)', '(n/a)', '(0)'), ('DEFAULT on column
pos_status', 'DF_positionen_pos_status', '(n/a)', '(n/a)',
'(n/a)', '(n/a)', '(30)'), ('FOREIGN KEY',
'FK_positionen_personal', 'No Action', 'No Action',
'Enabled', 'Is_For_Replication', 'pers_id'), (' ', ' ', '
', ' ', ' ', ' ', 'REFERENCES lager01_sap.dbo.personal
(pers_id)'), ('FOREIGN KEY',
'FK_positionen_transport_auftraege', 'No Action', 'No
Action', 'Enabled', 'Is_For_Replication', 'taft_id'), (' ',
' ', ' ', ' ', ' ', ' ', 'REFERENCES
lager01_sap.dbo.transport_auftraege (taft_id)'), ('PRIMARY
KEY (clustered)', 'PK_Positionen', '(n/a)', '(n/a)',
'(n/a)', '(n/a)', 'pos_id')]
Traceback (most recent call last):
File "spTest.py", line 8, in ?
curs.close()
File "/usr/lib/python2.1/site-packages/Sybase.py", line
350, in close
self._close()
File "/usr/lib/python2.1/site-packages/Sybase.py", line
262, in _close
status = self._cmd.ct_cancel(CS_CANCEL_ALL)
File "/usr/lib/python2.1/site-packages/Sybase.py", line
145, in _servermsg_cb
raise DatabaseError(_fmt_server(msg))
Sybase.DatabaseError: State 1, Procedure sp_helpconstraint,
Line 276
The same stored procedure does not give any error messages
when run from Query Analyser.
> > The second gives simply:
> >
> > bonobo@bonobo:~/devel/dbweaver$ python spTest2.py
> > Segmentation fault
>
> This is exactly what I get with FreeTDS.
>
> - Dave
>
> --
> http://www.object-craft.com.au
>
Let me know if I can help in the diagnosis.
Peter
|
|
From: Dave C. <dj...@ob...> - 2002-11-30 00:00:01
|
>>>>> "hopfgartner" == hopfgartner <hop...@ro...> writes: >> You don't say whether or not you are using FreeTDS. I also get >> segfaults in FreeTDS 0.60 when I try to call stored procedures. I >> have not tried the current CVS version of FreeTDS. Something to >> try a bit later. >> hopfgartner> Sorry, I've forgot to mention it. Indeed, I'm using hopfgartner> FreeTDS 0.6. That helps a bit. >> Is it an error to have the stored procedure error message reported >> as an exception? >> hopfgartner> This should not be an error from the SQL server, but I hopfgartner> will look closer to it. This is simply a message telling hopfgartner> that there are no FK referencing this table. When running hopfgartner> from Query Analyser, this message appears in the hopfgartner> 'Messages' tab, wheras results are in the 'Grid' tab. That raises the question of what I should do with messages from the stored procedure. Should I simply discard the messages? hopfgartner> The same stored procedure does not give any error hopfgartner> messages when run from Query Analyser. It would be really helpful if you could send a fragment of SQL (no matter how trivial) that I could run here to set up the exactly same situation that you are seeing. - Dave -- http://www.object-craft.com.au |
|
From: Marcos P. <msa...@gr...> - 2002-12-04 14:02:28
|
VB seems to store these in a connection-level variable and/or associate callback/event procedures. It might be a good solution, especially for warnings and informative messages. El vie, 29-11-2002 a las 06:00, Dave Cole escribi=F3: > >>>>> "hopfgartner" =3D=3D hopfgartner <hop...@ro...> writes: >=20 > >> You don't say whether or not you are using FreeTDS. I also get > >> segfaults in FreeTDS 0.60 when I try to call stored procedures. I > >> have not tried the current CVS version of FreeTDS. Something to > >> try a bit later. > >>=20 > hopfgartner> Sorry, I've forgot to mention it. Indeed, I'm using > hopfgartner> FreeTDS 0.6. >=20 > That helps a bit. >=20 > >> Is it an error to have the stored procedure error message reported > >> as an exception? > >>=20 > hopfgartner> This should not be an error from the SQL server, but I > hopfgartner> will look closer to it. This is simply a message telling > hopfgartner> that there are no FK referencing this table. When running > hopfgartner> from Query Analyser, this message appears in the > hopfgartner> 'Messages' tab, wheras results are in the 'Grid' tab. >=20 > That raises the question of what I should do with messages from the > stored procedure. Should I simply discard the messages? >=20 > hopfgartner> The same stored procedure does not give any error > hopfgartner> messages when run from Query Analyser. >=20 > It would be really helpful if you could send a fragment of SQL (no > matter how trivial) that I could run here to set up the exactly same > situation that you are seeing. >=20 > - Dave --=20 Marcos S=E1nchez Provencio <msa...@gr...> www.burke.es |