Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Database Server Software > Sybase > executing stored procedure script

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-30-07, 22:29
tiger66 tiger66 is offline
Registered User
 
Join Date: Dec 2007
Posts: 24
executing stored procedure script

Hi
I have a stored procedure script (test.proc) in a folder
I try to execute the script after I enter the isql program
>exec test
>go

However I am getting a stored procedure 'test' not found error message.

Can someone help me running a stored procedure script?
Did I miss any step?

Thanks in advance for your help
Reply With Quote
  #2 (permalink)  
Old 12-31-07, 02:35
pdreyer pdreyer is offline
Registered User
 
Join Date: May 2005
Location: South Africa
Posts: 830
Maybe you are not in the correct DB
use isql -D database
or in your script
use database
go
Maybe the owner is not dbo and isql login as a different user
[exec[ute]] [@return_status = ]
[[[server .]database.]owner.]procedure_name[ ;number]
[[@parameter_name =] value |
[@parameter_name =] @variable [output]
[, [@parameter_name =] value |
[@parameter_name =] @variable [output]...]]
[with recompile]

What is the result from isql when you execute
select user_name(uid) 'user', name
from sysobjects
where name='test'
and type='P'

Last edited by pdreyer : 01-03-08 at 02:14.
Reply With Quote
  #3 (permalink)  
Old 01-02-08, 21:52
trvishi trvishi is offline
Registered User
 
Join Date: Sep 2003
Location: Switzerland
Posts: 371
Quote:
Originally Posted by tiger66
Hi
I have a stored procedure script (test.proc) in a folder
I try to execute the script after I enter the isql program
>exec test
>go

However I am getting a stored procedure 'test' not found error message.

Can someone help me running a stored procedure script?
Did I miss any step?

Thanks in advance for your help


You are saying test.proc. By any chance is it in a file in a filesystem and you havent created the procedure yet in the database?
Reply With Quote
  #4 (permalink)  
Old 01-05-08, 00:42
tiger66 tiger66 is offline
Registered User
 
Join Date: Dec 2007
Posts: 24
Thanks all for trying to help

I have solved my problem by putting my stored procedure into the database by running isql -i test.proc

Thanks
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On