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

Delete Records from Other Server Database without using OLE DB Command in SSIS.

$
0
0

Hello Experts,

Please suggest me the solution of below problem : -

I am deleting data from a database table on a server by joining the table on another server, So how to perform this task without using the OLE DB Command Component in the SSIS Package. Because using OLE DB Command component in ssis package is  slow.

Any help in this regard will be appreciated. 

Regards,

Raghvendra Rajak 


Load data to first Sunday of the month

$
0
0

Hi Expert

I am trying to achieve this scenario using precedence constraint but not getting expected output. Please let me know any one have any idea to achieve this scenario.

Thank you.

Getting Error When Try to Connect to Sharepoint on Cloud from SSIS (VS)

$
0
0

Hi Guys,

Any one having any Idea how to Resolve this Issue:

I am using SSIS 2012 to connect to SharePoint On-line (On Cloud) and getting below error:

Test connection failed -> Could not load file or assembly 'Microsoft.SharePoint.Client.Runtime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

I checked the Assembly C:\Windows\assembly and found that Microsoft.SharePoint.Client.Runtime, Version=14.0.0.0 I have there. I downloaded latest Version from https://www.microsoft.com/en-us/download/details.aspx?id=35585

and installed it but still I am getting same error. After Installation, Version did not change here C:\Windows\assembly

Please help. 


Thanks Shiven:) If Answer is Helpful, Please Vote

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 Build Conditional Split Using Row Counts from Two Tables

$
0
0

I have two tables: import.pardotProspects and production.pardotProspects. I want to compare the row counts between the two tables. If the row count for the import.pardotProspects table is greater than or equal to the row count for the production.pardotProspects then go to the next task, else end the SSIS process.

I plan on using SELECT COUNT(*) FROM <table name> to get the row counts.

I was planning to use the Conditional Split task.

The logic is:

IF(select count(*) from import.pardotProspects) >= (select count(*) from production.pardotProspects) THEN 

Next SSIS Task

ELSE

END SSIS Processing

I am unsure of the syntax to use in SSIS. Will the Conditional Split task work, or should I use Execute SQL Task?

How to Replace a Comma with a space in a Derived Column

$
0
0

I'm trying to replace any commas in a column with a space. I'm using the following in a derived column: 

(DT_TEXT)REPLACE([VendorMasterName] ,"-","")

Anytime I try to save the Derived Column, I'm receiving the following error: 

Error at Data Flow Task [Derived Column [218]]: Attempt to parse the expression "(DT_TEXT)REPLACE([VendorMasterName],",","")" failed. The expression might contain an invalid token, an incomplete token, or an invalid element. It might not be well-formed, or might be missing part of a required element such as a parenthesis. 

I've also Tried the following:

(DT_STR)REPLACE([VendorMasterName] ,"-","")

(DT_TEXT)REPLACE([VendorMasterName] ,'-','')

Any help would be greatly appreciated! 

Thank You

SQL or SSIS with SC for BOOSTING RANGE LOOKUPS

$
0
0

Hi

We a fact table with 15 000 000 rows with a date, we have to look for information in a date slice in another table.

But this table is not clean and we can have several lines that correspond to the date of the table of fact

Example for the date 15/06/2019  

in the table lookup we have :

BEGIN DATE - END DATE

01/06/2019  -  30/06/2019

05/06/2019  -  01/07/2019

10/06/2019  -  02/07/2019

13/06/2019  -   02/07/2019

June 15 matches is well in the slice of these 4 lines.

we would like in this case to recover the most recent begin date

what would be the best practice? with ROW_NUMBER () OVER (PARTITION By ... ORDER BY BEGINDATE DESC, ENDDATE DESC)
and select only numberline = 1?
or is it possible with a script component as ( but with clean lookup table ):

https://kohera.be/blog/sql-server/ssis-boosting-range-lookups-script-component/

Thanks for your helps or advice


Stef

The dreaded "cannot convert between unicode and non-unicode string data types"

$
0
0

So really simple...a OLE DB Source to run a SQL Server Stored Procedure and then pump the result set to an Excel spreadsheet.

On the Excel Spreadsheet, Excel Destination, we did indeed go to Advanced Editor and Component Properties and set ValidateExternalMetadata to False. We then had to go to each one of our External Columns through Advanced Editor and Input and Output Properties and set the Data Type from DT_WSTR to DT_STR. But every blessed time we get out of the SSIS Package and then get back into it in Microsoft Visual Studio, it reverts all those data columns back to DT_WSTR.

What am I doing wrong here?

Do I have to physically Convert every one of these data columns? The column types coming out of the OLE DB Source are DT_STR.

Thanks for your review and am hopeful for a reply.


problem in deploy a project from visual studio to ssisdb catalog

$
0
0

Hi,

When trying to deploy project to ssisdb catalog, i get the error :

TITLE: SQL Server Integration Services
------------------------------

Failed to deploy project. For more information, query the operation_messages view for the operation identifier '11'. (Microsoft SQL Server, Error: 27203)

when trying to see the data in operation_messages i get no rows at all.

important:

when i create the catalog i get error that saying "cant open the SSISDBBackup.bak" file.

i look at the path and didnt find the bak file so i copied it from another sql server instance.

The same problem was with ISServerExec.exe file. i didnt find it and take it from another computer.

my question is about this files, didnt they supposed to create when i installed ssis? or sql server?

the reason for the error is because i copied them from a different computer?

please help

SSDT - Foreach ADO Enumerator Issue with an extra loop

$
0
0

I'm having an issue with FOREACH loop with ADO Enumerator

I have an SQL task that creates an object variable. In my case, it has 1 row. Then I pass it into foreach loop but it seems that loop runs it twice.

I try to debug it using SQL task inside the loop and just insert a row into a table for each loop and it does.

Has anybody had this kind of issues?

Thanks

Casting a DT_NTEXT column to STRING

$
0
0

Hello,

I am trying to cast a DT_NTEXT to DT_STR but not able to do that:

(DT_STR,1000,1252)(DT_WSTR,1000)NDC_CODE_LIST

Thanks,

Ali.

sql server agent job failing

$
0
0

My SSIS package with excel as source works fine when i run it from VS and also runs w/o errors when i execute the package from the integration services catalog. When i run it as a scheduled job or manually by right clicking on the agent job it fails with the error

"The Microsoft database engine cannot open or write to the file" (filepath\employee.xlsx), its already opened exclusively by another user or you need permission to view and write its data".

1) I am the only one to use that excel sheet and it is closed.

2) I have full control on the folder where this excel sheet resides.

3) When i created the agent job i listed myself at the owner.

4) I configured the job to run as a 32 bit.

When a SQL Server Agent job executes , under what user name does the job gets executed?

Please need help.

Thanks

Cannot create Integration Services Catalog

$
0
0

Hi,

So I have a SSIS package that I want to deploy in SSMS and run as a job. But I am not able to create a catalog. It shows the message - 
"The catalog backup file 'C:\Program Files\Microsoft SQL Server\130\DTS\Binn\SSISDBBackup.bak' could not be accessed. Make sure the database file exists, and the SQL Server service account is able to access it. "

I have the following softwares Sql Server 2017 developer edition with Integration Services, SSMS -v18.3, Visual Studios 2017 for SSDT .

The SSISDBBackup.bak file is present in the path C:\Program Files(x86)\Microsoft SQL Server\140\DTS\Binn\ path but SSMS is looking for it in the path C:\Program Files\Microsoft SQL Server\130\DTS\Binn\.

I have tried reinstalling Sql Server with Integration Services, SSMS and SSDT several times
I have checked that I do have write access in the Binn folder.

Could you please help me by suggesting what I should do to solve this issue.? I am stuck on this issue for 2-3 days and the IT service in my office are also not able to help me anymore.

Thank You!

Excel Destination and resulting Excel file has no cell borders

$
0
0

So we have created our Excel template with column headers AND cell borders. Our OLE DB Source runs like a charm. Our Conversions run like a charm. The Excel Destination runs like a charm. The only problem is that the resulting Excel spreadsheet has no cell borders. It's all white and looks kind of hokie. It's formatted ok so that the data shows up under the column headers correctly...just no borders.

Is there any way we can get the borders in there? Really don't feel like messing with a Macro at this point. If I'm missing something...fine...if not...then it's probably ok as is.

Thanks for your review and am hopeful for a reply.

The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro) after SP1

$
0
0

Having installed SP1, my SSIS packages using the OLE-DB Provider for Visual Foxpro no longer work.  Using the latest version obtained from here:

http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en

When attempting to create one SSIS from scratch, the message thrown is:

"The parameter is incorrect. (Microsoft OLE DB Provider for Visual FoxPro)."

The radio button option of "Copy data from one or more tables or views" and then selecting the "Next >" throw the error.

It has to be the SP1 causing the problem because nothing else changed on the Server and everything was working fine prior to this.

Microsoft, any feedback on this??


Version incompatibility for script task called from a Dataflow

$
0
0

I have a SSIS 2016 package I can run fine from Visual Studio 2015 but when I run from the catalogue or a step in a SQL Server Agent job it fails.

There are a number of error message the first of which is "The version of ..... is not compatible with this version of the DataFlow. [[The version or pipeline version or both for the specified component is higher than the current version. This package was probably created on a new version of DTS or the component than is installed on the current PC.]]

The next error says "The component metadata for .... could not be upgraded to the newer version of the component. The PerformUpgrade method failed."

Firstly, what exactly is causing the version problem - the dataflow, the component or some other software on the SSIS server? I'm not entirely sure from these error messages.

Secondly, could this be an issue around the .NET version on my Visual Studio development machine and the server running the package? It is 4.6.2 on the SSIS server (which is Windows Server 2012 R2) and 4.6.1 on my development machine (also 2012 R2)? To me that doesn't seem likely given the small difference in versions.

What other software should I be looking at around this?

Would be wonderful if somebody has the answer to this one as it's driving me nuts. :-)


Nick Ryan MIS Programmer Analyst, ANZ Bank

SSISDB issue

$
0
0

Hi Experts,

 

We are using SSIS in our environment. Observed that SSISDB is grown to a size of 76 GB now.

Have a couple of questions:

 

1. is there a way to reduce the db size ?

2. is getting stored in the system db location? I think sql server is treating SSIS db as one of the system databases. Can we move this database to a different drive? Any implications doing so?

 Microsoft SQL Server 2016 (SP2) EE.

 

Thanks,

Sam

sharepoint list source siteURL is not changing in visual studio.

$
0
0

I have developed a dtsx package on one machine in visual studio 2015. This solution reads from SharePoint 2013 list as source and destination is SQL server.

Now I copied that code solution to another machine. I wish to change site URL in Sharepoint list source component and run but this parameter is not changing. I checked if files are not READONLY.

1) site url in "sharepoint list source" is not changing it goes back to old machine url when I save and reopen it.

I have full permissions on both machines.

2) Can I read sharepoint list from another server and dump data on my SQL server?


how to skip dynamic header rows in ssis

$
0
0
Hi I have one doubt in ssis ,
I want load multiple csv files into  sql server table using ssis package.
while loading time we need consider data from headers on wards.

Source path have 3 csv files with fixed header columns with data
but each file have description and dates creation information before headers and
one file description comes 2row and headers row start from 4th row with data.
another file descriptions comes from 1 row and 9 row on wards have headers with data
and another file will come file description from 5 row and  headers row start from 7throw
columns headers are fixed in the all  csv files



Files location : 1)C:\test\a.csv 2)C:\test\b.csv 3)C:\test\c.csv
a.csv file data like below :here description and dates comes 2and 3 row.actual data start from 4th row onwards
descritiion:empinfromationforhydlocation
creadeddate:2018-04-20

id |name|loc
1  |a   |hyd

b.csv file data like below :here description and dates comes 1and 2 row.actual data start from 9th row onwards
description:empinfromation for hyd location
createddate:2018-04-21

id |name|loc
10  |b   |chen

c.csv file data like below :here descritpion and comes 5 and 6 row.actual data start from 9th row onwards
descritiion:empinfromationforhydlocation
creadeddate:2018-04-21

id |name|loc
20  |c   |bang

Based on above 3 file I want load data into target sql server table : 
emp :
id  | Name |Sal
1   |a     |hyd
2   |b     |chen
3   |c     |bang

here I tried like below in the package side: 
create variable : 1)filelocationpath: C:\test\  2)filename : C:\test\a.csv
drag and drop the foreachloop contaier :choose the type of enumerator foreachfile enumeratior
directory: c:test\
variable mappting :filename configue it.
type of file: *.csv 
reterivefilename: filename and extension
inside foreachloop container I drag and drop the dataflow task
and create flat file connection here used one of file is configure and header row skiped is 1
and used data converion required column and configure to oledb destionation  table
and create dynamic connection expression for flatfileconnection to pass filename dynamically.

after execute the package 2nd file is failed due to descrition and dates inforamtion
description and dates is not constantly comes fixed rows next day files description and dates will comes  with different rows

is there possible to find dynamicaly how many row will skip and that count will pass in header row  skip.is it possible in ssis.
please tell me how to achieve this task in ssis 

[File System Task] Error: An error occurred with the following error message: "The file 'C:\Location1\Destinati.txt' already exists.". so how to remove this error.

Viewing all 24688 articles
Browse latest View live


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