Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Gathering stored procedure parameters from file

Author  Topic 

gamaz
Posting Yak Master

104 Posts

Posted - 2010-05-19 : 19:28:13
Hi,
I have a stored procedure that I need to test with same kind of data on a repeated basis. I usually use visual studio 2005 to run stored procedure after setting parameters in the window that pops up to fill in the stored procedure parameters. I was wondering if there is a stored procedure by using these parameters stored in a file. I appreciate any help. Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-19 : 19:45:34
I am not clear on what you are asking, specifically this part:
quote:

I was wondering if there is a stored procedure by using these parameters stored in a file.



Could you elaborate?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-05-19 : 21:11:48
You could use powershell to access a file with the list of parameters, loop on each set of parameters and pass them to SQLCMD to execute the stored procedure.

Is this what you are looking for?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-05-20 : 09:39:59
or using a filesystem object connect to the file and get parameters based on matching witht the procedure name

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

gamaz
Posting Yak Master

104 Posts

Posted - 2010-05-21 : 15:04:00
Sorry for the late response. Yes I am trying to find out a way to run stored procedure by invoking a file that will have a set of parameter. I should be able to change the parameters from the file.
I would like to know if there any any internet article that illustrates the above.
Thanks to everyone for the help.
Regards.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-05-21 : 20:39:49
There are a lot of articles available - google powershell and sql server and you will get plenty of hits.
Go to Top of Page

gamaz
Posting Yak Master

104 Posts

Posted - 2010-05-24 : 11:22:34
Thanks for the help jeffw.
Go to Top of Page
   

- Advertisement -