Stored procedure return status question.

I have a long stored procedure, inside this procedure, it created some temp tables and populate to a table with the data selected from these temp tables, and it will take several minutes to execute this procedure (to populate the table with the selected results takes that much time). Everything works fine except I want a return status to show the procedure is finished running (after several minutes). But when I execute the procedure, it just showed how many rows are updated, etc. there is no end of execution information when the procedure exits. Even when I add one line: print 'Done' at the end of the procedure, there is still no output 'Done' printed to screen at the end of running the procedure. Please advise. Thanks.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh RetnakaranDatabase AdministratorCommented:
in order to get the execution status do this

Declare @Ret int
Exec @Ret = urSpName <Parameters>

If the sp run successfully, the return value will be 0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
please set nocount option


Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.