Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

Copying files from one folder to another folder by given modified date

$
0
0

Hi all ,

I am having one requirement to create a script task using c# which copy file from one folder to another folder.

Suppose in source folder 1000 of files are there with multiple modified date . There are txt, csv, xml  and xls files in source folder.

I have to create one script task where i have to use two variable one for file pattern and another for Modified date .

so if I pass .txt file pattern and modified date is 01-01-2017 , then all the txt file of given date should move to target folder from source folder.

Thanks in Advance


Thankx & regards, Vipin jha MCP


Export non-string to Excel how to set the data type

$
0
0

How do I ensure data written to Excel is written as a Date (Integer, or Float)?

I have data coming from Excel that is of type DbDateTime, Int, Float, etc. My Excel template that I am writing to has the corresponding columns set to the matching datatype (ie. Column 3 is type Date, Column 5 is two decimal Number). However, whenever data is written to Excel, upon opening Excel all the fields have been reset to ‘General’. This impacts not only how the data is displayed, but the search/filter options as well.

I also don’t understand why despite setting the Column data type, when I view the Mapping of the Excel Destination Editor it always shows the Destination Columns type as WSTR. It’s like it does not care how Excel is formatted, it’s just going to write everything as a string.

So far the only work around we’ve discovered is to utilize a very cumbersome COM library to ensure the data is written and formatted properly. But it seems like writing a Date to Excel as an actual Date should not require so much effort (script component, using COM library, and all the associated code).

(Note- Per customer requirement this must be an Excel document. It is a daily file generated. Manually setting the column type daily is not an option.)


How can I use Row Count SSIS task by using filters?

$
0
0

Hi there, according this pic you get the total number of rows. so far so good. how can we get a partial row count based on criteria?

select count(*) from <table> where legalentity = 'A1' 

select count(*) from <table> where legalentity = 'B1' 

thanks for your help,

SSIS 2012 to Sharepoint 2010 file upload with CosyROC Script Task Plus

$
0
0

Hi,

I am attempting to load files to Sharepoint 2010 with SSIS 2012 and have linked HttpUploadDownloadTask.2012.stx11 from http://www.cozyroc.com/script/http-upload-download-task into a Script Task Plus.The HttpUploadDownloadTask.2012.stx11 provides the following parameters -

Username – user name credential (optional).
Password – password credential (optional).
ProxyUrl – HTTP proxy URL (optional).
IgnoreServerCertificate – enable or disable server certificate validation.
Timeout
Action – task action (upload or download).
RemoteUrl – remote file location.
SourceFile – upload from source file. (TargetFile – download to target file.)
Method – method used to upload file. If not specified default is POST.
Headers – additional web request headers (optional). Syntax is [name]=[value]. Multiple headers are separated with newline.

RequirementUpload file roy.txt into Sharepoint as a new file and ultimately will upload multiple daily/dated Excel reporting files from SSIS

Settings/Results - I have a local file roy.txt and listed below what settings i've applied when attempting to upload the file roy.txt and the results i have.

Settings 1 - Result - No file uploaded - Upload file roy.txt to AllItems with default POST method

Username - roy
Password - royspassword
IgnoreServerCertificate - False
Timeout - 100
Action - Upload File
RemoteUrl - http://sharepoint/testing/ROY%20test%20SSIS/Process/Forms/AllItems.aspx 
SourceFile - roy.txt
Method -
Headers -

Setting 2 - Result - Replaced page http://sharepoint/testing/ROY%20test%20SSIS/Process/Forms/AllItems.aspx with roy.txt using PUT method

Username - roy
Password - royspassword
IgnoreServerCertificate - False
Timeout - 100
Action - Upload File
RemoteUrl - http://sharepoint/testing/ROY%20test%20SSIS/Process/Forms/AllItems.aspx 
SourceFile - roy.txt
Method - PUT
Headers -

I can manually upload a file fine but wondering if i shoudl use a different RemoteURL and / or Method to get the desired results. Does anyone have any experience or advice in using HttpUploadDownloadTask and/or Sharepoint URL settings to programmatically upload file successfully in this way?

Thanks

Roy

column delimiter for column was not found

$
0
0

Hi,

My flatfile is {LF} delimited file. when I am running my package its running upto some fields after that it was throwing an error as column delimiter for "aupdatedDate" was not found.

Please help on it.

Thanks

AVS


Need to clean staing data as currently the csv supplied data dump has lot of unwanted characters ; ) (

$
0
0

I have a table where in I m loading whatever is supplied to me in staging table

The staging table 

create table stg

(

ID INT IDENTITY(1,1),

NAME VARCHAR(50),

Commaseparated varchar(1000)

)

insert into stg (name,Commaseparated ) values( 'John','

test record one (record1; no HR),test record 2 and test record3 (record3 ; no HR)')

I would like to clean the comma separated column and would like to retain comma only.

Need to clean staging data as currently the csv supplied data dump has lot of unwanted characters ; ) (




How to remove unwanted characters apart from comma from a comma separated table column in SQL server 2014

$
0
0

I have a table where in I m loading whatever is supplied to me in staging table

The staging table 

create table stg

(

ID INT IDENTITY(1,1),

NAME VARCHAR(50),

Commaseparated varchar(1000)

)

insert into stg (name,Commaseparated ) values( 'John','

test record one (record1; no HR),test record 2 and test record3 (record3 ; no HR)')

I would like to clean the comma separated column and would like to retain comma only.

Need to clean staging data as currently the csv supplied data dump has lot of unwanted characters ; ) (

How to remove unwanted characters apart from comma from a comma separated table column in SQL server 2014?

I m looking for the best possible solution.




Job fails with an error 'A dynamic link library (DLL) initialization routine failed.'

$
0
0

Hi,

We have an SSIS package deployed onto production environment--- a 64 bit server A, which will grab some Tedadata data from Server B, and server A got Teradata OLE DB provider version 12.0 installed, we created a job on Server A and run it, we got the following error:

Error: 2009-02-04 13:42:35.99

   Code: 0xC0202009

   Source: ARSR Connection manager "GDW"

   Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x8007045A.

An OLE DB record is available.  Source: "Microsoft OLE DB Service Components"  Hresult: 0x8007045A  Description: "A dynamic link library (DLL) initialization routine failed.".

End Error

 

ARSR is the SSIS package name, 'GDW' is the connection manager connecting to Teradata.

 

Actually we tested SSIS package(created a job and run it, which runs the SSIS package) in our assurance testing environment(a 64 bit server A1 and a server B1), it works fine.

 

We compared these 2 environment, both got same version of Teradata OLE DB provider driver installed, we can't figure it out why we get the above error.

 

Can somebody please help?

 

Thanks,

Morgan


Steps for upgrading SSIS from 2008 to 2016

$
0
0

Dear All,

We are working on a Up-gradation Project, which involves upgrading the existing SQL 2000/2005 DTS packages to 2016 SSIS Packages.

Approach that we are following

1.  Migrate the Existing SQL 2000/2005 DTS packages to SSIS 2008 and then Upgrade from SSIS 2008 TO SSIS 2016.

Could you please let us know if our approach is correct? Or do we need to do another intermediate Migration to 2012 Or 2014?

Please let us know?

TIA.

SQL 2012 temp table in sp_cdc_ddl_event_internal causes SSIS OLEDB Source to error

$
0
0

Hi,

I have received the same error after enabling CDC on a table in our database that was experienced by user "brent.souza" back in February 2013. The bug logged back then (https://connect.microsoft.com/SQLServer/feedback/details/780107/sql-2012-temp-table-in-sp-cdc-ddl-event-internal-causes-ssis-oledb-source-to-error) was closed as not reproducible. I was wondering if I could pick up the thread - I am able to provide a sample package that reproduces the error.

Thanks,

Basil

SSIS- 500 MB Flat File Transfer to PDW table

$
0
0

HI,

I am loading data from flat file (500 MB) to PDW table and all the rows are saved in to Flat file destination table in case of Flat File Source Error.

However when I load data from small file (16 rows) in same format it saves all data in to PDW Destination table which is correct.

Please advice me why my all rows data from flat file its moving to Flat file destination. At least first 16 rows should load to pdw destination table.

Thanks


script task's value for query isnt used in data flow

$
0
0

Hi. We run 2012 enterprise.  To get around the 4,000 limit on var expressions (yes even if I break it up into 3 vars and concat in an expression it doesn't work) I wrote a c# script whose 1 line of code u see below. 

The var Query has an initial value (set in variables view) that selects 1 row with a bunch of zeros. 

The dft that runs after the c# script is coded to use the value in the Query var but instead used the bogus 1 row selector query I used as an initial value.  What is wrong?  The target is read write.  The other 3 vars are read only.  c# is supposed to be immune from the 4000 character limit.

We use vs2008 which makes me think old BIDS restrictions may be in play anyway.

Dts.Variables["Query"].Value = Dts.Variables["Query1"].Value.ToString() + Dts.Variables["Query2"].Value.ToString() + Dts.Variables["Query3"].ToString(); 

 

Can not edit a "Script task" with error message

$
0
0

TITLE: Microsoft Visual Studio
------------------------------

I try to edit the vb.net script in script task that I developed and get this message.

Any idea what happen and how to fix this.

Cannot show Visual Studio 2008 Tools for Applications editor.

------------------------------
ADDITIONAL INFORMATION:

Failed to create project at location "C:\Documents and Settings\pchen\Local Settings\Temp\2\SSIS\78a8360ded6b4c719c8aae52ac7483bb"! (Microsoft.SqlServer.VSTAScriptingLib)

------------------------------

The given path's format is not supported. (mscorlib)

 

What is C:\Windows\SysWOW64\net.exe

$
0
0

I keep getting a pop up from Iobit asking for permission to let this program run, the license is expired and I not suer if this is really from MS...has anybody else came across this problem??

What is :

C:\Windows\SysWOW64\net.exe

Thank you for any help,

jinxxz

Who will be crowned the First SQL BI Guru of 2017!!

$
0
0

Time for a fresh start!

[The Guru is the means of realisation. "There is no knowledge without a teacher."]

We're looking for the first Gurus of 2017!!

All you have to do is add an article to TechNet Wiki from the field of your interest. Something that fits into one of the categories listed on the submissions page. Copy in your own blog post, a forum solution, a white paper, or just something you had to solve for your own day’s work today.

A snippet you share can make you a January 2017 TechNet Wiki Guru in your favorite category and this is official Microsoft TechNet recognition!

HOW TO WIN 

Please copy over your Microsoft technical solutions and revelations to TechNet Wiki.

Add a link to it on THIS WIKI COMPETITION PAGE (so we know you’ve contributed).

Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favorite technology will help us learn the active members in each community. 

Feel free to ask any questions below.

More about TechNet Guru Awards.


Thanks,

If my reply is helpful please mark as Answer or vote asHelpful.

My blog | Twitter | LinkedIn

This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.


ODBC password not saved in configuration file

$
0
0

Hi,

 

I have an SSIS package that pipes data from an iSeries data source to a SQL Server table. The connection manager I am using is the .Net Providers\Odbc Data Provider

 

When I run this SSIS package on my developer PC (from inside BIDS or using the Management Studio Execute Package Utility) it works. However when I run the package from within a SQL Server Agent Job it fails.

 

I have enabled logging and the error message given is:

System.Data.Odbc.OdbcException: ERROR [28000] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=8002 - CWBSY0002 - Password for user MALLPRESS on server SMICHC is not correct, Password length = 0, Prompt Mode = Never, System IP Address = 172.16.0.4  ERROR [28000] [IBM][iSeries Access ODBC Driver]Communication link failure. comm rc=8002 - CWBSY0002 - Password for user MALLPRESS on server SMICHC is not correct, Password length = 0, Prompt Mode = Never, System IP Address = 172.16.0.4

It gives the message “Password length = 0” despite the fact that I have specified a password in the package.

 

To try to get around this I have added an XML configuration file to the SSIS package. In this configuration file I’ve set values for the ConnectionString, UserName, and Password.

I still get the above error about a password length of 0.

 

I have also tried to execute the package using dtexec, but this gives a similar error.

The SQL used to run this is:

xp_cmdshell'dtexec /sq "\SCSRV-06\DTS Packages\Staging\StagingBranchImport"'

 

This has got me stumped, and I’m not sure where to go from here as these packages need to be programmatically run each morning. At the moment I am manually running them from within BIDS.

All packages that don’t use an iSeries connection manager run successfully in SQL Agent jobs.

I have also tried using the OLEDB connection manager (ibm db2 udb for iseries ibmda400 ole db provider) without success.

 

Any help would be very appreciated.

 

Thanks, Matt

Help with Parameters in SSIS

$
0
0

Hi Experts,

Working on my first project which involve working with Parameters. I am using Package level parameters and i would like to link them to the SQL Server table , in the same way as we used to to have SQL Server configuration.

You guys posting a URL is also fine with me.

Thanks.

Format Money in SSIS Excel Destination

$
0
0
Hi,

I am trying to output money data type into excel destination. The zero are leading zeros (or) zero after the decimal always getting truncated.

For example, 174.00 as 174, 0.00 as 0. I always want to format the value with two decimal places.

Is anyone encountered similar issues. I also used the derived transformation and tried to fix this issue. But was unlucky.

https://www.experts-exchange.com/questions/26525587/SSIS-2005-A-decimal-12-2-column-is-being-exported-to-text-with-00-instead-of-0-00.html

Any suggestions??

Regards,
kccrga

-kccrga http://dbatrend.blogspot.com.au/



SSIS 2012 Data Flow Task - Fail If there's blank rows on the bottom of the file

$
0
0

Hi Everyone,

We're currently upgrading our packages from 2005 to 2012 and we noticed that in SSIS 2012, if there's extra spaces on the bottom of the file. It will fail the task whereas, in 2005 it will ignore it and finish successfully.

Is there a way in SSIS 2012 to ignore those spaces without adding a task? We're trying to minimize the changes as we have a lot of packages to be upgraded.

I know we can just remove the spaces but we can't control the file once we receive it. Also, why can't SSIS 2012 ignore those space like in 2005 did?  

Error Message: An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description: "Invalid character value for cast specification".

Thanks in advance!



SQL Server 2016 Developer - SSIS Error During Installation

$
0
0

I am trying to install Integration Services on my SQL 2016 Developer instance. I have successfully installed the Database Engine, Reporting Services, and Analysis Services but I get the following when I try to SSIS:

VS Shell Installation has failed with exit code of 1638.

My setup is a Windows 10 Enterprise (64-bit) OS, Visual Studio 2013 Premium, and SQL Server 2016 Developer (64-bit) and Management Studio 2016.

The Error details shows me:

Action required:
Use the following information to resolve the error, and then try the setup process again.
Feature failure reason:
An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Error details:
§ Error installing Microsoft Visual C++ 2015 Redistributable
VS Shell installation has failed with exit code 1638.
Error code: 1638
Log file: C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\20170125_211938\VCRuntime140_x64_Cpu64_1.log
Visit http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=13.0.4001.0&EvtType=VCRuntime140_x64%40Install%400x1638 to get help on troubleshooting.
When I look at the log file, this in particular stands out:

[131C:2708][2017-01-25T21:23:51]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

But I do not what product this is referring to. Could anyone help me resolve this issue?


Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>