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

How to change SSIS package or database table column to accept text values loading from excel spreadsheet that have been formatted to number

$
0
0

I am loading data from excel spreadsheet to SQL table using SSIS package. Excel spreadsheet column formatted to data type "Number" but column consists only texts ("Y" or "N"). This particular column data won't load to SQL table unless I have manually changed the spreadsheet data type to text. I am processing 50+ spreadsheets everyday so manually changing this column is not an easy thing. Can someone please help me how to get this worked by changing data type in stored procedure or table.

Many thanks & you help would be much appreciated.



Excel Source stopped working in SSIS

$
0
0

Hi all, since few days Excel Source in SSIS stopped working due to the following message

Could not retrieve the table information for the connection manager 'Excel Connection Manager'.
Failed to connect to the source using the connection manager 'Excel Connection Manager'


I troubleshooted for a long time and already tried several solutions found:

- set to false the Run64bitRuntime option for the project

- set the Excel version to 97-2003, 2007-2010, 2016 in Excel Connection Manager

- installed Microsoft Access Database Engine 2010 Redistributable

- installed Microsoft Access Database Engine 2016 Redistributable

- ran a repair of Office 2016 installation

- ran a repair of Microsoft Visual Studio 2017

I'm opening a new topic for this issue because none of the above attempts worked for me

The issue started about 5 or 6 days ago

I have no more ideas. Any suggestion will be appreciated

Thanks a lot


How to Eliminate ssis variable expression Max length

$
0
0
 

I have one package that package have 4 variables. Each variable length is 4 thousand characters. All 4 variables concatenating in one ssis variable expression. But   I am getting error. The expression like below .How to handle this situation in ssis?

5<sup>th</sup> variable= 1 variable+2 variable+3 variable+4 variable

Thanks

SSIS SQL Agent job - Error: for each sub folder : The get enumerator method of the for each enumerator

$
0
0

Hi.

I have a SSIS Package , which runs fine in Visual studio. The package uses a for each file loop and the variable points to a folder like this:

\\server\d$\foldername\subfolder\

When I deploy the package on SSMS, when I execute the package I get the following error:

Error 1: FLC - for each sub folder: Error: The GetEnumerator method of the ForEach enumerator has failed with error 0x80131509 "null" . This occurs when the for each enumerator cannot enumerate

Error 2: FLC - For each sub folder: Error The object in the variable "User: ProductFolderList" does not contain an enumerator.

Below is the code used:

string folder = Dts.Variables["User::varProcessingFolderLocation"].Value.ToString(); 

Dts.Variables["User::ProductFolderList"].Value = System.IO.Directory.GetDirectories(folder);   

Dts.TaskResult = (int)ScriptResults.Success; 

SSMS version is 2017, visual studio solution is built in 2016 and project configuration is VNext.

I have verified the permissions of the folder and the ID with which I am running it has full control.

How to fix this? Thanks

XML source to SQL Server

$
0
0

My souce is XML.  Target is SQL Server.  A field which is varchar has both numbers and characters gives this error.

[XML Source [1]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "component "XML Source" (1)" failed because error code 0x80131537 occurred, and the error row disposition on "output column "fieldname" (9120)" 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.

How to get rid of this error.

Thanks.

 

 

 


NSG12

XML Source Task in SSIS

$
0
0

I got a SSIS package from Production and Its having an XML Source Task. But When I double click on that task, I am getting an Error saying object reference not set to an object.

According to the analysis, that task should be having some custom component. But That task looks like XML Source Task if we see the symbol on the task.

If anyone having idea on this, please let me know.

Thanks in Advance.. :)

Rajesh S Hegde

For each loop container is not picking up the .csv source file

$
0
0

Hi Everone,

Good morning.

My package is having .csv file as a source and I kept OLEDB destination to load it.

Stored the .csv file in a shared folder and the exact path is given in Enumerator configuration of the foreach loop container.

When I execute my package, it is giving the warning as below:

It is saying that file is not there in the specified path and directory is empty. I am running the SSIS package from TFS.

I am sure that I have read and write access for the shared folder for my userID. Is there any access there to pick up this

file from path.

Please suggest..Thank you

Flat file (CSV) source format

$
0
0

I have a SSIS package loading a lot of CSV file, which first line is the column head. Some file are ordered differently. However, package still try to load the file use predefined column order (it seems it doesn't check the head of each file see if it matchs the predefined column order).

 

Any way to force the package the check each file's head? or I had to manually check it using VB.Net script?


SSIS OLE DB Source splits "FOR JSON" results into multiple record sets

$
0
0

My goal is to load JSON documents from a JSON query in SQL into MongoDB.

I've discovered that when I have more than 2000 characters in my JSON results, the OLE DB Source object in SSIS will split the results into 2 rows.  This results in 2 poorly formed JSON strings which then fail to insert into MongoDB.  I see the same thing happen in management studio, when the line of JSON results wraps, the results tab shows 2 rows affected rather than just 1.  Any ideas on how to fix this?  The data type is implicitly understood as DT_NTEXT in SSIS, which should theoretically support far more than 2000 characters.

Steps to reproduce:  Author a SQL query using "FOR JSON" with results that are larger than 2000 characters in a single document.  Note that in SQL Management studio, when there are fewer than 2000 characters, only one row is affected, when over 2000, 2 rows are affected.  Also note, that the results are truly a single JSON result with one root node - this is confirmed by copying and pasting the entire JSON results into a JSON validator.

Using the OLE DB Source object in SSIS, include the query for a JSON document that is larger than 2000 characters, using a data viewer, notice that there are 2 rows.

Expected Results; one row is affected.

The actual error message is as follows:

"[MongoDB Destination [11]] Error: System.IO.FileFormatException: End of file in JSON string. '"Limit_'.
   at CozyRoc.SqlServer.SSIS.MongoDbDestination.PostExecute()
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPostExecute(IDTSManagedComponentWrapper100 wrapper)"

where "Limit_" is the place in the JSON document where the document was split into 2 documents.

Ideas on how to fix?

could not retrieve the table information for the connection manager 'excel connection manager'

$
0
0

I am trying to Connect to a file as a data source and I have tried everything from changing my connection string, to downloading the 64 bit and the 32 bit drivers , and  setting the run the package as a 64 bit setting to true and false.  NONE of these work.  I am really frustrated.  Can someone please help?

 

JSON source component

$
0
0

Any knowledge of an SSIS source pipeline component which reads the JSON, a data interchage format. 

 

JSON looks pretty tempting for heavy data interchange (somewhat human read-able, name/value pairs + arrays, nesting, lighter weight than most xml serializiers), and if its gaining momentum, I should think a source component would follow on (most likely third party)

 

JSON

$
0
0

Hi,

Does anyone have any experience of interfacing with a JSON API from SSIS. In my case the API is via a URL and i need to pull the data somehow. I suspect I will need to do this via a script task, if anyone has an example and is willing to share it that would be great

 Regards

John

Using SSIS without previously locally installing SQL Server

$
0
0

Hello guys, 

I've already managed using SSIS without it being installed but with SQL Server being installed. I've done that by adding .dll files in my project, but if I try it without SQL Server being installed, it doesn't work. 

By getting an error that DTS.dll, that is on a path C:\Program Files\Microsoft SQL Server\140\DTS\Bin\DTS.dll, is missing. I've installed SQL Server and saved that .dlls that are needed for DTS to work (DTSMsg140.dll, Instapi140.dll, Msvcp120.dll, Msvcr120.dll odbs32.dll and some others), on the exact same path that they were, and then uninstalled the server, but I still get an error. 

Is it even possible to use SSIS without SQL server being locally installed, and if it is, how should I do it?

Thanks in advance!

Write and delete CSV files in SQL database

$
0
0

Hi !

I have a question about creating a job in SQL 2012 and I would like some help.

So I have a local folder on a PC which contains CSV files that are generated by another system via VBS script with unique names as follows ("id_yyyymmdd_hhmmss"):

"id_20190913_090000",

"id_20190913_094512",

"id_20190913_103205", ...

I need to create a scheduled SQL Server Agent job (e.g. every minute) that runs a package with a dataflow as follows: if there are CSV files in this local folder when the event occurs that is written to SQL database of each files in the correct order (oldest to newest file) and only after writing the data contained in the CSV file the CSV file be deleted from the local PC folder.

The intention is to create a kind of buffer (local folder) between the system that generates the CSV files via script and the SQL database so that, in case of communication loss or slowness, it does not affect writing to the SQL database. Currently the system writes directly to the SQL database via script (without generating CSV files), however it is generating slowness since each write has to open the connection to the database and then close, stopping the execution of the script.


What I would like to ask help is how to save multiple CSV files in the SQL and after the confirmation of writing delete the recorded file.

I appreciate any help!

Cheers,
Berg

How to deploy SSIS package using SSDT 2017?

$
0
0

Hi,

I have just completed a SSIS package (my first package). Now I am looking to deploy the package on the production server. So I am looking to convert the package to deployment package and have a configuration file with all the connections managers, parameters and mapped variables with it.

I was looking to do it through an approach but was unable to map all of my variables as, One of my variables is a object and it says can not map an object variable.

Thanks,

Minhal



How to execute task only when files are present in the folder.

$
0
0

Hi,

I have a package which imports the excel files from 2 different folder. I am looking a way to execute the package only when both the packages have excel files in it otherwise the package will not be executed on the server.

But as of now if I schedule it to run for every 15 minutes on the server then the package will be executed after every 15 minutes even if the folders are empty. I am looking for a way which will restrict the package execution if any of the folders are empty.

Thanks,

Minhal

Check and re-insert data

$
0
0

Hi, 

I am trying to move data from the staging database to the prod database, but my table doesn't have primary key so how can I create a SSIS process? which compares a data from staging db to prod db then delete the existing data from prod and insert new data from staging. Can you please help me with this issue?  

I have same rows in both databases, and I want to compare a data based on the date. 

Thank you,

SSIS : Move file from one folder to other

$
0
0

Hi Guys - 

In a folder A i have 100's of pdf files. Below is the format:

CompanyName_CompanyID_CustomerID_Getdatetimestamp. 

Sample file names : IronWorks_137_86678_20191008070511

Firebrand_7_86678_20191008070511

Woodworks_150_86678_20191008070511

My question is, If the companyID in the file name has value of 1 or 7 or 141 or or 103 or 142, I need to move them to folder B. 

How can i do this in SSIS ? Thanks

Cannot specify column delimiter for flat file connection manager in BI Studio

$
0
0

I have a tab-separate text file that I want to load using SSIS. When I try to create a Flat File Connection Manager, and switch to the "Columns" page, the "Column Delimiter" field is disabled (grayed). The row delimiter is {LF}, which is what I want, but the preview shows a single column. I can't find any way to enable the column delimiter field and specify that I want a tab delimiter.

Moreover, if I close the dialog, then try to edit the connection manager, try to modify the row delimiter, and hit "refresh" - the dialog simply closes!

I even tried to modify the .dtsx file manually to create the setup I want but even weirder things happen. For example, changing the row delimiter in the .dtsx file has no effect, but changing the column delimiter in the file and then re-opening in BI studio shows that it actually changes the row delimiter!

I'd appreciate any help with this, it's really frustrating since this is pretty much the first step I've ever taken with integration services and I thought this would be fairly straightforward.

Thanks,

Yair Halevi (Spock)

Changing values of SSIS catalog environment variables using c#

$
0
0

Hi

I created a SSIS project with SSDT 2015.

I would like to change the values of environment variables(in SSIS Catalog) using a net application.

Viewing all 24688 articles
Browse latest View live


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