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

Question on passing Username and Password to my script task when downloading a file from a website.

$
0
0

Hi,

I am using a Script task and http Connection manager to get a zipfile from some websites.

My code is working fine for the sites which doesn't need username and password to be passed.

Can you help me modify my code so that I can pass username and password also.

FYI..

Below is the code I am using.

I am using the DownloadURL in the ReadOnlyVariables to pass my URL.

I also have my Username and Password Variables created.

        public void Main()

        {

            // TODO: Add your code here

            bool fireAgain = true;

            Dts.Events.FireInformation(0, "Download File""Start downloading " + Dts.Variables["DownloadURL"].Value.ToString(), string.Empty, 0,ref fireAgain);

 

            // Create a webclient to download a file

            WebClient mySSISWebClient = new WebClient();

 

            //Download file and use the Flat File Connectionstring

            // to save the file (and replace the existing file)

            mySSISWebClient.DownloadFile(Dts.Variables["DownloadURL"].Value.ToString(), Dts.Connections["myProductFile"].ConnectionString);

 

            // Logging end of download

            Dts.Events.FireInformation(0, "Download File""Finished downloading " + Dts.Connections["myProductFile"].ConnectionString, string.Empty, 0, ref fireAgain);

 

            // Quit Script Task succesful

            Dts.TaskResult = (int)ScriptResults.Success;

            //Dts.TaskResult = (int)ScriptResults.Success;

            mySSISWebClient.DownloadFile

        }


Connections to Oracle - How to determine which Oracle client is used by SSDT and SSIS

$
0
0

I have connection to Oracle from SSDT and SSIS on 1 desktop that is failing when tested with error  "ORA-06413:  Connection not open"

There are multi Oracle clients on this desktop, 32 bit, 64 bit, and 12c. We can TNSping successfully and tnsnames.ora is good.  How do I know which Oracle client is being select by SSDT for SSIS and failing?  Can I control which Oracle client is used? 32bit, 64bit, 12c, or older?  

I have other desktops with no issues and a similar setup.


Tony C

Oracle Connection - Save with Password but use the variable value from xml file

$
0
0

Good day,

I have Oledb oracle connection with allow saving password not checked, i have delayvaildation=true

the connection works when i insert password and test connection and worked when i developed the package but no on server we reading the login,server & password from a config.xml file and the correct values are passed but it fails on connection.

The connection is made dynamic due to i have a loop so different oracle servers are connected to at runtime

I tried the EncryptSensitiveWithPassword but cant use this as the password/connection changes per different folder in foreach loop. tried DontSaveSensitive aslo not winning as i can see the correct value passed to connection string

Please Help

sql agent run as

$
0
0
I have an ssis script that is executed from a sql agent job.  But it fails on a step that connects to another server.  If I manually execute the ssis script from visual studio it runs fine.  But when I run it from the sql agent job it fails.  Since my user id has rights on both servers, I thought that I should at least try to run the sql agent job under my user id.  But the only run as option I have in the sql agent job is 'sql server agent service account'.  I would appreciate any advise on how to get this working

how to delete the records from the target table if it is not exists in the source

$
0
0

 HI,

i have a table in my database called "Sample",to load the data into this table i am using the source as excel file .

today i have a updated source excel file and at first i wanted to delete the records which are exists in my destination table "Sample" and which are not exists in my excel source file.

could any one please explain me the flow of this requirement in detail.

Regards,

Transaction not working!

$
0
0

Hello,

I am trying to implement begin-commit transaction in an ssis package so that if the package fails, the transaction rolls back. However, I stumbled upon this link (https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c2216cd5-fcbb-4d07-b360-593ff44c3cf3/data-flow-tasks-deadlocking-each-other?forum=sqlintegrationservices) but after implementing it on my package, the package runs but no data gets inserted. What I am doing it:

  1. Get max date from stage
  2. Get max date from source
  3. Sequence Container: runs multiple Data Flow tasks, which each have a couple of tables that replicate date from source to (DF1, DF2 DF3 to ) stage and (DF4, DF5, DF6 to) dest databases. 
  4. The "insert" DF task has to be inserted after all the DF task in the Sequence Container are done. 
  5. The "insert date to stage" gets date from source to stage so that when the package runs again, it has a new max date to start from.
  6. After all successfully complete, I want the transactions to be committed but nothing happens when I execute the package. It is successful but no data gets inserted. 

However, the package runs successfully without the begin/commit transactions.

The DF Tasks have a couple of OLE DB Sources & Destinations to copy data:

Any advice/comment where I am doing it wrong? 

Thanks


IN~



Master package does not fail when child package fails

$
0
0

Hi all,

I created a master/child set up in SSIS using the "Execute Package task" that is called within a ForEach loop. The problem is that when the executed child fails, the task turns green and the next package is called.

This is the configuration I used:

  • The child task that fails has "FailPackageOnFailure" set to True, so that the whole child package fails;
  • The child package has "FailParentOnFailure" set to True, so that the error would be escalated to the master package;
  • The "Execute package" task in the master package has "FailPackageOnFailure" set to True

But this doesn't seem to work. I've played around with various configurations using "FailPackageOnFailure" and "FailParentOnFailure" on all different levels (child task, child package, master task, master package) but no luck so far.

On all levels, the MaximumErrorCount is set to 1, so that should be OK.

I'm using SQL Server 2008 R2.

Am I forgetting something here? Any help is greatly appreciated!

Cheers,
Kristof 

Unable to import first column from Excel

$
0
0


Hello, I am using an excel source file which I download from the internet using a script task and the first column doesn't appear in the available input columns, but opening the downloaded file and saving it solves the problem, but the next time the script download's the new file the problem appears again.


Thanks in advance!

db connection

$
0
0
I have created a local windows user with admin rights and added that user as a login for sql server.  When I try to connect to the server using sql server management studio via sql server authentication, I get a login failed error.  I have copy/pasted the password and used both the user or domain\user format for the login and it still fails.  Thank you for any help you can provide

SSIS 2012 in Visual Studio throws error “insufficient memory”

$
0
0

Hi,

When I try to run any SSIS 2012 packages in Visual Studio, it throws the error shown below; all the packages were running fine before, but none is running now:

Insufficient memory to continue the execution of the program. (Microsoft Visual Studio)

Program Location:

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at Microsoft.DataWarehouse.VsIntegration.Interop.NativeMethods.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
at Microsoft.DataWarehouse.VsIntegration.Shell.DataWarehouseOutputWindowFactory.CreateOutputWindow(Guid windowGuid, String windowCaption)
at Microsoft.DataWarehouse.VsIntegration.Shell.DataWarehouseOutputWindowFactory.GetStandardOutputWindow(StandardOutputWindow standardOutputWindow)
at Microsoft.DataTransformationServices.Project.DtsPackagesFolderProjectFeature.ExecuteTaskOrPackage(ProjectItem prjItem, String taskPath)

Can someone help?

derived column from string(csv) to int(sql)

$
0
0

 My csv has empty values at times for a a field and I would like to default that to a '1' if empty. The sql field is defined
as int. I have tried multiple examples but syntax error.

 Thanks.

ODBC destination Error - Hadoop

$
0
0
I am facing a strange issue in SSIS. 
 
I am using ODBC destination to load the data from SQL Server into Hadoop table. My package is failing at the ODBC Destination with the error pasted below. But, when I check the table in Hadoop, the data is loaded successfully. Any idea what is the issue here?
 
Error: 0x384 at DFT Insert into Hadoop Table, ODBC Destination [2]: Open Database Connectivity (ODBC) error occurred. SQLExecute returned error while inserting row 1
Error: 0xC0047022 at DFT Insert into Hadoop Table, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "ODBC Destination" (2) failed with error code 0x80004005 while processing input "ODBC Destination Input" (13). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

SSIS vs Linked Server Vs Replication For Data Warehousing

$
0
0

Dear All,

Please help me.

SSIS vs Linked Server Vs Replication For Data Warehousing.Which option is best? I need best performance...

SSIS How to deploy SSIS package?

$
0
0
I want to deploy SSIS package without using visual studio?

Excel import - Error code: 0x80004005

$
0
0

We import data from an Excel (2010) file and it works on SSIS 2012 version.

Recently we upgraded to SSIS 2016 versions and we are getting following error:

SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available.  Source: "Microsoft Access Database Engine"  Hresult: 0x80004005  Description: "External table is not in the expected format.".

We tried to import a very simple Excel file and it works but this file in particular does not work.

The import of the same file is still working fine on the old server. And we made sure that we install 2010 32 bits drivers on the new server.

I would appreciate any help. Thank you in advance.


Error when loading the CSV to database. The Column Delimiter was not found.

$
0
0

Hi,

I have an SSIS Package where I download a file from a website, unzip the file and then load the CSV to my database.

I am able to get the file downloaded, unzipped and when I am trying to load the csv to my table, it is failing.

But when I open the csv and just save it without making any change then the csv is loading to my table.( I just opened it and saved. Did not even touch anything in the file)

Can anyone please help me on this?

I am attaching all the pics step by step to understand in detail.

Error loading files from Azure Data Lake Store in SSIS

$
0
0

Hello!

I am using SSIS 2014 and I've installed Azure Feature Pack for Integration Services. After that I've been able to use Azure components there. (Version of Visual Studio is 2015 Update 3)

But when I try to load data from ADL (no matter where: to local folder on my PC or to SQL Server database) I get the error on Azure Data Lake Store Source component:

[Azure Data Lake Store Source [2]] Error: System.FormatException: Input string was not in a correct format.
   at System.Text.StringBuilder.FormatError()
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Microsoft.SqlServer.IntegrationService.AdlsComponents.PipelineComponentExt.PostError(String message, Object[] args)
   at Microsoft.SqlServer.IntegrationService.AdlsComponents.PipelineComponentSource.TransferToOutputBuffers(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper100 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer100[] buffers, IntPtr ppBufferWirePacket)

I tried loading different files format with different data, even with only one row and one column, but the error is always the same. 

Could you please help? Maybe I am missing something? 

Thank you!

Success is reported but fails to bring entire data set.

$
0
0

I have a simple Oracle OLEDB data source from a view that produces 4.4 million rows. When running this simple data flow taks the SSIS package reports success at 900k rows which do hit the target SQL Server table.

There are no parameters in this Data Flow task, it is basically from the VIEW in ORACLE to a SQL Server table with all system defautls.

If there were a space issue on the receiving end I would expect an error but the 900k rows are queryable as well as the source of 4.4 million rows.

This is not making any sense to anyone here.

Thanks in advance for any suggestions where to look for something in SSIS that could possibly limit rows.


Les Draper

Error during execution ssis package - ETL

$
0
0
Hi,

during the execution of my package ssis generated this error:

[OLE DB Destination [57]] Error: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E21.
An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80040E21  Description: "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. 
No work was done.".

[OLE DB Destination [57]] Error: There was an error with OLE DB Destination.Inputs[OLE DB Destination Input].Columns[F12] on OLE DB Destination.Inputs[OLE DB Destination Input]. The column status returned was: 
"The value violated the integrity constraints for the column.".

[OLE DB Destination [57]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  
The "OLE DB Destination.Inputs[OLE DB Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "OLE DB Destination.
Inputs[OLE DB Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component.  
There may be error messages posted before this with more information about the failure.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  
The ProcessInput method on component "OLE DB Destination" (57) failed with error code 0xC0209029 while processing input "OLE DB Destination Input" (70). 
The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  
There may be error messages posted before this with more information about the failure.

[Excel Source [2]] Error: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on Excel Source returned error code 0xC02020C4.  
The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  
There may be error messages posted before this with more information about the failure.

Thanks any help,
Iber Costa

how to find number of Fridays, sundays and saturdays between two given dates in ssis ?

$
0
0

How to find the number of Fridays, Sundays, and Saturdays between two given dates..?

I have a Weekly Pull  (FRI, SAT, SUN) to run every week deleting all 2018 and load all 2018 only Fri, sat, sun.


I have below query which can get only <g class="gr_ gr_27 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" data-gr-id="27" id="27">SAT</g> and sun.


declare @Start_date DateTime, @end_Date DateTime
select @Start_date  = '20120801', @end_Date  = '20120830'

; WITH Date_Result(DateofWeek) AS (
Select @Start_date  Fecha
UNION ALL
SELECT DATEADD(day, 1, date of a week) Dateofweek
FROM Date_Result 
WHERE DateofWeek < @end_date
)
select Dateofweek from Date_result where DATEPART(DW, Dateofweek)in (1,7)
OPTION (MaxRecursion 0);

I want to get Friday, Saturday, Sunday and use SQL Task Editor and pass the variables start and end date.  

Help...



Viewing all 24688 articles
Browse latest View live