Showing posts with label executed. Show all posts
Showing posts with label executed. Show all posts

Monday, March 26, 2012

running a job dyanamically

Hi All,
I have stored procedure which accepts an input
parameter.
I want to execute this stored procedure using a job.
This job will be executed based on an alert. How do I
pass the input parameter dynamically.
I am elaborating by giving an example.
a) procTest accepts a parameter @.n INT
b) There is a job called jobTest which has a step
stpTest which executes procTest @.n
c) If alertA fires I want to execute procTest 1
If alertB fires I want to execute procTest 2
If alertC fires I want to execute procTest 3
I hope I am clear with my question. Is it possible to do
this, or do I need to write seperate jobs for each alert
and hard code the parameter for the stored procedure.
Thanks in advance
AnandGuess the SP could look in sysalerts to see the last one that fired -
but would probably need to hold info for each alert in case multple
alerts fired at the same time (just save the last count for each alert
and check it to see what to process).
A lot easier to just define multiple jobs.
Posted via http://dbforums.com

Wednesday, March 21, 2012

Run SQL Server Report from .Net WIndows App...

Does a report have to be run from the Report Manager (IIS), or can rdl files
be executed from .Net code in a Windows Application?
I quess what I am asking is, with Crystal and VB 6, I can lauch a report
through a control embedded in the exe file.
Is there a control to place in a Windows Form that can view a report without
haing a IIS Report Manager?
--
Thanks,
ThomasLL, MCDBAI'm pretty sure SQL Reporting Services 2005 will have a WinForms and a
WebForms viewer.
"Thomas.LeBlanc@.NoSpam.Com" wrote:
> Does a report have to be run from the Report Manager (IIS), or can rdl files
> be executed from .Net code in a Windows Application?
> I quess what I am asking is, with Crystal and VB 6, I can lauch a report
> through a control embedded in the exe file.
> Is there a control to place in a Windows Form that can view a report without
> haing a IIS Report Manager?
> --
> Thanks,
> ThomasLL, MCDBAsql

Monday, March 12, 2012

Run multiple SSIS packages in order

I built 3 diffrent packages and i want to be executed in order. The first one is exporting some tables to another database and the other two packages are based on the database built in the first package.

Any suggestions?

Thank you in advance:)

I assume you wish to automate this process. The simplest option would be to create a SQL Server Agent job, and just have three steps within the job, one for each package.

A more SSIS orientated approach would be to use a master package, that has three execute package tasks, one for each of your existing packages. Link the Execute package Tasks together with workflow constraints to enforce the order of execution for the tasks and hence the packages.

|||

Darren,

Just a question: when we're talking about the maximum number of DTSX inside a DTSPROJ only limitation is the memory?

TIA

|||

Yes.

If you do have a lot then I'd be tempted to write a more dynamic process.

Perhaps use a SQL table to contain the list of packages, and also have a column for the order. You could then use the Exec SQL Task with simple SELECT query to extract the list of packages in order of execution. You could store this results in a variable, and then loop and shred this via the For Each Loop.

This example uses Data Flow task to get the result set into a variable, but I normally find an Exec SQL Task easier. It does show the shredding of the results via the loop though.

Shredding a Recordset

(http://www.sqlis.com/default.aspx?59)

|||

I used the SQL Server Agent Job.

thanks for the help :)

Friday, March 9, 2012

Run DTS Package as a SQL Job

I have a DTS Package, that runs just fine, when executed interactively. HOWEVER, When I schedule the pkg to run as SQL Job, it errors out.

So, I tried to go to the SQL JOb STEP-Advanced tab, and looking for the 'Run as User'. however, that option 'Run asUser' does not show up- Is this becahse the job is calling a dtspcakge, using the Operating sys commend Exec...

My questions is WHY Do I NOT SEE THE' RUN AS USER ' Option, in my Step of the SQL JOb?

When scheduled to execute via SQL Agent, DTS packages will run under the security context of the account under which the SQL Agent service is running. For this reason you'll need to assign permissions on any external resources, as appropriate, to this account.

Chris