Showing posts with label scheduled. Show all posts
Showing posts with label scheduled. Show all posts

Wednesday, March 28, 2012

How to Schedule a task in Vista

Hi All,

Is Vista get rid of the task scheduling? We can schedule a task easily through the Scheduled Task under control panel, but I cannot find similar stuff in Vista.

Can anyone tell me if schedule a task is still available in Vista? If yes, where can I do that?

Thakns in advance!

Gordon

Ummm... A suggestion, especially for something that isn't released yet:

Search Microsoft's Web site for this information. Or even Google.

Your answer looks to be in the first link when I searched for "windows vista scheduled task" in Google.

Phil|||Good suggestion and will keep in mind!

Friday, March 23, 2012

How to run SSIS package as a SQL Scheduled Job?

Hello:
I have a SSIS package that will import data from one DB to another. I would
like to set it up as a nightly job. When I did, it faied within couple
seconds & the error saying that Login failed for user (TRSNT\dev02-SQL01) -
that user is the SQL service account that SQL Agent uses.
Message
Executed as user: TRSNT\dev02-sql01. ... 9.00.3042.00 for 64-bit Copyright
(C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:01:42 AM
Error: 2007-10-26 11:01:48.23 Code: 0xC0202009 Source: Copy Jbq Opr
Sec Tables from TRSDev to TRSDev0203 Connection manager
"SourceConnectionOLEDB" Description: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is
available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D
Description: "Login failed for user 'TRSNT\dev02-sql01'.". End Error
Error: 2007-10-26 11:01:48.23 Code: 0xC020801C Source: Data Flow
Task Source - GenTRSEmailAddr [1] Description: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection
method call to the connection manager "SourceConnectionOLEDB" failed with
error code 0xC0202009. There may be error messages posted before this with
more information on why the ... The package execution fa... The step
failed.
Am I missing something here?
Thank you in advavnce for your responses.
Chai> When I did, it faied within couple
> seconds & the error saying that Login failed for user (TRSNT\dev02-SQL01) -
> that user is the SQL service account that SQL Agent uses.
Did you add that Windows account to the SQL Server you try to access?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Chai" <chai@.trs.state.il.us> wrote in message news:efV8Dq%23FIHA.1324@.TK2MSFTNGP06.phx.gbl...
> Hello:
> I have a SSIS package that will import data from one DB to another. I would
> like to set it up as a nightly job. When I did, it faied within couple
> seconds & the error saying that Login failed for user (TRSNT\dev02-SQL01) -
> that user is the SQL service account that SQL Agent uses.
> Message
> Executed as user: TRSNT\dev02-sql01. ... 9.00.3042.00 for 64-bit Copyright
> (C) Microsoft Corp 1984-2005. All rights reserved. Started: 11:01:42 AM
> Error: 2007-10-26 11:01:48.23 Code: 0xC0202009 Source: Copy Jbq Opr
> Sec Tables from TRSDev to TRSDev0203 Connection manager
> "SourceConnectionOLEDB" Description: SSIS Error Code DTS_E_OLEDBERROR.
> An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is
> available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D
> Description: "Login failed for user 'TRSNT\dev02-sql01'.". End Error
> Error: 2007-10-26 11:01:48.23 Code: 0xC020801C Source: Data Flow
> Task Source - GenTRSEmailAddr [1] Description: SSIS Error Code
> DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection
> method call to the connection manager "SourceConnectionOLEDB" failed with
> error code 0xC0202009. There may be error messages posted before this with
> more information on why the ... The package execution fa... The step
> failed.
>
> Am I missing something here?
> Thank you in advavnce for your responses.
>
> Chai
>|||Tibor:
Yes, I tried what you suggested and still received the same error.
Chai
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:A4D3631B-13AE-475C-907C-3A24D1AAF71D@.microsoft.com...
>> When I did, it faied within couple seconds & the error saying that Login
>> failed for user (TRSNT\dev02-SQL01) - that user is the SQL service
>> account that SQL Agent uses.
> Did you add that Windows account to the SQL Server you try to access?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Chai" <chai@.trs.state.il.us> wrote in message
> news:efV8Dq%23FIHA.1324@.TK2MSFTNGP06.phx.gbl...
>> Hello:
>> I have a SSIS package that will import data from one DB to another. I
>> would like to set it up as a nightly job. When I did, it faied within
>> couple seconds & the error saying that Login failed for user
>> (TRSNT\dev02-SQL01) - that user is the SQL service account that SQL Agent
>> uses.
>> Message
>> Executed as user: TRSNT\dev02-sql01. ... 9.00.3042.00 for 64-bit
>> Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started:
>> 11:01:42 AM Error: 2007-10-26 11:01:48.23 Code: 0xC0202009
>> Source: Copy Jbq Opr Sec Tables from TRSDev to TRSDev0203 Connection
>> manager "SourceConnectionOLEDB" Description: SSIS Error Code
>> DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
>> An OLE DB record is available. Source: "Microsoft SQL Native Client"
>> Hresult: 0x80040E4D Description: "Login failed for user
>> 'TRSNT\dev02-sql01'.". End Error Error: 2007-10-26 11:01:48.23 Code:
>> 0xC020801C Source: Data Flow Task Source - GenTRSEmailAddr [1]
>> Description: SSIS Error Code
>> DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
>> AcquireConnection method call to the connection manager
>> "SourceConnectionOLEDB" failed with error code 0xC0202009. There may be
>> error messages posted before this with more information on why the ...
>> The package execution fa... The step failed.
>>
>> Am I missing something here?
>> Thank you in advavnce for your responses.
>>
>> Chai|||Can you log in interactively using the TRSNT\dev02-sql01 account and execute your package?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Chai" <chai@.trs.state.il.us> wrote in message news:%23JcE06%23FIHA.1164@.TK2MSFTNGP02.phx.gbl...
> Tibor:
> Yes, I tried what you suggested and still received the same error.
>
> Chai
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:A4D3631B-13AE-475C-907C-3A24D1AAF71D@.microsoft.com...
>> When I did, it faied within couple seconds & the error saying that Login
>> failed for user (TRSNT\dev02-SQL01) - that user is the SQL service
>> account that SQL Agent uses.
>> Did you add that Windows account to the SQL Server you try to access?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>> "Chai" <chai@.trs.state.il.us> wrote in message
>> news:efV8Dq%23FIHA.1324@.TK2MSFTNGP06.phx.gbl...
>> Hello:
>> I have a SSIS package that will import data from one DB to another. I
>> would like to set it up as a nightly job. When I did, it faied within
>> couple seconds & the error saying that Login failed for user
>> (TRSNT\dev02-SQL01) - that user is the SQL service account that SQL Agent
>> uses.
>> Message
>> Executed as user: TRSNT\dev02-sql01. ... 9.00.3042.00 for 64-bit
>> Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started:
>> 11:01:42 AM Error: 2007-10-26 11:01:48.23 Code: 0xC0202009
>> Source: Copy Jbq Opr Sec Tables from TRSDev to TRSDev0203 Connection
>> manager "SourceConnectionOLEDB" Description: SSIS Error Code
>> DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
>> An OLE DB record is available. Source: "Microsoft SQL Native Client"
>> Hresult: 0x80040E4D Description: "Login failed for user
>> 'TRSNT\dev02-sql01'.". End Error Error: 2007-10-26 11:01:48.23 Code:
>> 0xC020801C Source: Data Flow Task Source - GenTRSEmailAddr [1]
>> Description: SSIS Error Code
>> DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
>> AcquireConnection method call to the connection manager
>> "SourceConnectionOLEDB" failed with error code 0xC0202009. There may be
>> error messages posted before this with more information on why the ...
>> The package execution fa... The step failed.
>>
>> Am I missing something here?
>> Thank you in advavnce for your responses.
>>
>> Chai
>|||Is the SQL server agent start-up account a network account?
Especially when jobs are running across the network, use a network account
to start the SQL Server agent services.
"Tibor Karaszi" wrote:
> Can you log in interactively using the TRSNT\dev02-sql01 account and execute your package?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
> "Chai" <chai@.trs.state.il.us> wrote in message news:%23JcE06%23FIHA.1164@.TK2MSFTNGP02.phx.gbl...
> > Tibor:
> >
> > Yes, I tried what you suggested and still received the same error.
> >
> >
> > Chai
> >
> >
> >
> > "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> > message news:A4D3631B-13AE-475C-907C-3A24D1AAF71D@.microsoft.com...
> >> When I did, it faied within couple seconds & the error saying that Login
> >> failed for user (TRSNT\dev02-SQL01) - that user is the SQL service
> >> account that SQL Agent uses.
> >>
> >> Did you add that Windows account to the SQL Server you try to access?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://sqlblog.com/blogs/tibor_karaszi
> >>
> >>
> >> "Chai" <chai@.trs.state.il.us> wrote in message
> >> news:efV8Dq%23FIHA.1324@.TK2MSFTNGP06.phx.gbl...
> >> Hello:
> >>
> >> I have a SSIS package that will import data from one DB to another. I
> >> would like to set it up as a nightly job. When I did, it faied within
> >> couple seconds & the error saying that Login failed for user
> >> (TRSNT\dev02-SQL01) - that user is the SQL service account that SQL Agent
> >> uses.
> >>
> >> Message
> >> Executed as user: TRSNT\dev02-sql01. ... 9.00.3042.00 for 64-bit
> >> Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started:
> >> 11:01:42 AM Error: 2007-10-26 11:01:48.23 Code: 0xC0202009
> >> Source: Copy Jbq Opr Sec Tables from TRSDev to TRSDev0203 Connection
> >> manager "SourceConnectionOLEDB" Description: SSIS Error Code
> >> DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
> >> An OLE DB record is available. Source: "Microsoft SQL Native Client"
> >> Hresult: 0x80040E4D Description: "Login failed for user
> >> 'TRSNT\dev02-sql01'.". End Error Error: 2007-10-26 11:01:48.23 Code:
> >> 0xC020801C Source: Data Flow Task Source - GenTRSEmailAddr [1]
> >> Description: SSIS Error Code
> >> DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
> >> AcquireConnection method call to the connection manager
> >> "SourceConnectionOLEDB" failed with error code 0xC0202009. There may be
> >> error messages posted before this with more information on why the ...
> >> The package execution fa... The step failed.
> >>
> >>
> >> Am I missing something here?
> >>
> >> Thank you in advavnce for your responses.
> >>
> >>
> >> Chai
> >
> >sql

How to run multiple dependent SQL Jobs with OSQL

I want to execute multiple SQL Server scheduled jobs using OSQL, but I only want to execute a job if the previous job completed. Is this possible? So far I am unable to prevent all jobs from starting before any have completed.

OSQL -Sservername -E -b -Q"usp_start_job 'JobNumber1'" -o usp_start_job.out
IF ERRORLEVEL 1 GOTO ERROR

OSQL -Sservername -E -b -Q"usp_start_job 'JobNumber2'" -o usp_start_job.out
IF ERRORLEVEL 1 GOTO ERROR

OSQL -Sservername -E -b -Q"usp_start_job 'JobNumber3'" -o usp_start_job.out
IF ERRORLEVEL 1 GOTO ERROR
GOTO EXIT

:ERROR
ECHO *** ERROR *** Check Log File

:EXIT
*** JOB COMPLETED ***

DaveCreate a new job that uses separate steps consisting of an sp_start_job to launch one of the other jobs. Each step will execute in turn, launching the appropriate job.

-PatP|||I already tried that with no success. The logic looks as follows:

sp_start_job 'DBA Test' -- Inserts one record into a table
go
sp_start_job 'DBA Test2' -- Waits 20 seconds and inserts a record
go
sp_start_job 'DBA Test3' -- Insert a record
go

All jobs execute immediately.

Dave|||That looks suspiciously like a SQL script instead of a job with a set of job steps to me.

-PatP|||Lightbulb.

We had a DR test this week and apparently I'm still experiencing the affects. Thanks for the help. That should do the trick.

Dave|||I spoke too soon. I added sp_start_job 'job name' to three different job steps and the same problem occurs. All three jobs are executed before any job completes. I believe the reason is due to sp_start_job. SQL Server successfully executes the command, which simply starts the job. It doesn't care whether or not the job it started has completed.

Any suggestions.

Dave

How to run MDX query as scheduled job?

Hi,

Is there any way to run MDX

query as scheduled job on SQL Server 2005?

We need create local cubes by

weekly or monthly. How can we put “Create global cube” MDX query into scheduled

job?

Any info would be greatly

appreciated.


Thanks.

Yes. Create a new SQL Server Agent job and add a step with the step type of SQL Server Analysis Services Query. For this type of step, you need to specify the SSAS server to connect to, the database to run the query within, and the text for the query itself.

Should do exactly what you want...

HTH,

Dave Fackler

|||

Hi Dave,

Thanks for the quick replay.

Could you recommend any article or books that I can take look?

Thanks.

|||

I'm assuming you are asking about references for SSIS? If that is the case, check out Microsoft SQL Server 2005 Integration Services (SQL Server Series) by Kirk Haselden, Professional SQL Server 2005 Integration Services (Programmer to Programmer) by Brian Knight et al, and The Rational Guide to Extending SSIS 2005 with Script (Rational Guides) (Rational Guides) by Donald Farmer. All great books related to SSIS that should get you started...

HTH,

Dave Fackler

|||Thank you very much Dave for answered my question. It's helpful.