2

I have a stored procedure in SQL Server 2008 R2 that requires some parameters to be run.

Is there a way I can dynamically check the stored procedure to see which parameters are needed? It is being called via invoke-sqlcmd in powershell

1 Answer 1

2

There are at least three ways to get information about stored procedure parameters.

Experiment with

exec sp_help <sproc>

select * from information_schema.parameters where specific_name='<sproc>'

exec sp_sproc_columns <sproc>

and see which suits your needs best.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.