Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2007
    Posts
    32

    Unanswered: 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

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    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.

  3. #3
    Join Date
    Sep 2003
    Location
    Switzerland
    Posts
    443
    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?

  4. #4
    Join Date
    Dec 2007
    Posts
    32
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •