Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Thursday, March 29, 2012

Can we have a folder as input path for SSIS package, and process all files within it?

Can we have a folder as input path for SSIS package, and process all files within it?

My client wish to run a batch process where in a folder he will put number of files, which needs to be processed by ssis package. Is that possible directly in ssis?

Alternate solution that I have thought of is...
1. user will copy all files in c:\folder1
2. a .NET component will
2.1 pick up files from folder1 one by one (process all files in the folder)
2.2 will copy that file in c:\INPUT folder by the name in.xls
2.3 will call SSIS package
2.4 SSIS package will process the file in.xls
2.5 end loop..go back to step 2.1

Do we have any othre way of achieving this task? Any suggestions are welcome. Thanks in advanc.

Regards,
MS Guy

MS Guy wrote:

Can we have a folder as input path for SSIS package, and process all files within it?

My client wish to run a batch process where in a folder he will put number of files, which needs to be processed by ssis package. Is that possible directly in ssis?

Alternate solution that I have thought of is...
1. user will copy all files in c:\folder1
2. a .NET component will
2.1 pick up files from folder1 one by one (process all files in the folder)
2.2 will copy that file in c:\INPUT folder by the name in.xls
2.3 will call SSIS package
2.4 SSIS package will process the file in.xls
2.5 end loop..go back to step 2.1

Do we have any othre way of achieving this task? Any suggestions are welcome. Thanks in advanc.

Regards,
MS Guy

There's a few things that make the answer "It depends" but there's a few things you should look at:
1) MULTIFLATFILE connection manager. This connection manager points to a colelction of files (usually all files in a folder) and you can then apply a single operation (such as loading the contents of all those files into a table) in one step. Usually the metadata of the files needs to be the same - it depends on what operation you're applying.

2) Use a Foreach loop container to loop over the files and process them individually. There's a bit more guidance on this here: http://blogs.conchango.com/jamiethomson/archive/2005/05/30/1489.aspx plus Darren and Allan have some good stuff on this at www.sqlis.com.

-Jamie

Tuesday, March 27, 2012

can we deploy RDL files into report server without using web services through .Net

how can we deploy the reports into report server with out using web services from .Net. Is it possible.

Hi vidya
It is possible, after the initial deployment and folders were created. You could do the following:
Browse to your reportserver. Normally [server]/reports
Browse to the report and click on it. Select the report's 'Properities' Tab. Under the heading 'Report Definition' are 2 options 'Edit' and 'Update'. Use the 'Update' to upload the new rdl file. This will deploy a new version.
Hope this helps
,l0n3i200n

Sunday, March 25, 2012

Can we a use a CSS or equivalent for a reports(RDLC File)

Hi,

I will be using RDLC files to display reports in various pages.

My Question is this.

I need to use the same type of formatting of color,fonts,font sizes and the background colors so that the same can be used across the reports.

This is somewhat like using a CSS file for aspx pages.

Any ideas... , solution........, .......

Hi,

Just wondering!

We have CSS for the aspx and the HTML pages.

Are there no ways to set a golbal standard for the Reports( Ok, be it a Server report or a local report.). Is it not correct what I am asking.

|||I've been looking into this also, and I found some old threads stating that themes and css are not supported but that they may be in the next version.|||

Hello,

Formatting for reports can be expression based. Create your reports using a standard formula for similar items and pass in values through a dataset. Another option would be to take formatting information in as parameters. The RDL file is just an XML file, you could modify it directly if you want. Here is a link to information on programmatically generating RDLs: http://technet.microsoft.com/en-us/library/ms154583.aspx. RDLs and RDLCs are very similar, and the same techniques could be used.

Good luck,

Larry

|||I need a clarification.

How do I assign a class in the css to a text box.

Say I have a class .txtboxTahomaBold in the CSS, how do I assign the class to the textbox. I do not find any property for the controls (textbox, table .... )|||

I am sorry to have misslead you. You do not get to assign CSS to the textboxes, but you can assign the regular SSRS formatting to each text box on a report prior to displaying it. The easiest way would be to create formulas within the report based on data that you provide through a dataset. For example, set the Font formula to =FieldsTextBoxTahomaBold.Value and have the dataset pass in the string "Normal, Tahoma, 11pt, Bold". Of course, you could also modify the XML, but that is more trouble than it is worth.

I will try and get an example written up on my blog. I will post a link here when I do.

Larry

|||

Thanks.

Waiting for your reply.

|||

Formatting your report based on the user or the data is relatively straight forward once you get the trick. To demonstrate, create a report with a valid connection to an instance of Microsoft SQL Server and use the following SQL as your query:

Code Snippet

SELECT
CASE @.param
WHEN 0 THEN 'Blue'
WHEN 1 THEN 'Red'
END AS color,
CASE @.param
WHEN 0 THEN '12pt'
WHEN 1 THEN '24pt'
END AS size

and create five text boxes with the following attributes:
TextBox1
Value: Color
Color: =First(Fields!color.Value)

TextBox2
Value: Size
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox3
Value: Both
Color: =First(Fields!color.Value)
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox4
Value: =First(Fields!color.Value)

TextBox5
Value: =First(Fields!size.Value)

Sorry for the delay. The article at http://smithmier.com/blog/?p=38 has a picture of the results, but it really isn't required to understand the concept.

|||

Hi Larry,

Thanks for the post.

I will check it out.

Can we a use a CSS or equivalent for a reports(RDLC File)

Hi,

I will be using RDLC files to display reports in various pages.

My Question is this.

I need to use the same type of formatting of color,fonts,font sizes and the background colors so that the same can be used across the reports.

This is somewhat like using a CSS file for aspx pages.

Any ideas... , solution........, .......

Hi,

Just wondering!

We have CSS for the aspx and the HTML pages.

Are there no ways to set a golbal standard for the Reports( Ok, be it a Server report or a local report.). Is it not correct what I am asking.

|||I've been looking into this also, and I found some old threads stating that themes and css are not supported but that they may be in the next version.|||

Hello,

Formatting for reports can be expression based. Create your reports using a standard formula for similar items and pass in values through a dataset. Another option would be to take formatting information in as parameters. The RDL file is just an XML file, you could modify it directly if you want. Here is a link to information on programmatically generating RDLs: http://technet.microsoft.com/en-us/library/ms154583.aspx. RDLs and RDLCs are very similar, and the same techniques could be used.

Good luck,

Larry

|||I need a clarification.

How do I assign a class in the css to a text box.

Say I have a class .txtboxTahomaBold in the CSS, how do I assign the class to the textbox. I do not find any property for the controls (textbox, table .... )|||

I am sorry to have misslead you. You do not get to assign CSS to the textboxes, but you can assign the regular SSRS formatting to each text box on a report prior to displaying it. The easiest way would be to create formulas within the report based on data that you provide through a dataset. For example, set the Font formula to =FieldsTextBoxTahomaBold.Value and have the dataset pass in the string "Normal, Tahoma, 11pt, Bold". Of course, you could also modify the XML, but that is more trouble than it is worth.

I will try and get an example written up on my blog. I will post a link here when I do.

Larry

|||

Thanks.

Waiting for your reply.

|||

Formatting your report based on the user or the data is relatively straight forward once you get the trick. To demonstrate, create a report with a valid connection to an instance of Microsoft SQL Server and use the following SQL as your query:

Code Snippet

SELECT
CASE @.param
WHEN 0 THEN 'Blue'
WHEN 1 THEN 'Red'
END AS color,
CASE @.param
WHEN 0 THEN '12pt'
WHEN 1 THEN '24pt'
END AS size

and create five text boxes with the following attributes:
TextBox1
Value: Color
Color: =First(Fields!color.Value)

TextBox2
Value: Size
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox3
Value: Both
Color: =First(Fields!color.Value)
Font: Normal, Arial, =First(Fields!size.Value), Normal

TextBox4
Value: =First(Fields!color.Value)

TextBox5
Value: =First(Fields!size.Value)

Sorry for the delay. The article at http://smithmier.com/blog/?p=38 has a picture of the results, but it really isn't required to understand the concept.

|||

Hi Larry,

Thanks for the post.

I will check it out.

Sunday, March 11, 2012

Can SSIS parse this text report without a lot of programming?

I've got some machines that output text files after each shot of parts. I'd like to take the data in those files and parse it and insert it into a SQL Server database for future massaging. The text files look like the example I've posted below. Can SSIS parse out the set points and actual values even though the file isn't CSV or tab delimited and the data is kind of 'strewn' all over the report? Each report does have the exact same format so the report format doesn't change from report to report, just the data. Thanks in advance.

Ernie

WP4.57 C Y C L E P R O T O C O L

Order data 18.05.06 11:27:57

Order number : 2006 Recipe no. : 15761

Machine number : 7 Recipe name : Stabilizer Bar Innsulator

Machine Operator: 1257 Art.descrip.: Stabilizer Bar Grommet

Shot Volume : 285.8

Part quantity : 100096 Type of mat.: M370-34

Shot quantity : 782 Batch number: 20124-125

-

Temperatures in ?C

Set Act Set Act

Fixed heat.platen right 182 182 Tempering screw 83 83

middle 180 180 Tempering inject.cylinder 85 85

left 182 182 Tempering circuit 3 90 91

Tempering circuit 4 0 39

Movab.heat.platen right 182 182 Tempering circuit 5 0 39

middle 180 180

left 182 182 Mould temperature 1 0 39

Mould temperature 2 0 39

Third heat.platen right 0 39 Mould temperature 3 0 39

middle 0 39 Mould temperature 4 0 39

left 0 39 Mould temperature 5 0 39

Mould heating circuit 6 0 39 Compound temp.after screw 104 104

Mould heating circuit 7 0 39 Compound temp.after nozzle 0 39

Mould heating circuit 8 0 39

Mould heating circuit 9 0 39

Mould heating circuit 10 0 39

Times in sec

Injection time 51.20 Transfer time 1 2.00

Internal mould press.time 0.00 Transfer time 2 2.00

Dwell pressure time 7.00 Transfer time 3 2.00

Controlled cure time 180.00 Transfer time 4 2.00

Calculated cure time 0.00 Transfer time 5 2.00

last cycle time 276

last opening time 25

Measure when injecting Measure at injection end

max. injection speed mm/s 11.9 Injection length mm 2.0

Injection energy kNm 247.2 Injection time sec 51.20

max. int.mould pres. bar 2 Hydraulic pressure bar 190

max. dwell pressure bar 192 Internal mould pressure bar 0

Pad mm 0.4

Stock Temperatures and Pressures During Metering

Stock Temperatures(C) Set Actual Metering Pressures(bar) Set Actual

Temperature 1st Step 105 106 Pressure 1st Step 135 131

Temperature 2nd Step 105 106 Pressure 2nd Step 135 129

Temperature 3rd Step 105 105 Pressure 3rd Step 135 122

Temperature 4th Step 105 106 Pressure 4th Step 135 135

Temperature 5th Step 105 109 Pressure 5th Step 135 137

Protocol Complete

Yes absolutely, SSIS can do this. Import it as a single, very wide, column and parse out the various sections in the pipeline. Given the complexity you're probably going to have to do this in an aysnchronous script component.

-Jamie

Can SRS 2000 rdl files be published to and run on sql server 2005?

We're planning on upgrading from sql server 2000 to 2005 and we're hoping
that SRS 2000 .rdl files will run on sql server 2005.
Can anyone confirm if this is the case or not.
Thanks in advance for your help.Yes. However, when I upgraded I had some small weird problems. I then opened
up the rdl files with the RS 2005 designer, converted to RS 2005 and
re-deployed and the problems went away. Nothing major and we were able to
function but obnoxious. I can't tell you exactly what would occur, its been
awhile since I upgraded.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Sherman In Denver" <sherman@.newsgroup.nospam> wrote in message
news:3524E97D-9C2A-4D56-8A7E-2FE28E427A3B@.microsoft.com...
> We're planning on upgrading from sql server 2000 to 2005 and we're hoping
> that SRS 2000 .rdl files will run on sql server 2005.
> Can anyone confirm if this is the case or not.
> Thanks in advance for your help.
>|||Hello Sherman,
I agree with Bruce. There are some changes in the RDL file format between
RS2000 and RS2005, I would suggest you open the SSRS 2000 RDL file in SQL
2005 BI Studio's report designer, it will help convert your RDL to RS 2005
format.
Also, if you still want to use RS2000 reports on SQL Server 2000 later, I
suggest you make an backup for the RS 2000 RDL files.
In addition, you can search for some former threads discussing on RS
2000--> RS 2005 report converting if you meet any particular converting
issues.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello,
How are you doing on this issue. Does Bruce and Steven's reply and
suggestion helps you some? If there is still anything we can help, please
feel free to post in the newsgroup.
Thank you for using our MSDN Managed Newsgroup Support Service!
Sincerely,
Luke Zhang
Microsoft Online Community Support
This posting is provided "AS IS" with no warranties, and confers no rights.

Tuesday, February 14, 2012

Can one input script file invoke another script file?

Say I have 2 files:
do_me_first.sql
do_me_second.sql
And I issue:
> sqlcmd -S localhost -i do_me_first.sql
What syntax would put in do_me_first.sql so that it would execute
do_me_second.sql without any further sqlcmd invocations?
In Oracle with Sql*Plus, I would use an "at sign" like this in
do_me_first.sql :
@.do_me_second.sql
I'm still getting used to Microsoft documentation, and I cannot for
the life of me find a reference to such syntax.Hi,
You could try xp_cmdshell.
--
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
"cleveridea" <cleveridea.net@.gmail.com> wrote in message
news:1189639150.068229.71660@.r29g2000hsg.googlegroups.com...
> Say I have 2 files:
> do_me_first.sql
> do_me_second.sql
> And I issue:
>> sqlcmd -S localhost -i do_me_first.sql
> What syntax would put in do_me_first.sql so that it would execute
> do_me_second.sql without any further sqlcmd invocations?
> In Oracle with Sql*Plus, I would use an "at sign" like this in
> do_me_first.sql :
> @.do_me_second.sql
> I'm still getting used to Microsoft documentation, and I cannot for
> the life of me find a reference to such syntax.
>|||Hi,
You could also use a batch/command file to call sqlcmd twice. (If you're a
UNIX person, batch/command files are like shell scripts).
--
Thank you,
Daniel Jameson
SQL Server DBA
Children's Oncology Group
www.childrensoncologygroup.org
"cleveridea" <cleveridea.net@.gmail.com> wrote in message
news:1189639150.068229.71660@.r29g2000hsg.googlegroups.com...
> Say I have 2 files:
> do_me_first.sql
> do_me_second.sql
> And I issue:
>> sqlcmd -S localhost -i do_me_first.sql
> What syntax would put in do_me_first.sql so that it would execute
> do_me_second.sql without any further sqlcmd invocations?
> In Oracle with Sql*Plus, I would use an "at sign" like this in
> do_me_first.sql :
> @.do_me_second.sql
> I'm still getting used to Microsoft documentation, and I cannot for
> the life of me find a reference to such syntax.
>|||On Sep 12, 7:07 pm, "Daniel Jameson" <danja...@.newsgroup.nospam>
wrote:
> Hi,
> You could also use a batch/command file to call sqlcmd twice. (If you're a
> UNIX person, batch/command files are like shell scripts).
Thanks Daniel, I'm well aware of using multiple sqlcmd statements
wrapped in a batch file. However, I'm looking very specifically to
implement a simple approach where the person executing the deployment
script has an ultra-simple single invocation of a single sqlcmd
against a single infile sql script and I get the convenience and best
practice of dividing and conquering with my scripting files rather
than having one giant sql script file.|||> Say I have 2 files:
> do_me_first.sql
> do_me_second.sql
> And I issue:
>> sqlcmd -S localhost -i do_me_first.sql
> What syntax would put in do_me_first.sql so that it would execute
> do_me_second.sql without any further sqlcmd invocations?
Try:
:r do_me_first.sql
:r do_me_second.sql
You'll need to include a GO batch terminator after the :r file include if
you want to run the script immediately, unless the script is already
terminated with a GO. See the SQLCMD commands topic in the Books Online for
more information.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"cleveridea" <cleveridea.net@.gmail.com> wrote in message
news:1189639150.068229.71660@.r29g2000hsg.googlegroups.com...
> Say I have 2 files:
> do_me_first.sql
> do_me_second.sql
> And I issue:
>> sqlcmd -S localhost -i do_me_first.sql
> What syntax would put in do_me_first.sql so that it would execute
> do_me_second.sql without any further sqlcmd invocations?
> In Oracle with Sql*Plus, I would use an "at sign" like this in
> do_me_first.sql :
> @.do_me_second.sql
> I'm still getting used to Microsoft documentation, and I cannot for
> the life of me find a reference to such syntax.
>|||On Sep 12, 9:50 pm, "Dan Guzman" <guzma...@.nospam-
online.sbcglobal.net> wrote:
> > Say I have 2 files:
> > do_me_first.sql
> > do_me_second.sql
> > And I issue:
> >> sqlcmd -S localhost -i do_me_first.sql
> > What syntax would put in do_me_first.sql so that it would execute
> > do_me_second.sql without any further sqlcmd invocations?
> Try:
> :r do_me_first.sql
> :r do_me_second.sql
> You'll need to include a GO batch terminator after the :r file include if
> you want to run the script immediately, unless the script is already
> terminated with a GO. See the SQLCMD commands topic in the Books Online for
> more information.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "cleveridea" <cleveridea...@.gmail.com> wrote in message
> news:1189639150.068229.71660@.r29g2000hsg.googlegroups.com...
> > Say I have 2 files:
> > do_me_first.sql
> > do_me_second.sql
> > And I issue:
> >> sqlcmd -S localhost -i do_me_first.sql
> > What syntax would put in do_me_first.sql so that it would execute
> > do_me_second.sql without any further sqlcmd invocations?
> > In Oracle with Sql*Plus, I would use an "at sign" like this in
> > do_me_first.sql :
> > @.do_me_second.sql
> > I'm still getting used to Microsoft documentation, and I cannot for
> > the life of me find a reference to such syntax.
This is PERFECT. Thank you so much. After 10 years with Oracle and 5
each with MySQL and PostgreSQL it is remarkable how feeble I feel
doing the simplest thing with scripting particulars of SQL Server.
I've got the Books Online link in my favorites for future problems.

Can one confirm this behaviour ?

Say i have a database restored with its data files on say D and E.
When I do a restore again with EM and this time specify the data file paths
to be M and N but at the same time check on the box that states " Force
Restore over existing database", does the database actually try restoring to
the previous D and E and ignore the M and N paths that i specified . Using
SQL 2000
Thanks
Specifying the path will make EM add MOVE options to the RESTORE command. In this case, SQL Server
will not try to access the original path, as specified in the backup header. "Force restore" is only
needed if the database name that you try to restore to already exists and doesn't have the same file
layout as the one you are trying to restore (REPLACE option to the RESTORE command).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:uutzcrqAFHA.936@.TK2MSFTNGP12.phx.gbl...
> Say i have a database restored with its data files on say D and E.
> When I do a restore again with EM and this time specify the data file paths
> to be M and N but at the same time check on the box that states " Force
> Restore over existing database", does the database actually try restoring to
> the previous D and E and ignore the M and N paths that i specified . Using
> SQL 2000
> Thanks
>

Can one confirm this behaviour ?

Say i have a database restored with its data files on say D and E.
When I do a restore again with EM and this time specify the data file paths
to be M and N but at the same time check on the box that states " Force
Restore over existing database", does the database actually try restoring to
the previous D and E and ignore the M and N paths that i specified . Using
SQL 2000
ThanksSpecifying the path will make EM add MOVE options to the RESTORE command. In
this case, SQL Server
will not try to access the original path, as specified in the backup header.
"Force restore" is only
needed if the database name that you try to restore to already exists and do
esn't have the same file
layout as the one you are trying to restore (REPLACE option to the RESTORE c
ommand).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:uutzcrqAFHA.936@.TK2MSFTNGP12.phx.gbl.
.
> Say i have a database restored with its data files on say D and E.
> When I do a restore again with EM and this time specify the data file path
s
> to be M and N but at the same time check on the box that states " Force
> Restore over existing database", does the database actually try restoring
to
> the previous D and E and ignore the M and N paths that i specified . Using
> SQL 2000
> Thanks
>

Can one confirm this behaviour ?

Say i have a database restored with its data files on say D and E.
When I do a restore again with EM and this time specify the data file paths
to be M and N but at the same time check on the box that states " Force
Restore over existing database", does the database actually try restoring to
the previous D and E and ignore the M and N paths that i specified . Using
SQL 2000
ThanksSpecifying the path will make EM add MOVE options to the RESTORE command. In this case, SQL Server
will not try to access the original path, as specified in the backup header. "Force restore" is only
needed if the database name that you try to restore to already exists and doesn't have the same file
layout as the one you are trying to restore (REPLACE option to the RESTORE command).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Hassan" <fatima_ja@.hotmail.com> wrote in message news:uutzcrqAFHA.936@.TK2MSFTNGP12.phx.gbl...
> Say i have a database restored with its data files on say D and E.
> When I do a restore again with EM and this time specify the data file paths
> to be M and N but at the same time check on the box that states " Force
> Restore over existing database", does the database actually try restoring to
> the previous D and E and ignore the M and N paths that i specified . Using
> SQL 2000
> Thanks
>

Can not uncompress files during setup of beta 3 or sql2005eval

I have had problems during the beta 3 or sql2005eval edition self extracting setups. It gets to the evaluating configuration then gives the error "not enough drive space on C:\ to extract files". I have a 1.8 ghz processor with 512mbs of RAM and 44.3 gbs of hard drive space. I have no problems installing any of the versions at work. I have tried a couple of different suggested fixes and they did not work. Any help would be greatly appreciated!Try this advice from a former SQL Setup tester:
http://blogs.msdn.com/nikop/archive/2005/03.aspx