Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts

Thursday, March 8, 2012

Automated procedures help

Anyone any tips for the most efficient way to automate procedures/sequence of queries in SQL server 2000?Set up a SQL Server Job through Enterprise Manager's SQL Server Agent.

blindman|||automate procedures and quries into stored procedures.

if you wish to schedule these tasks you can setup jobs to execute stored procedures or TSQL commnds or both.|||could triggers not be the answer........?|||Triggers are used when you want some event to occur every time data in a table is inserted, deleted, or modified.

For nightly batch processing, which is what I thought you were getting at, scheduled jobs are the most convenient method.

What kind of task are you trying to automate?

blindman|||Basically, I have a table ( or many tables) which are going to be updated several times a week, after which some queries will be run...............just need to automate this process......|||Actually..I think using schduled jobs and sprocs is my answer...do you tend to agree?|||Absolutely.

Friday, February 10, 2012

auto generate code for sp parameters?

Is there an easy way to generate the parameters code for calling stored procedures?

Is there an easy way to generate stored procedure code without having to manually type it in? I've seen 3rd party tools, but I was wondering if there's anything within Sql Server to do it.

I'm using c#, visual studio 2005, sql server 2005.

Thanks,

John

Using Visual Studio, Server Explorer, if I recall correctly, there 'may' be a procedure wizard.|||

I'm unable to locate it, please elaborate on how to find or get it. Do I need an sdk?

John

|||

For the T-SQL code, open SQL Server 2005 Management Studio and go to the Object explorer. Find your stored procedure, right click, and select Script Stored Procedure As > EXECUTE to > New Query Window Editor Window

Make sure to set the values of your variables before running.

For C# in Visual Studio, you might try asking the question again in one of the programming forums.