Showing posts with label package. Show all posts
Showing posts with label package. Show all posts

Saturday, February 25, 2012

Capturing queries sent to SQL Server

I use a software package that queries a Microsoft SQL Server 2000 database
from a client side Windows application. The client application has a built
in report generator that allows users to easily produce complex reports.
The client application was written in Delphi, and uses Borland's BDE to
connect to the SQL Server.
I would like to trap the SQL code that is being produced and sent to the
SQL Server from the report generator (so that I can get a get a better
understanding of how to directly query the database outside of the report
generator).
Any suggestions on how to do this? Are there any third party products that
can provide me with this capability?
Thanks,
DeanOne of my favourite tools will do this "Profiler". It is in your SQL Server
program group.
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"dean" <deanbillings@.yahoo.com> wrote in message
news:Xns93B61780A829Bdean918yahoocom@.24.168.128.78...
> I use a software package that queries a Microsoft SQL Server 2000 database
> from a client side Windows application. The client application has a
built
> in report generator that allows users to easily produce complex reports.
> The client application was written in Delphi, and uses Borland's BDE to
> connect to the SQL Server.
> I would like to trap the SQL code that is being produced and sent to the
> SQL Server from the report generator (so that I can get a get a better
> understanding of how to directly query the database outside of the report
> generator).
> Any suggestions on how to do this? Are there any third party products
that
> can provide me with this capability?
> Thanks,
> Dean|||Dean,
You don't need a third party product. Take a look a SQL Profiler that comes
with SQL Server. The following article will help you get the most out of
Profiler http://www.sql-server-performance.com/sql_server_profiler_tips.asp.
J.R.
Largo SQL Tools
The Finest Collection of SQL Tools Available
http://www.largosqltools.com
"dean" <deanbillings@.yahoo.com> wrote in message
news:Xns93B61780A829Bdean918yahoocom@.24.168.128.78...
> I use a software package that queries a Microsoft SQL Server 2000 database
> from a client side Windows application. The client application has a
built
> in report generator that allows users to easily produce complex reports.
> The client application was written in Delphi, and uses Borland's BDE to
> connect to the SQL Server.
> I would like to trap the SQL code that is being produced and sent to the
> SQL Server from the report generator (so that I can get a get a better
> understanding of how to directly query the database outside of the report
> generator).
> Any suggestions on how to do this? Are there any third party products
that
> can provide me with this capability?
> Thanks,
> Dean|||And if you have already looked there and could not find anything but
parameter passing. Get the SPID and find the first calls that define the
procedure.
If it is totally obscure, Net Monitor will show you the text in
any packet sent to your machine.
I think that you should use SQL Profiler so that you have this skill
in your tool bag anyway.
"Largo SQL Tools" <nospam@.yahoo.com> wrote in message
news:unNOnjGSDHA.2676@.TK2MSFTNGP10.phx.gbl...
> Dean,
> You don't need a third party product. Take a look a SQL Profiler that
comes
> with SQL Server. The following article will help you get the most out of
> Profiler
http://www.sql-server-performance.com/sql_server_profiler_tips.asp.
> J.R.
> Largo SQL Tools
> The Finest Collection of SQL Tools Available
> http://www.largosqltools.com
>
> "dean" <deanbillings@.yahoo.com> wrote in message
> news:Xns93B61780A829Bdean918yahoocom@.24.168.128.78...
> > I use a software package that queries a Microsoft SQL Server 2000
database
> > from a client side Windows application. The client application has a
> built
> > in report generator that allows users to easily produce complex reports.
> > The client application was written in Delphi, and uses Borland's BDE to
> > connect to the SQL Server.
> >
> > I would like to trap the SQL code that is being produced and sent to the
> > SQL Server from the report generator (so that I can get a get a better
> > understanding of how to directly query the database outside of the
report
> > generator).
> >
> > Any suggestions on how to do this? Are there any third party products
> that
> > can provide me with this capability?
> >
> > Thanks,
> > Dean
>|||Profiler is definitely your best option. One of the best tools available
and well worth the perceived 'non productive' time spent using/learning it.
"dean" <deanbillings@.yahoo.com> wrote in message
news:Xns93B61780A829Bdean918yahoocom@.24.168.128.78...
> I use a software package that queries a Microsoft SQL Server 2000 database
> from a client side Windows application. The client application has a
built
> in report generator that allows users to easily produce complex reports.
> The client application was written in Delphi, and uses Borland's BDE to
> connect to the SQL Server.
> I would like to trap the SQL code that is being produced and sent to the
> SQL Server from the report generator (so that I can get a get a better
> understanding of how to directly query the database outside of the report
> generator).
> Any suggestions on how to do this? Are there any third party products
that
> can provide me with this capability?
> Thanks,
> Dean

Capturing Execution Results

Hi All

When running an SSIS Package from BIDS, we get to see the "Progress" tab which explains us the progress of the SSIS Package. During production, is there any way to capture this log. I am interested in using this as a log file for each run of my SSIS package.

Thanks,

S Suresh

Have you tried to enable logging in the package?

Thanks,
Ovidiu Burlacu

|||

I tried loging. But I want some Progress Reporting similar to one we see in the Execution Results. Any thoughts on this?

Thanks,

S Suresh

|||

Suresh S wrote:

I tried loging. But I want some Progress Reporting similar to one we see in the Execution Results. Any thoughts on this?

Thanks,

S Suresh

The information in the logfile is exactly the same as in teh Prgress tab.

|||

Suresh,

Just in case, here they are talking about package loging and not about SQL Server Agent loging. Package loging as it is being said, it will provide what you need.

Rafael Salas

|||

Hello,

I am not sure, I understand the difference between the two and would appreciate it if you could clarify how to implement package logging as opposed to SQL Server Agent Logging. I have enabled the package logging property, however, would like to obtain a file that is in the same format as that displayed in the 'Execution Results/Progress' tab.

Thanks,

Subah.

|||

Subah wrote:

Hello,

I am not sure, I understand the difference between the two and would appreciate it if you could clarify how to implement package logging as opposed to SQL Server Agent Logging. I have enabled the package logging property, however, would like to obtain a file that is in the same format as that displayed in the 'Execution Results/Progress' tab.

Thanks,

Subah.

You won't get a file that looks the same as that tab, but you WILL get a file with the same information (actually that's not strictly true - I know of one thing you get extra in the 'Execution Results/Progress' tab but its not something you need). It just won't be presented as nicely as it is in the 'Execution Results/Progress' tab, that's all.

-Jamie

|||Thanks Jamie. I guess I am on the right track then. :-)

Capturing Execution Results

Hi All

When running an SSIS Package from BIDS, we get to see the "Progress" tab which explains us the progress of the SSIS Package. During production, is there any way to capture this log. I am interested in using this as a log file for each run of my SSIS package.

Thanks,

S Suresh

Have you tried to enable logging in the package?

Thanks,
Ovidiu Burlacu

|||

I tried loging. But I want some Progress Reporting similar to one we see in the Execution Results. Any thoughts on this?

Thanks,

S Suresh

|||

Suresh S wrote:

I tried loging. But I want some Progress Reporting similar to one we see in the Execution Results. Any thoughts on this?

Thanks,

S Suresh

The information in the logfile is exactly the same as in teh Prgress tab.

|||

Suresh,

Just in case, here they are talking about package loging and not about SQL Server Agent loging. Package loging as it is being said, it will provide what you need.

Rafael Salas

|||

Hello,

I am not sure, I understand the difference between the two and would appreciate it if you could clarify how to implement package logging as opposed to SQL Server Agent Logging. I have enabled the package logging property, however, would like to obtain a file that is in the same format as that displayed in the 'Execution Results/Progress' tab.

Thanks,

Subah.

|||

Subah wrote:

Hello,

I am not sure, I understand the difference between the two and would appreciate it if you could clarify how to implement package logging as opposed to SQL Server Agent Logging. I have enabled the package logging property, however, would like to obtain a file that is in the same format as that displayed in the 'Execution Results/Progress' tab.

Thanks,

Subah.

You won't get a file that looks the same as that tab, but you WILL get a file with the same information (actually that's not strictly true - I know of one thing you get extra in the 'Execution Results/Progress' tab but its not something you need). It just won't be presented as nicely as it is in the 'Execution Results/Progress' tab, that's all.

-Jamie

|||Thanks Jamie. I guess I am on the right track then. :-)

Sunday, February 19, 2012

Capture Error In DTS Package

I have a SQL Server Package that is dumping a text file into an Access
Database. However, due to update timing every now and then it errors
out due to a primary key violation. How do I capture that error
number in my next Active Script Task and determine whether or not I
want to continue (since if it's a duplicate I just want to skip it and
finish the DTS package). If it's a different error I want to log
it.
Thanks!Hi
If these are identity values you may want to check out
http://www.sqldts.com/293.aspx
if not try
http://www.sqldts.com/282.aspx
John
"Creative" wrote:

> I have a SQL Server Package that is dumping a text file into an Access
> Database. However, due to update timing every now and then it errors
> out due to a primary key violation. How do I capture that error
> number in my next Active Script Task and determine whether or not I
> want to continue (since if it's a duplicate I just want to skip it and
> finish the DTS package). If it's a different error I want to log
> it.
> Thanks!
>|||On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> If these are identity values you may want to check outhttp://www.sqldts.co
m/293.aspx
> if not tryhttp://www.sqldts.com/282.aspx
> John
>
> "Creative" wrote:
>
> - Show quoted text -
Thanks for the reply but it doesn't look like that answers my
question. I'm actually using a File Transformation from a text file
to an access database. I have a connection to the text file and a
connection to an access database with a transformation connecting the
two.|||Hi
There was no mention of the destination database being an access database,
in your original post. I suggest that you therefore load into a staging tabl
e
and either do an update if the PK exists or an insert if it doesn't.
John
"Creative" wrote:

> On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Thanks for the reply but it doesn't look like that answers my
> question. I'm actually using a File Transformation from a text file
> to an access database. I have a connection to the text file and a
> connection to an access database with a transformation connecting the
> two.
>|||I don't know the answer, but it's a good question, and I'm in a
similar situation in SSIS - except I want to test for a warning code!
Googling found this crufty answer:
http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
There may be a better answer if you open up the multiphase data pump
business, but I have small experience with that.
Note there is also a DTS group, I'll copy this to.
Josh
On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
wrote:

>I have a SQL Server Package that is dumping a text file into an Access
>Database. However, due to update timing every now and then it errors
>out due to a primary key violation. How do I capture that error
>number in my next Active Script Task and determine whether or not I
>want to continue (since if it's a duplicate I just want to skip it and
>finish the DTS package). If it's a different error I want to log
>it.
>Thanks!|||Hi Josh
I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSIS
you have a standarderrorvariable which may be of some use to you, and there
is the configure error output dialog. you may want to check out Professional
SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359 o
r
the short videos on http://www.jumpstarttv.com such as
http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
application similar to the examples in the book work.
John
"JXStern" wrote:

> I don't know the answer, but it's a good question, and I'm in a
> similar situation in SSIS - except I want to test for a warning code!
> Googling found this crufty answer:
> http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
> There may be a better answer if you open up the multiphase data pump
> business, but I have small experience with that.
> Note there is also a DTS group, I'll copy this to.
> Josh
>
> On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
> wrote:
>
>|||John,
Thanks for several good hints, I'll be following them all. Configure error
output dialog?!?! Oh, in a data flow. Righto.
I keep waiting for some other, newer SSIS books to come out.
I've got the basics grinding along now, anyway.
Thanks again.
Josh
"John Bell" wrote:
[vbcol=seagreen]
> Hi Josh
> I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSI
S
> you have a standarderrorvariable which may be of some use to you, and ther
e
> is the configure error output dialog. you may want to check out Profession
al
> SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359
or
> the short videos on http://www.jumpstarttv.com such as
> http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
> application similar to the examples in the book work.
> John
> "JXStern" wrote:
>

Capture Error In DTS Package

I have a SQL Server Package that is dumping a text file into an Access
Database. However, due to update timing every now and then it errors
out due to a primary key violation. How do I capture that error
number in my next Active Script Task and determine whether or not I
want to continue (since if it's a duplicate I just want to skip it and
finish the DTS package). If it's a different error I want to log
it.
Thanks!Hi
If these are identity values you may want to check out
http://www.sqldts.com/293.aspx
if not try
http://www.sqldts.com/282.aspx
John
"Creative" wrote:
> I have a SQL Server Package that is dumping a text file into an Access
> Database. However, due to update timing every now and then it errors
> out due to a primary key violation. How do I capture that error
> number in my next Active Script Task and determine whether or not I
> want to continue (since if it's a duplicate I just want to skip it and
> finish the DTS package). If it's a different error I want to log
> it.
> Thanks!
>|||On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> If these are identity values you may want to check outhttp://www.sqldts.com/293.aspx
> if not tryhttp://www.sqldts.com/282.aspx
> John
>
> "Creative" wrote:
> > I have a SQL Server Package that is dumping a text file into an Access
> > Database. However, due to update timing every now and then it errors
> > out due to a primary key violation. How do I capture that error
> > number in my next Active Script Task and determine whether or not I
> > want to continue (since if it's a duplicate I just want to skip it and
> > finish the DTS package). If it's a different error I want to log
> > it.
> > Thanks!- Hide quoted text -
> - Show quoted text -
Thanks for the reply but it doesn't look like that answers my
question. I'm actually using a File Transformation from a text file
to an access database. I have a connection to the text file and a
connection to an access database with a transformation connecting the
two.|||Hi
There was no mention of the destination database being an access database,
in your original post. I suggest that you therefore load into a staging table
and either do an update if the PK exists or an insert if it doesn't.
John
"Creative" wrote:
> On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> > Hi
> >
> > If these are identity values you may want to check outhttp://www.sqldts.com/293.aspx
> > if not tryhttp://www.sqldts.com/282.aspx
> >
> > John
> >
> >
> >
> > "Creative" wrote:
> > > I have a SQL Server Package that is dumping a text file into an Access
> > > Database. However, due to update timing every now and then it errors
> > > out due to a primary key violation. How do I capture that error
> > > number in my next Active Script Task and determine whether or not I
> > > want to continue (since if it's a duplicate I just want to skip it and
> > > finish the DTS package). If it's a different error I want to log
> > > it.
> >
> > > Thanks!- Hide quoted text -
> >
> > - Show quoted text -
> Thanks for the reply but it doesn't look like that answers my
> question. I'm actually using a File Transformation from a text file
> to an access database. I have a connection to the text file and a
> connection to an access database with a transformation connecting the
> two.
>|||I don't know the answer, but it's a good question, and I'm in a
similar situation in SSIS - except I want to test for a warning code!
Googling found this crufty answer:
http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
There may be a better answer if you open up the multiphase data pump
business, but I have small experience with that.
Note there is also a DTS group, I'll copy this to.
Josh
On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
wrote:
>I have a SQL Server Package that is dumping a text file into an Access
>Database. However, due to update timing every now and then it errors
>out due to a primary key violation. How do I capture that error
>number in my next Active Script Task and determine whether or not I
>want to continue (since if it's a duplicate I just want to skip it and
>finish the DTS package). If it's a different error I want to log
>it.
>Thanks!|||Hi Josh
I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSIS
you have a standarderrorvariable which may be of some use to you, and there
is the configure error output dialog. you may want to check out Professional
SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359 or
the short videos on http://www.jumpstarttv.com such as
http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
application similar to the examples in the book work.
John
"JXStern" wrote:
> I don't know the answer, but it's a good question, and I'm in a
> similar situation in SSIS - except I want to test for a warning code!
> Googling found this crufty answer:
> http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
> There may be a better answer if you open up the multiphase data pump
> business, but I have small experience with that.
> Note there is also a DTS group, I'll copy this to.
> Josh
>
> On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
> wrote:
> >I have a SQL Server Package that is dumping a text file into an Access
> >Database. However, due to update timing every now and then it errors
> >out due to a primary key violation. How do I capture that error
> >number in my next Active Script Task and determine whether or not I
> >want to continue (since if it's a duplicate I just want to skip it and
> >finish the DTS package). If it's a different error I want to log
> >it.
> >
> >Thanks!
>|||John,
Thanks for several good hints, I'll be following them all. Configure error
output dialog?!?! Oh, in a data flow. Righto.
I keep waiting for some other, newer SSIS books to come out.
I've got the basics grinding along now, anyway.
Thanks again.
Josh
"John Bell" wrote:
> Hi Josh
> I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSIS
> you have a standarderrorvariable which may be of some use to you, and there
> is the configure error output dialog. you may want to check out Professional
> SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359 or
> the short videos on http://www.jumpstarttv.com such as
> http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
> application similar to the examples in the book work.
> John
> "JXStern" wrote:
> > I don't know the answer, but it's a good question, and I'm in a
> > similar situation in SSIS - except I want to test for a warning code!
> >
> > Googling found this crufty answer:
> > http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
> >
> > There may be a better answer if you open up the multiphase data pump
> > business, but I have small experience with that.
> >
> > Note there is also a DTS group, I'll copy this to.
> >
> > Josh
> >
> >
> > On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
> > wrote:
> >
> > >I have a SQL Server Package that is dumping a text file into an Access
> > >Database. However, due to update timing every now and then it errors
> > >out due to a primary key violation. How do I capture that error
> > >number in my next Active Script Task and determine whether or not I
> > >want to continue (since if it's a duplicate I just want to skip it and
> > >finish the DTS package). If it's a different error I want to log
> > >it.
> > >
> > >Thanks!
> >
> >

Capture Error In DTS Package

I have a SQL Server Package that is dumping a text file into an Access
Database. However, due to update timing every now and then it errors
out due to a primary key violation. How do I capture that error
number in my next Active Script Task and determine whether or not I
want to continue (since if it's a duplicate I just want to skip it and
finish the DTS package). If it's a different error I want to log
it.
Thanks!
Hi
If these are identity values you may want to check out
http://www.sqldts.com/293.aspx
if not try
http://www.sqldts.com/282.aspx
John
"Creative" wrote:

> I have a SQL Server Package that is dumping a text file into an Access
> Database. However, due to update timing every now and then it errors
> out due to a primary key violation. How do I capture that error
> number in my next Active Script Task and determine whether or not I
> want to continue (since if it's a duplicate I just want to skip it and
> finish the DTS package). If it's a different error I want to log
> it.
> Thanks!
>
|||On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Hi
> If these are identity values you may want to check outhttp://www.sqldts.com/293.aspx
> if not tryhttp://www.sqldts.com/282.aspx
> John
>
> "Creative" wrote:
>
> - Show quoted text -
Thanks for the reply but it doesn't look like that answers my
question. I'm actually using a File Transformation from a text file
to an access database. I have a connection to the text file and a
connection to an access database with a transformation connecting the
two.
|||Hi
There was no mention of the destination database being an access database,
in your original post. I suggest that you therefore load into a staging table
and either do an update if the PK exists or an insert if it doesn't.
John
"Creative" wrote:

> On Nov 27, 3:00 am, John Bell <jbellnewspo...@.hotmail.com> wrote:
> Thanks for the reply but it doesn't look like that answers my
> question. I'm actually using a File Transformation from a text file
> to an access database. I have a connection to the text file and a
> connection to an access database with a transformation connecting the
> two.
>
|||I don't know the answer, but it's a good question, and I'm in a
similar situation in SSIS - except I want to test for a warning code!
Googling found this crufty answer:
http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
There may be a better answer if you open up the multiphase data pump
business, but I have small experience with that.
Note there is also a DTS group, I'll copy this to.
Josh
On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
wrote:

>I have a SQL Server Package that is dumping a text file into an Access
>Database. However, due to update timing every now and then it errors
>out due to a primary key violation. How do I capture that error
>number in my next Active Script Task and determine whether or not I
>want to continue (since if it's a duplicate I just want to skip it and
>finish the DTS package). If it's a different error I want to log
>it.
>Thanks!
|||Hi Josh
I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSIS
you have a standarderrorvariable which may be of some use to you, and there
is the configure error output dialog. you may want to check out Professional
SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359 or
the short videos on http://www.jumpstarttv.com such as
http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
application similar to the examples in the book work.
John
"JXStern" wrote:

> I don't know the answer, but it's a good question, and I'm in a
> similar situation in SSIS - except I want to test for a warning code!
> Googling found this crufty answer:
> http://www.quest-pipelines.com/newsletter-v4/0603_E.htm
> There may be a better answer if you open up the multiphase data pump
> business, but I have small experience with that.
> Note there is also a DTS group, I'll copy this to.
> Josh
>
> On Mon, 26 Nov 2007 13:54:33 -0800 (PST), Creative <GraberJ@.gmail.com>
> wrote:
>
>
|||John,
Thanks for several good hints, I'll be following them all. Configure error
output dialog?!?! Oh, in a data flow. Righto.
I keep waiting for some other, newer SSIS books to come out.
I've got the basics grinding along now, anyway.
Thanks again.
Josh
"John Bell" wrote:
[vbcol=seagreen]
> Hi Josh
> I pointed the OP to the tutorial on Multiphase datapump on SQL DTS. In SSIS
> you have a standarderrorvariable which may be of some use to you, and there
> is the configure error output dialog. you may want to check out Professional
> SQL Server 2005 Integration Services by Brian Knight et al ISBN 0764584359 or
> the short videos on http://www.jumpstarttv.com such as
> http://www.jumpstarttv.com/Media.aspx?vid=34 where Brian shows how an
> application similar to the examples in the book work.
> John
> "JXStern" wrote:

Tuesday, February 14, 2012

Cant' run my SSIS Package from DTSRUN

Hi all.

I've working around this one. I have a package that receives a parameter in YYYYMMDD format. I've tried from dtsexecgui and pass parameter. Tried 20070101 and worked fine. Tried convert(varchar,getdate(),112) and the whole string is passed, not the result as I thought.

So, I google it, so I can do this convert. Find out that this can only be done by, for example, a stored procedure that runs a cmdshell (DTSRUN.exe).

I've deployed my package (LIXO) by the manifest (also tried in VS save copy as - think this is the same thing). And the package is under MSDB in SSIS.

But now, I trie to run the package with all I could, for example:

DTSRUN /S "." /N "LIXO" /E

DTSRUN /S "(localhost)" /N "LIXO" /E

Also tried with user and password. I think I tried everything. And the error is always the same.

Says

"Loading..."

but then it breaks telling that could not find the package...

I connect into SSIS, run the package and it works just fine.

Can't discover what is missing around here.

Thanks in advance.

Marco Francisco

DTSRUN works for DTS 2000 package, it can't do anything with SSIS 2005 packages.

Use DTEXEC.EXE

http://technet.microsoft.com/en-us/library/ms162810.aspx

|||Thank you very much Michael. That was it. Now it's all

working.

|||

Is there other way of executing dtexec? The production team will not enable xp_cmdshell, due to policies security. So I can't use this solution.

Other solution is to "force" variable to be getdate() in the parent package, but I'ld like to have other ideas/solutions. I want to make it throught a job sending YYYYMMDD parameter (based on GETDATE()) throught /SET statement.

Thanks.

|||

I can execute dtexec like this:

"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\PACKAGE_NAME" /SERVER "SERVER_NAME" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "VARIABLES"

my problem is, how can I use some SQL function in here. Function like CONVERT(varchar,getdate(),112). From what I've seen, this whole string (of convert function) is passed as the parameter and I want it's result in YYYYMMDD.

The purpose is to create a job (with SSIS step) that runs my SSIS package. But I want to edit command line manually so I can define the parameters as CONVERT(varchar,getdate(),112). Is this possible? Is this only possible with a Stored Procedure that builds this statement and execute it by xp_cmdshell?

|||Can't you edit the package so that instead of using that as a parameter, it just uses the expression as the default value for every execution?

If you're always passing in "convert(varchar,getdate(),112)" to the package, it doesn't make sense to continue passing that in when you can just apply that expression to a variable's expression property.

Cant' run my SSIS Package from DTSRUN

Hi all.

I've working around this one. I have a package that receives a parameter in YYYYMMDD format. I've tried from dtsexecgui and pass parameter. Tried 20070101 and worked fine. Tried convert(varchar,getdate(),112) and the whole string is passed, not the result as I thought.

So, I google it, so I can do this convert. Find out that this can only be done by, for example, a stored procedure that runs a cmdshell (DTSRUN.exe).

I've deployed my package (LIXO) by the manifest (also tried in VS save copy as - think this is the same thing). And the package is under MSDB in SSIS.

But now, I trie to run the package with all I could, for example:

DTSRUN /S "." /N "LIXO" /E

DTSRUN /S "(localhost)" /N "LIXO" /E

Also tried with user and password. I think I tried everything. And the error is always the same.

Says

"Loading..."

but then it breaks telling that could not find the package...

I connect into SSIS, run the package and it works just fine.

Can't discover what is missing around here.

Thanks in advance.

Marco Francisco

DTSRUN works for DTS 2000 package, it can't do anything with SSIS 2005 packages.

Use DTEXEC.EXE

http://technet.microsoft.com/en-us/library/ms162810.aspx

|||Thank you very much Michael. That was it. Now it's all

working.

|||

Is there other way of executing dtexec? The production team will not enable xp_cmdshell, due to policies security. So I can't use this solution.

Other solution is to "force" variable to be getdate() in the parent package, but I'ld like to have other ideas/solutions. I want to make it throught a job sending YYYYMMDD parameter (based on GETDATE()) throught /SET statement.

Thanks.

|||

I can execute dtexec like this:

"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\PACKAGE_NAME" /SERVER "SERVER_NAME" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "VARIABLES"

my problem is, how can I use some SQL function in here. Function like CONVERT(varchar,getdate(),112). From what I've seen, this whole string (of convert function) is passed as the parameter and I want it's result in YYYYMMDD.

The purpose is to create a job (with SSIS step) that runs my SSIS package. But I want to edit command line manually so I can define the parameters as CONVERT(varchar,getdate(),112). Is this possible? Is this only possible with a Stored Procedure that builds this statement and execute it by xp_cmdshell?

|||Can't you edit the package so that instead of using that as a parameter, it just uses the expression as the default value for every execution?

If you're always passing in "convert(varchar,getdate(),112)" to the package, it doesn't make sense to continue passing that in when you can just apply that expression to a variable's expression property.

Cant' run my SSIS Package from DTSRUN

Hi all.

I've working around this one. I have a package that receives a parameter in YYYYMMDD format. I've tried from dtsexecgui and pass parameter. Tried 20070101 and worked fine. Tried convert(varchar,getdate(),112) and the whole string is passed, not the result as I thought.

So, I google it, so I can do this convert. Find out that this can only be done by, for example, a stored procedure that runs a cmdshell (DTSRUN.exe).

I've deployed my package (LIXO) by the manifest (also tried in VS save copy as - think this is the same thing). And the package is under MSDB in SSIS.

But now, I trie to run the package with all I could, for example:

DTSRUN /S "." /N "LIXO" /E

DTSRUN /S "(localhost)" /N "LIXO" /E

Also tried with user and password. I think I tried everything. And the error is always the same.

Says

"Loading..."

but then it breaks telling that could not find the package...

I connect into SSIS, run the package and it works just fine.

Can't discover what is missing around here.

Thanks in advance.

Marco Francisco

DTSRUN works for DTS 2000 package, it can't do anything with SSIS 2005 packages.

Use DTEXEC.EXE

http://technet.microsoft.com/en-us/library/ms162810.aspx

|||Thank you very much Michael. That was it. Now it's all

working.

|||

Is there other way of executing dtexec? The production team will not enable xp_cmdshell, due to policies security. So I can't use this solution.

Other solution is to "force" variable to be getdate() in the parent package, but I'ld like to have other ideas/solutions. I want to make it throught a job sending YYYYMMDD parameter (based on GETDATE()) throught /SET statement.

Thanks.

|||

I can execute dtexec like this:

"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\PACKAGE_NAME" /SERVER "SERVER_NAME" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "VARIABLES"

my problem is, how can I use some SQL function in here. Function like CONVERT(varchar,getdate(),112). From what I've seen, this whole string (of convert function) is passed as the parameter and I want it's result in YYYYMMDD.

The purpose is to create a job (with SSIS step) that runs my SSIS package. But I want to edit command line manually so I can define the parameters as CONVERT(varchar,getdate(),112). Is this possible? Is this only possible with a Stored Procedure that builds this statement and execute it by xp_cmdshell?

|||Can't you edit the package so that instead of using that as a parameter, it just uses the expression as the default value for every execution?

If you're always passing in "convert(varchar,getdate(),112)" to the package, it doesn't make sense to continue passing that in when you can just apply that expression to a variable's expression property.

Cant' run my SSIS Package from DTSRUN

Hi all.

I've working around this one. I have a package that receives a parameter in YYYYMMDD format. I've tried from dtsexecgui and pass parameter. Tried 20070101 and worked fine. Tried convert(varchar,getdate(),112) and the whole string is passed, not the result as I thought.

So, I google it, so I can do this convert. Find out that this can only be done by, for example, a stored procedure that runs a cmdshell (DTSRUN.exe).

I've deployed my package (LIXO) by the manifest (also tried in VS save copy as - think this is the same thing). And the package is under MSDB in SSIS.

But now, I trie to run the package with all I could, for example:

DTSRUN /S "." /N "LIXO" /E

DTSRUN /S "(localhost)" /N "LIXO" /E

Also tried with user and password. I think I tried everything. And the error is always the same.

Says

"Loading..."

but then it breaks telling that could not find the package...

I connect into SSIS, run the package and it works just fine.

Can't discover what is missing around here.

Thanks in advance.

Marco Francisco

DTSRUN works for DTS 2000 package, it can't do anything with SSIS 2005 packages.

Use DTEXEC.EXE

http://technet.microsoft.com/en-us/library/ms162810.aspx

|||Thank you very much Michael. That was it. Now it's all

working.

|||

Is there other way of executing dtexec? The production team will not enable xp_cmdshell, due to policies security. So I can't use this solution.

Other solution is to "force" variable to be getdate() in the parent package, but I'ld like to have other ideas/solutions. I want to make it throught a job sending YYYYMMDD parameter (based on GETDATE()) throught /SET statement.

Thanks.

|||

I can execute dtexec like this:

"C:\Progra~2\Microsoft SQL Server\90\DTS\Binn\dtexec.exe" /SQL "\PACKAGE_NAME" /SERVER "SERVER_NAME" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "VARIABLES"

my problem is, how can I use some SQL function in here. Function like CONVERT(varchar,getdate(),112). From what I've seen, this whole string (of convert function) is passed as the parameter and I want it's result in YYYYMMDD.

The purpose is to create a job (with SSIS step) that runs my SSIS package. But I want to edit command line manually so I can define the parameters as CONVERT(varchar,getdate(),112). Is this possible? Is this only possible with a Stored Procedure that builds this statement and execute it by xp_cmdshell?

|||Can't you edit the package so that instead of using that as a parameter, it just uses the expression as the default value for every execution?

If you're always passing in "convert(varchar,getdate(),112)" to the package, it doesn't make sense to continue passing that in when you can just apply that expression to a variable's expression property.

Sunday, February 12, 2012

Can't use Package Variable to specify the filename for a Connection

I'm attempting to modify a flatfile import package so that I can reuse it to import several other files into the same table. I was unable to use package variables (containing the import filename) in the Flat File Connection Manager file name field. What is the proper way to solve this kind of problem in SSIS?Have you looked up property expressions in BOL? Give that a look.
http://sqljunkies.com/WebLog/knight_reign/archive/2005/02/12/7750.aspx
Thanks,
K|||

I setup a ForEach Loop Container to do this.

Create a Package Variable, for example, "varFileName", for the FileName. Then edit the ForEach Loop container. Select "Variable Mappings". Select the drop-down under the "Variable" column and select your "User: varFileName" variable. The index column should read "0". Save the object. Now add a Data Flow task and double-click to edit.

In the Data Flow window, create a Source Script transformation. Define your output columns on the "Inputs and Outputs" option. Click "Script" and add your variable "varFileName" to the property "ReadOnlyVariables". Now click the "Design Script" button, which opens up another window for scripting.

Add "Imports System.IO" to the top so you can read the flat file.

Read the file with the following code:

Dim strRecord as String
Dim objFlatFile As StreamReader = File.OpenText(Variables.varFileName)
Do Until objFlatFile.Peek = -1
strRecord = objFlatFile.ReadLine
[OutputBuffer].AddRow()
[OutputBuffer].[Column1] = Mid$(stRecord,1,4)
... etc.
Loop

Let me know if this helps...

Can't upgrade to RS SP1

I was able to install RS on my dev machine with no issues, but the SP1
upgrade package keeps crashing. I was able to upgrade our servers to
SP1, and other developers have been able to upgrade there PCs as well.
The error log says:
[Info] Calling MsiApplyPatch with szPatchPackage = c:\14763ee99882cc0c1d73512936\sp1patch.msp
and szInstallPackage = {null} and eInstallType = INSTALLTYPE_DEFAULT
and szCommandLine = RUNFROMSP1SETUP=TRUE REINSTALLMODE=romus
REINSTALL=Server_Components,RS_Server,RS_Manager,Client_Components,RS_Designer,RS_Admin_Tools,
[Info] MsiApplyPatch returned 1603
[Info] Reporting Error 1603 using Dr. Watson.
[Info] Setup exit code is 1603
Any ideas anyone?
Thanks,
BurtIs there an RSSp1msp#.log file? This log file should contain the actual
error.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Burt" <burt_5920@.yahoo.com> wrote in message
news:19e5f39f.0409151320.316d3abe@.posting.google.com...
> I was able to install RS on my dev machine with no issues, but the SP1
> upgrade package keeps crashing. I was able to upgrade our servers to
> SP1, and other developers have been able to upgrade there PCs as well.
> The error log says:
> [Info] Calling MsiApplyPatch with szPatchPackage => c:\14763ee99882cc0c1d73512936\sp1patch.msp
> and szInstallPackage = {null} and eInstallType = INSTALLTYPE_DEFAULT
> and szCommandLine = RUNFROMSP1SETUP=TRUE REINSTALLMODE=romus
>
REINSTALL=Server_Components,RS_Server,RS_Manager,Client_Components,RS_Design
er,RS_Admin_Tools,
> [Info] MsiApplyPatch returned 1603
> [Info] Reporting Error 1603 using Dr. Watson.
> [Info] Setup exit code is 1603
> Any ideas anyone?
> Thanks,
> Burt|||Daniel,
Thanks for getting back to me. The only part of the RSSp1msp#.log that
seems to contain an error is pasted below. My issues with that portion
are:
-I don't need to update my database, just the app server on my dev box
-ReportServer isn't the right name for the current database. That was
the name of the initial one we created and did not use.
-But the ReportServer database still exists and I am dbo, contrary to
what the message says.
Any addition help would be greatly appreciated.
Burt
SQL_SUCCESS_WITH_INFO (1) in SQLDriverConnectW
sqlstate=01000, level=0, state=0, native_error=5701, msg=Changed
database context to 'master'.
sqlstate=01000, level=0, state=0, native_error=5703, msg=Changed
language setting to us_english.
SQL_ERROR (-1) in SQLExecDirectW
sqlstate=08004, level=14, state=1, native_error=916, msg=Server user
'BurtsDomain\burt' is not a valid user in database 'ReportServer'.
SQL_ERROR (-1) in SQLExecDirectW. sqlstate=08004, level=14, state=1,
native_error=916, msg=Server user 'BurtsDomain\burt' is not a valid
user in database 'ReportServer'..
SQL_SUCCESS_WITH_INFO (1) in SQLDriverConnectW
sqlstate=01000, level=0, state=0, native_error=5701, msg=Changed
database context to 'master'.
sqlstate=01000, level=0, state=0, native_error=5703, msg=Changed
language setting to us_english.
SQL_ERROR (-1) in SQLExecDirectW
sqlstate=08004, level=14, state=1, native_error=916, msg=Server user
'BurtsDomain\burt' is not a valid user in database 'ReportServer'.
SQL_ERROR (-1) in SQLExecDirectW. sqlstate=08004, level=14, state=1,
native_error=916, msg=Server user 'BurtsDomain\burt' is not a valid
user in database 'ReportServer'..
Set_Sp1_Upgrade_Settings: Unexpected Database Version. Set will roll
back.
"Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message news:<eLcwTDBnEHA.1412@.tk2msftngp13.phx.gbl>...
> Is there an RSSp1msp#.log file? This log file should contain the actual
> error.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Burt" <burt_5920@.yahoo.com> wrote in message
> news:19e5f39f.0409151320.316d3abe@.posting.google.com...
> > I was able to install RS on my dev machine with no issues, but the SP1
> > upgrade package keeps crashing. I was able to upgrade our servers to
> > SP1, and other developers have been able to upgrade there PCs as well.
> > The error log says:
> >
> > [Info] Calling MsiApplyPatch with szPatchPackage => > c:\14763ee99882cc0c1d73512936\sp1patch.msp
> > and szInstallPackage = {null} and eInstallType = INSTALLTYPE_DEFAULT
> > and szCommandLine = RUNFROMSP1SETUP=TRUE REINSTALLMODE=romus
> >
> REINSTALL=Server_Components,RS_Server,RS_Manager,Client_Components,RS_Design
> er,RS_Admin_Tools,
> > [Info] MsiApplyPatch returned 1603
> > [Info] Reporting Error 1603 using Dr. Watson.
> > [Info] Setup exit code is 1603
> >
> > Any ideas anyone?
> >
> > Thanks,
> >
> > Burt|||I don't understand why you think you don't need to update the database. SP1
requires DB updates.
You said that you changed the name of the DB. How did you do this, with
RSConfig? Setup should be using the values in the rsreportserver.config
file for connecting to the DB. If you rename the DB does RS still work?
Finally, like setup for RS, SP1 uses the user running setup to talk to the
DB. This user needs to have system Admin rights in Sql Server. Please
ensure this is the case.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Burt" <burt_5920@.yahoo.com> wrote in message
news:19e5f39f.0409170944.7c45b429@.posting.google.com...
> Daniel,
> Thanks for getting back to me. The only part of the RSSp1msp#.log that
> seems to contain an error is pasted below. My issues with that portion
> are:
> -I don't need to update my database, just the app server on my dev box
> -ReportServer isn't the right name for the current database. That was
> the name of the initial one we created and did not use.
> -But the ReportServer database still exists and I am dbo, contrary to
> what the message says.
> Any addition help would be greatly appreciated.
> Burt
>
> SQL_SUCCESS_WITH_INFO (1) in SQLDriverConnectW
> sqlstate=01000, level=0, state=0, native_error=5701, msg=Changed
> database context to 'master'.
> sqlstate=01000, level=0, state=0, native_error=5703, msg=Changed
> language setting to us_english.
> SQL_ERROR (-1) in SQLExecDirectW
> sqlstate=08004, level=14, state=1, native_error=916, msg=Server user
> 'BurtsDomain\burt' is not a valid user in database 'ReportServer'.
> SQL_ERROR (-1) in SQLExecDirectW. sqlstate=08004, level=14, state=1,
> native_error=916, msg=Server user 'BurtsDomain\burt' is not a valid
> user in database 'ReportServer'..
> SQL_SUCCESS_WITH_INFO (1) in SQLDriverConnectW
> sqlstate=01000, level=0, state=0, native_error=5701, msg=Changed
> database context to 'master'.
> sqlstate=01000, level=0, state=0, native_error=5703, msg=Changed
> language setting to us_english.
> SQL_ERROR (-1) in SQLExecDirectW
> sqlstate=08004, level=14, state=1, native_error=916, msg=Server user
> 'BurtsDomain\burt' is not a valid user in database 'ReportServer'.
> SQL_ERROR (-1) in SQLExecDirectW. sqlstate=08004, level=14, state=1,
> native_error=916, msg=Server user 'BurtsDomain\burt' is not a valid
> user in database 'ReportServer'..
> Set_Sp1_Upgrade_Settings: Unexpected Database Version. Set will roll
> back.
>
>
> "Daniel Reib [MSFT]" <danreib@.online.microsoft.com> wrote in message
news:<eLcwTDBnEHA.1412@.tk2msftngp13.phx.gbl>...
> > Is there an RSSp1msp#.log file? This log file should contain the actual
> > error.
> >
> > --
> > -Daniel
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> >
> >
> > "Burt" <burt_5920@.yahoo.com> wrote in message
> > news:19e5f39f.0409151320.316d3abe@.posting.google.com...
> > > I was able to install RS on my dev machine with no issues, but the SP1
> > > upgrade package keeps crashing. I was able to upgrade our servers to
> > > SP1, and other developers have been able to upgrade there PCs as well.
> > > The error log says:
> > >
> > > [Info] Calling MsiApplyPatch with szPatchPackage => > > c:\14763ee99882cc0c1d73512936\sp1patch.msp
> > > and szInstallPackage = {null} and eInstallType = INSTALLTYPE_DEFAULT
> > > and szCommandLine = RUNFROMSP1SETUP=TRUE REINSTALLMODE=romus
> > >
> >
REINSTALL=Server_Components,RS_Server,RS_Manager,Client_Components,RS_Design
> > er,RS_Admin_Tools,
> > > [Info] MsiApplyPatch returned 1603
> > > [Info] Reporting Error 1603 using Dr. Watson.
> > > [Info] Setup exit code is 1603
> > >
> > > Any ideas anyone?
> > >
> > > Thanks,
> > >
> > > Burt