facebook

Running Sybase stored procedures from DB Browser

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #223500 Reply

    Hi,

    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.

    #223561 Reply

    Riyad Kalla
    Member

    I have asked our DB dev to have a look at this post.

    #223592 Reply

    Ed ross
    Member

    Not 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

    #223593 Reply

    Ed ross
    Member

    sorry – 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

    #223613 Reply

    support-jeff
    Member

    There 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.

    #223639 Reply

    My 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.

    #223651 Reply

    Ed ross
    Member

    To 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.

    #223654 Reply

    Thanks 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.

    #223655 Reply

    Riyad Kalla
    Member

    I 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.

    #253451 Reply

    bernardcena
    Member

    We 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

    #253488 Reply

    Haris Peco
    Member

    Bernard,

    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

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Running Sybase stored procedures from DB Browser

You must be logged in to post in the forum log in