Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Wednesday, March 7, 2012

DTSRun.exe doesn't exit if i run from command prompt

Hi,
I have a DTS package. When I run it from a DOS prompt as following,
c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name
Eveything is fine. I can see something like log messages output from the
command.
Then if I redirect output into a file like and run it again,
c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name >output_file
then the command never come back from it running. I'm sure the dts package
itself has finished running by check the output_file. The output_file said
like that the package has completed.
Can any help me solve this issue, what is the problem?
-Senthil
Maybe
WWW.SQLDTS.COM
Saludos
IIslas
"Spsk" wrote:

> Hi,
> I have a DTS package. When I run it from a DOS prompt as following,
> c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name
> Eveything is fine. I can see something like log messages output from the
> command.
> Then if I redirect output into a file like and run it again,
> c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name >output_file
> then the command never come back from it running. I'm sure the dts package
> itself has finished running by check the output_file. The output_file said
> like that the package has completed.
> Can any help me solve this issue, what is the problem?
> -Senthil
|||Thanks, I couldn't find any related this issue the sqldts.com...
Could anyone help me..
-Spsk
"Isaias" wrote:
[vbcol=seagreen]
> Maybe
> WWW.SQLDTS.COM
> --
> Saludos
> IIslas
>
> "Spsk" wrote:

DTSRun.exe doesn't exit if i run from command prompt

Hi,
I have a DTS package. When I run it from a DOS prompt as following,
c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name
Eveything is fine. I can see something like log messages output from the
command.
Then if I redirect output into a file like and run it again,
c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name >output_file
then the command never come back from it running. I'm sure the dts package
itself has finished running by check the output_file. The output_file said
like that the package has completed.
Can any help me solve this issue, what is the problem?
-SenthilMaybe
WWW.SQLDTS.COM
--
Saludos
IIslas
"Spsk" wrote:

> Hi,
> I have a DTS package. When I run it from a DOS prompt as following,
> c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name
> Eveything is fine. I can see something like log messages output from the
> command.
> Then if I redirect output into a file like and run it again,
> c:>dtsrun /S sql_server /U userid /P pwd /N dts_package_name >output_file
> then the command never come back from it running. I'm sure the dts package
> itself has finished running by check the output_file. The output_file said
> like that the package has completed.
> Can any help me solve this issue, what is the problem?
> -Senthil|||Thanks, I couldn't find any related this issue the sqldts.com...
Could anyone help me..
-Spsk
"Isaias" wrote:
[vbcol=seagreen]
> Maybe
> WWW.SQLDTS.COM
> --
> Saludos
> IIslas
>
> "Spsk" wrote:
>

dtsrun works from command prompt, but hangs from Query Analyzer

I have a dts that works from the command prompt, but hangs in Query Analyzer. Here's the code inside Query Analyzer:
exec master..xp_cmdshell 'dtsrun /S BFHSQL4 /N vhl_dts_14144b /E'

From the command prompt, it's just:
dtsrun /S BFHSQL4 /N vhl_dts_14144b /E

Any ideas what's wrong? Thanks for your help!Did the dtsrun cause SQL Server hang or just Query Analyzer hang? Did you got any error message when executing the package from Query Analyzer? You need more information for troubleshooting: use SQL Profiler to respectively capture a trace when execute dtsrun to the same package from commandline and Query Analyzer.|||Thanks for your response. I guess hangs might not be the right word. There are no error messages. Query Analyzer just tries to execute the package forever. It takes less than a minute to run from the command prompt. I've let it run for 1/2 hour in Query Analyzer before cancelling the query, then it takes several minutes to cancel. Other packages run fine with the same syntax. I think the problem is with this particular package. The dts just runs an activeX script, as follows:
Function Main()
Dim fileName

fileName = "\\mypath\myExcelFile.xls"

dim excelObject
set excelObject = CreateObject("Excel.Application")

excelObject.workbooks.open fileName

excelObject.Quit
set excelObject = Nothing

Main = DTSTaskExecResult_Success
End Function

I'm not really familiar with SQL Profiler. Do you still think using it will be helpful for this scenario? Thanks again for your help.|||Turns out that there was code inside the Excel file that was trying to save a file to a path that didn't exist. I fixed the path and now everything works fine.

Sunday, February 26, 2012

DTSRun doesn't complete

From a cmd prompt I am trying to DTS data out of an old version of
Btrieve to SQL Server 2000. It does the work just fine.
The last thing it displays is
DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
Step
However, at this point it just sits there and never comes back to the
command prompt.
Anyone know what may be wrong?John.Wentworth@.emersonprocess.com (JohnW) wrote in message news:<5d096b4e.0312300929.42ac5776@.posting.google.com>...
> From a cmd prompt I am trying to DTS data out of an old version of
> Btrieve to SQL Server 2000. It does the work just fine.
> The last thing it displays is
> DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
> Step
> However, at this point it just sits there and never comes back to the
> command prompt.
> Anyone know what may be wrong?
Nevermind I figured it out|||Wat was the reason for it not to come back to cmdprompt ?
jobi
"JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
news:5d096b4e.0312301428.348e1a2f@.posting.google.com...
> John.Wentworth@.emersonprocess.com (JohnW) wrote in message
news:<5d096b4e.0312300929.42ac5776@.posting.google.com>...
> > From a cmd prompt I am trying to DTS data out of an old version of
> > Btrieve to SQL Server 2000. It does the work just fine.
> >
> > The last thing it displays is
> >
> > DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
> > Step
> >
> > However, at this point it just sits there and never comes back to the
> > command prompt.
> >
> > Anyone know what may be wrong?
> Nevermind I figured it out|||"jobi" <jobi@.reply2.group> wrote in message news:<bstuqh$rte$1@.reader08.wxs.nl>...
> Wat was the reason for it not to come back to cmdprompt ?
Well for some reason you have specifically set the "Close Connection
on Completion" switch. This is found in the Workflow Properties
screen, Options tab. As soon as I set this the DTS package finishes
just like it should and comes back to the command prompt.
I am trying to DTS an entire database consisting of 198 tables. I have
to go to each connection and set this. They don't give you a way to
set this across the entire package. What a pain in the ass!
> jobi
> "JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
> news:5d096b4e.0312301428.348e1a2f@.posting.google.com...
> > John.Wentworth@.emersonprocess.com (JohnW) wrote in message
> news:<5d096b4e.0312300929.42ac5776@.posting.google.com>...
> > > From a cmd prompt I am trying to DTS data out of an old version of
> > > Btrieve to SQL Server 2000. It does the work just fine.
> > >
> > > The last thing it displays is
> > >
> > > DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
> > > Step
> > >
> > > However, at this point it just sits there and never comes back to the
> > > command prompt.
> > >
> > > Anyone know what may be wrong?
> >
> > Nevermind I figured it out|||So do it using the object model.
Function Main()
dim tsk
dim stp
dim pkg
dim cusTask
dim prp
set pkg = DTSGlobalVariables.Parent
for each tsk in pkg.Tasks
if tsk.CustomTaskID = "DTSDataPumpTask" THEN
for each stp in pkg.steps
if stp.TaskName = tsk.Name then
stp.Properties("CloseConnection").Value = -1
end if
Next
End if
Next
Main = DTSTaskExecResult_Success
End Function
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
news:5d096b4e.0312310501.9624dee@.posting.google.com...
> "jobi" <jobi@.reply2.group> wrote in message
news:<bstuqh$rte$1@.reader08.wxs.nl>...
> > Wat was the reason for it not to come back to cmdprompt ?
> Well for some reason you have specifically set the "Close Connection
> on Completion" switch. This is found in the Workflow Properties
> screen, Options tab. As soon as I set this the DTS package finishes
> just like it should and comes back to the command prompt.
> I am trying to DTS an entire database consisting of 198 tables. I have
> to go to each connection and set this. They don't give you a way to
> set this across the entire package. What a pain in the ass!
>
>
> >
> > jobi
> > "JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
> > news:5d096b4e.0312301428.348e1a2f@.posting.google.com...
> > > John.Wentworth@.emersonprocess.com (JohnW) wrote in message
> > news:<5d096b4e.0312300929.42ac5776@.posting.google.com>...
> > > > From a cmd prompt I am trying to DTS data out of an old version of
> > > > Btrieve to SQL Server 2000. It does the work just fine.
> > > >
> > > > The last thing it displays is
> > > >
> > > > DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
> > > > Step
> > > >
> > > > However, at this point it just sits there and never comes back to
the
> > > > command prompt.
> > > >
> > > > Anyone know what may be wrong?
> > >
> > > Nevermind I figured it out|||thanks for the feedback.
Happy newyear.
"JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
news:5d096b4e.0312310501.9624dee@.posting.google.com...
> "jobi" <jobi@.reply2.group> wrote in message
news:<bstuqh$rte$1@.reader08.wxs.nl>...
> > Wat was the reason for it not to come back to cmdprompt ?
> Well for some reason you have specifically set the "Close Connection
> on Completion" switch. This is found in the Workflow Properties
> screen, Options tab. As soon as I set this the DTS package finishes
> just like it should and comes back to the command prompt.
> I am trying to DTS an entire database consisting of 198 tables. I have
> to go to each connection and set this. They don't give you a way to
> set this across the entire package. What a pain in the ass!
>
>
> >
> > jobi
> > "JohnW" <John.Wentworth@.emersonprocess.com> wrote in message
> > news:5d096b4e.0312301428.348e1a2f@.posting.google.com...
> > > John.Wentworth@.emersonprocess.com (JohnW) wrote in message
> > news:<5d096b4e.0312300929.42ac5776@.posting.google.com>...
> > > > From a cmd prompt I am trying to DTS data out of an old version of
> > > > Btrieve to SQL Server 2000. It does the work just fine.
> > > >
> > > > The last thing it displays is
> > > >
> > > > DTSRun OnFinish: Copy Data from Account to [Test123].[dbo].[Account]
> > > > Step
> > > >
> > > > However, at this point it just sits there and never comes back to
the
> > > > command prompt.
> > > >
> > > > Anyone know what may be wrong?
> > >
> > > Nevermind I figured it out