- This topic has 10 replies, 6 voices, and was last updated 18 years, 7 months ago by Haris Peco.
-
AuthorPosts
-
angelrabbit99MemberHi,
How can I execute my Sybase stored procedures from DB Browser? I am selecting the procedure’s code and click execute but I always get an error like: “Invalid syntax near go”. The “go” command is mandatory for all Sybase scripts. On our project we have A LOT of stored procedures and I thought we could use DB Browser for testing since we plan to use MyEclipse in general for the Java development.
Another question concerns the presence of the double-quote character in a sql statement: DB Browser is not handeling it very well. I know that you are just executing the statement as it is, but is there any chance that this behaviour will be improved in future releases? Or I have to modify all my sql files to be able to use them with DB Browser?
And my second question would be: how can we open and run an entire sql file which is part of an Eclipse Java project, with DB Browser?
Thank you,
Alex.PS: I am using Eclipse 3.0.1 / MyEclipse 3.8.3 / Sybase JConnect 5.5 / Sybase Server 12.5.
Riyad KallaMemberI have asked our DB dev to have a look at this post.
Ed rossMemberNot sure of your exact requirements but works for me
exec schema.storedproc 1,’alpha’ …
You do not put the “go” in, this is the delimiter if useing isql.
This will only work if the stored proc has a result set. If it simply returns a code you will not see any data
Ed rossMembersorry – hit the submit button a bit early.
you need the exec to tell sybase to execute the sql as a stored proc
the schema is the owner of the stored proc
then of course the stored proc name, followed by any parameters. I use both ‘ and “, as long as they are balanced I don’t seem to have a problem
support-jeffMemberThere is no Sybase-specific support in DE at this time, unlike Oracle – there are special extensions to support running Oracle stored procs. Sounds like you are seeing the stored procs in DE, though? Interesting…
Best bet is to follow edross’s lead on this one.
angelrabbit99MemberMy post was not clear enough. I was not referering at how I can execute a store procedure, but at how I can load into the database the code of a stored procedure: like create procedure … and then the procedure’s code that has go at the end, and some comments between the sql code lines, etc…First I have to remove the comments ( “;” at the end of the comment line is not working, since it will separate that statement into multiple statements and this is not ok for the procedure’s code). Second I have to remove the go, although this is mandatory for Sybase scripts…It looks to me that we will not be able to use the DB Browser in our project…
And loading an entire sql file that contains several stored procedures…don’t even think about it.
And no, I am not seeing the stored procedures in DB. We just have several sql files that contain stored procedures’ source code.Thanks,
Alex.
Ed rossMemberTo view all of the stored procs you can create a view e.g.
create view stp (name) as select name from dbo.sysuser where type=’P’
Then select the contents of the view. I will have to get back with you about loading a stored proc into the database from the window.
angelrabbit99MemberThanks for the tip about viewing the stored procedures…I already use it.
Editing the sql files that contain our procedure and being able to load these procedures fast in the database from DB Browser would be an excelent feature for our project and for people working with Sybase in general.
I look forward to your response.
Thnak you,
Alex.
Riyad KallaMemberI look forward to your response.
As Jeff mentioned, there is no Sybase-specific additions planned for DE at this time, however if a company owning or purchasing enough subscriptions was interested in this feature, we would address the need for them.
bernardcenaMemberWe have >200 users of MyEclipse and Sybase is one of our standard DBs – we would very much like to see support for stored proc enumeration / editing in the DB Explorer
Thanks
Haris PecoMemberBernard,
We are intersted in supporting stored procedures in Sybase and MS SQL.Please, could you help me with these features :
– what is your sybase version ?
– what is your prefered features ?
– have you got examples for procedures and sql scripts that you can show ?Thanks
-
AuthorPosts