Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Friday, February 24, 2012

dtexec Return Success BUT Not Run!

I've created a Maintenance Plan in Microsoft SQL Server Management Studio (Sql Server 2005 SP2 + Windows Updates) and currently trying to execute it via the dtexec command line program.

The problem is that it reports that it executed the Maintenance Plan but it never actually executes the Plan. The data isn't updated and the CPU and hard drive I/O reports nothing happening.

I've checked the argument lists but I don't think I've missed anything...?

On the Sql Machine itself, I run the command line as follows:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\V2Admin>cd \
C:\>dtexec /SQL "\Maintenance Plans\GPI Update" /Server V2SQL\VC2 /User sa /Pass
word XxXxXxX
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 32-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Started: 11:29:43 AM
DTExec: The package execution returned DTSER_SUCCESS (0).
Started: 11:29:43 AM
Finished: 11:29:44 AM
Elapsed: 0.375 seconds

C:\>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>I don't understand why you are running using DTEXEC, have you tried to schedule the package that is created using SSIS?|||We are running DTExec as we want chain together and run other processes outside as Sql Server as well, but want to use the History tracker of Sql Server's Maintenance Plans.

The Sql Server Maintenance Plan tasks are kept with Sql Server and the external processes are kept with their relevant tools.

We need to run both together which is why we need to call DtExec.

At the worst case scenario, we can simply run SqlCmd and execute the desired functionality, but that is asking for problems as there would then be two locations to maintain the Maintenance Tasks Sub-Plans.

Not a smart move in any operations manual!
|||

Schedule a maintenance plan and look at the arguments to dtexec in the agent job step. You will find that the subplan that contains your job steps is enabled from that command line. If you just run a maintenance plan without so enabling the subplans, all are disabled, and nothing runs, as you have confirmed in your scenario.

jkh

Sunday, February 19, 2012

DTCXact transaction in DBCC openTran

I keep seeing this return from running a DBCC OpenTran:

Transaction information for database 'Live_App'.

Oldest active transaction:
SPID (server process ID) : 92
UID (user ID) : 1
Name : DTCXact
LSN : (12837:1924:1)
Start time : Oct 4 2004 8:54:03:570AM
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.

I don't see anywhere in code that begins a transaction with the name
DTCXact explicitly. Is this a generic name for any transaction that is
opened without an explicit name? The problem I am having with this is
that sometime it will start and may not get commited or rolledback for
quite some time. I have seen it remain for over 1 1/2 hours before.
Would that be caused by the application not cleaning it up?
Your help in explaining the source of this will be appreciated. I did
find an entry on Microsoft.com that used the word DTCXact. It was
talking about Transaction Propagation from Resource Manager To
Application. I'm not sure if this applies to what I am seeing here or
not.

Thank you.
Kalvin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"Kalvin" <ktXXDelMeXXuel@.streck.com> wrote in message
news:4161599e$0$26142$c397aba@.news.newsgroups.ws.. .
> I keep seeing this return from running a DBCC OpenTran:
> Transaction information for database 'Live_App'.
> Oldest active transaction:
> SPID (server process ID) : 92
> UID (user ID) : 1
> Name : DTCXact
> LSN : (12837:1924:1)
> Start time : Oct 4 2004 8:54:03:570AM
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> I don't see anywhere in code that begins a transaction with the name
> DTCXact explicitly. Is this a generic name for any transaction that is
> opened without an explicit name? The problem I am having with this is
> that sometime it will start and may not get commited or rolledback for
> quite some time. I have seen it remain for over 1 1/2 hours before.
> Would that be caused by the application not cleaning it up?
> Your help in explaining the source of this will be appreciated. I did
> find an entry on Microsoft.com that used the word DTCXact. It was
> talking about Transaction Propagation from Resource Manager To
> Application. I'm not sure if this applies to what I am seeing here or
> not.
> Thank you.
> Kalvin
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

It looks like a distributed query, ie. a query or stored procedure being
executed on another server via a linked server (DTC is the Distributed
Transaction Coordinator service). You can use DBCC INPUTBUFFER,
fn_get_sql(), or Profiler to see exactly what the SPID is doing.

Simon