Showing posts with label proceedure. Show all posts
Showing posts with label proceedure. Show all posts

Friday, March 9, 2012

Execute SQL task editor problem

hi !

I have problem here with sql task editor. i have a stored proceedure with 1 input value and 1 output value which needs to be updated in a variable.

stored proc - exec GetRDate ? , ? output

input value is set in a varaible.

I tried giving 1 input and 1 output in the parameter box and result set as fullresultset 1 value for variable -

" failed with the following error: "No disconnected record set is available for the specified SQL statement.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Task failed: Get Retention Date

what should i give in the parameter and result set

Thanks,

Jasmine

Check out "The ExecuteSQL Task" explained @. http://www.sqlis.com/default.aspx?58
Lots of different examples are discussed.

Also check out the sections 'Using Parameters with Stored Procedures'', 'Getting Values of Return Codes', 'Specifying a Result Set Type', 'Populating a Variable with a Result Set' @. http://msdn2.microsoft.com/en-us/library/ms141003.aspx

Thanks,
Loonysan

Wednesday, March 7, 2012

Execute Program with Time Delay

Hi
I would like to execute a program from an SQL Server Proceedure.
But I need to Execute it with a 3 minute time delay, plus if there is
another instance of this delayed execute running then I need to not add
another.
Any help would be much appreciated
Thanks
BTry this
WAITFOR DELAY '00:03:00"
Madhivanan|||Synchronous or asynchronous?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ben" <Ben@.NoSpam.com> wrote in message news:%23wVcch9HFHA.3608@.TK2MSFTNGP14.phx.gbl...[col
or=darkred]
> Hi
> I would like to execute a program from an SQL Server Proceedure.
> But I need to Execute it with a 3 minute time delay, plus if there is anot
her instance of this
> delayed execute running then I need to not add another.
> Any help would be much appreciated
> Thanks
> B
>[/color]|||Hi Tibor
Asynchronous, as I would like the user to continue working, in ignorance of
the delay/execution of the application.
Thanks
B
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OHzPo99HFHA.1172@.TK2MSFTNGP12.phx.gbl...
> Synchronous or asynchronous?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Ben" <Ben@.NoSpam.com> wrote in message
> news:%23wVcch9HFHA.3608@.TK2MSFTNGP14.phx.gbl...
>|||You can, from the stored procedure, create or just schedule a SQL Server Age
nt job. See Books Online
for things as sp_add_job etc. You need to put in some code for the checking
whether the job is
already "on queue". Agent will not execute a job is it is already executing
(will not have two
instances of the same job executing at the same time), so perhaps this is su
fficient for you?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Ben" <Ben@.NoSpam.com> wrote in message news:e2m4wF%23HFHA.3484@.TK2MSFTNGP12.phx.gbl...[col
or=darkred]
> Hi Tibor
> Asynchronous, as I would like the user to continue working, in ignorance o
f the delay/execution of
> the application.
> Thanks
> B
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:OHzPo99HFHA.1172@.TK2MSFTNGP12.phx.gbl...
>[/color]