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

Using variables in OLEDB Command

$
0
0

Hi All,

Is there a way in which I can specify a variable inside an OLEDB Command in SSIS? I need to use OLEDB Command to insert data into a table and the table name is stored inside a variable. 

Thanks in advance.


regarding ssis

$
0
0
I have one destination table with some data suddenly 2 excel files data want to insert into the destination table but how to know this data is already inserted into the destination and only new data is inserted into the destination

Import data from different Excel sheets to different tables

$
0
0

I have an Excel file which has different sheets(S1,S2,S3) .The columns in the sheet are different. I want to import the data from different sheets to different tables(T1,T2,T3).

S1 ---> T1

S2 ---> T2

S3 ---> T3

I want only one Excel data source in my SSIS package.

regarding ssis

$
0
0

Hi,

In my source table having 1000 records from that I want move 10 to 990 rows then what I need to do

How to insert into table from an Datatable ?

$
0
0

Hi Friend,

I have a datatable that is created at some point in my SSIS as an object.

I need to insert the data into a sql table, how should I do that ?

I have this:

        Dim oleDA As New OleDbDataAdapter
        Dim dt As New DataTable
        Dim col As DataColumn
        Dim row As DataRow
        Dim sMsg As String

        oleDA.Fill(dt, Dts.Variables("history").Value

and want to insert into a table in a SQL DB

        Dim sqlCon As New SqlClient.SqlConnection("server=Myserver\SQL2008R2;database=MyDB;Integrated Security=SSPI")
        Dim sqlreader As SqlClient.SqlDataReader
        sqlCon.Open()

Thanks in advance,

Pat


Patrick Alexander

Looking for a suggestion. Using SSIS to read MySQL and wrtie to DBMongo

$
0
0

Hi

I have a question from my colleague about using SSIS to transfer data from MySQL to both MangoDB and MySQL.

Well, I have always used MS Sql as destination for my data warehouse and all the reporting. So I am not familiar with this subject.   

I have found an article how to write to MySQL.

http://blogs.msdn.com/b/mattm/archive/2009/01/07/writing-to-a-mysql-database-from-ssis.aspx

I also found C# Driver for MongoDB. I am guessing I could use this.

http://docs.mongodb.org/ecosystem/drivers/csharp-community-projects/

I guess my question is

Is SSIS suitable to transferring data from MySQL to MangoDB and MySQL? Is there probably better tool out there?

My initial response to my colleague was 'Why use SSIS if MS SQL is not used?'. What he said is that because C# can be used in SSIS.

Actually, I don't think it's good to use SSIS just because it can be customised with C#.

Anyways, can anyone give me some insights on my situation please?

Thank you

Kind regards

SSIS child packages errors not bubbling up to the SQL Agent

$
0
0

hi we have a package that's a child to another package which in turn is to another package.

when the job fails it displays  Package Execution failed. The package failed.

it shows no error. how can we change this so that it shows an error?


eddy.a

AlterNative for Script componant?

$
0
0

Hi all, 

we are having Some Package.. we are using Script componant for generating surrogate key..

we are facing some prb using script componant.

so we need any other alternative for that.. plz response me

thanks in advance.

pandiyan


pandiyan



Changing DataTypes in an Excel Data Source

$
0
0

Hello.

I'm importing some data from an excel file to sql server 2005.

I created an Excel Data Source inside my Data Flow Task but it is assuming that the source columns DataType is double-precision float [DT_R8]. It isn't, even though some rows may containg numeric string in the column's cell.

If I go to the Data Sources advanded editor, and modify the data type property of the column, SSIS complains the the error output and the source output are not of the same DataType. If I try to change the error output's data type in the advanced editor I get this error: "Property Value". The deailed error states:

Error at MOVIM 04 [MOVIM 04 [1]]: The data type for "output "Excel Source Error Output" (10)" cannot be modified in the error "output column "Agente Protector" (7662)".

Error at MOVIM 04 [MOVIM 04 [1]]: Failed to set property "DataType" on "output column "Agente Protector" (7662)".

If i let SSIS correct the error by itself, it changed the dource column back to double-precision float [DT_R8].

Is there any way to get arround this?

Thanks in advance,

Hugo Oliveira

Where is the package data(XML) stored?

$
0
0

We have created an SSIS catalog and deployed our packages using the deployment wizard.  We would like to know where the actual package(XML) gets stored.  We have looked inside SSISDB in internal.packages, we have looked in MSDB in the sysssispackages table, we have looked at the file system of the server in DTS\Packages and they are no where to be found.

The reason we want to know is so that we may be able to configure them to be stored in SSISDB and then we would be able to leverage AlwaysOn to have package data automatically replicated in another data center.  

regarding ssis

$
0
0

Hi,

How to Concat row data through ssis?

Source:

Ename

EmpNo

stev

100

methew

100

john

101

 tom

101

 

Target:

Ename

EmpNo

Stev methew

100

John tom

101

Field is missing an escape character for a quote

$
0
0

Hello ,

any solution for below error in SSIS.

Field is missing an escape character for a quote.Unable to update PK WHERE clause.Error processing data batch.

i tried with convert tool. I ignored that column but still i am facing same error.

Regards,

Akshay Adivarekar


Akshay Adivarekar

Convert SQL Script With JOIN's to SSIS

$
0
0

I've been tasked with converting several existing SQL scripts into SSIS packages. While some of the scripts are fairly straightforward, some of the scripts contain multiple JOIN's across multiple tables. While I have always just used a simple Execute SQL Task or an OLE DB source with a script, I've been asked to do away with any references to any other tables/databases in the source. Here is an example of one of the scripts:

INSERT INTO [dbo].[DimEngagementVehicle]
           ([EngagementVehicleSourceKey]
           ,[EngagementVehicleCode]
           ,[EngagementVehicleDesc]
           ,[EngagementVehicleCategorySourceKey]
           ,[EngagementVehicleCategoryCode]
           ,[EngagementVehicleCategoryDesc]
           ,[EngagementVehicleTypeSourceKey]
           ,[EngagementVehicleTypeCode]
           ,[EngagementVehicleTypeDesc]
           ,[GlobalEngagementVehicleKey]
           ,[GlobalEngagementVehicleDesc]
		   ,[GlobalEngagementVehicleTypeKey]
           ,[GlobalEngagementVehicleTypeDesc]
           ,[RowIsCurrent]
           ,[RowStartDate]
           ,[RowEndDate]
           ,[RowChangeReason]
           ,[InsertAuditKey]
           ,[UpdateAuditKey]
           )
 SELECT		 hs.health_screening_key
			,hs.source_key
			,hs.health_screening_desc
			,s.source_key
			,s.source_code
			,s.source_desc
			,v.rbh_vendor_key
			,v.rbh_vendor_code
			,v.rbh_vendor_name
			,3  AS [GlobalEngagementVehicleKey] -- 'Health Screening '
			,'Health Screening ' AS [GlobalEngagementVehicleDesc] -- 'Health Screening '
			,2 AS [GlobalEngagementVehicleTypeKey] -- 'Active Engagement'
			,'Active Engagement' AS [GlobalEngagementVehicleTypeDesc]
			,'Y' AS [row_is_current]
			,getdate() AS [row_start_date]
			,'12/31/9999' AS [row_end_date]
			,'N/A' AS [row_change_reason]
			,-1 AS [insert_audit_key]
			,-1 AS [insert_audit_key]
FROM [RBH_DW_STAGE].[dbo].health_screening hs
INNER JOIN [RBH_DW_STAGE].[dbo].[source] s on hs.source_key = s.source_key
LEFT JOIN [RBH_DW_STAGE].[dbo].[rbh_vendor] v ON v.rbh_vendor_code = hs.vendor_screening_id
WHERE NOT EXISTS
(SELECT 1 FROM [DimEngagementVehicle]
	WHERE [GlobalEngagementVehicleTypeKey] = 2
	AND [GlobalEngagementVehicleKey] = 3
	AND [EngagementVehicleSourceKey] = hs.health_screening_key)
GO

I know that either LOOKUP or MERGE JOIN could be used here, but not quite sure how to implement it in a package.

Any insight or assistance would be greatly appreciated!

Thanks!


A. M. Robinson

SSIS XML Import Different versions of the XML Files

$
0
0

Hello,

In our package we are trying to upload XML files from an external system. Over the years the files have changed (more fields added, 1 dropped). All these files have a inline XSD.

We have troubles with the package that it crashes becasue it was developperd with a file van release x and the files from release x+1 have less fields ...

We could solve this by creating our own XSD, having all possible fields, whenever a field is not present in the XML this would cause no problem.

But, how can we tell SSIS to ignore the inline schema (easy) but also not to read this as data.

When reading these files with a external XSD scheme the XML srouce crashes on the XSD scheme in the XML file ...

Any suggestion ?

Data load from Multiple tables

$
0
0

Hi,

I have a requirement in which i have my source data in Oracle, DB2, excels and txt etc..! i have more than 100 tables of data which needs to be loaded into SQl serevr destination and also incremental logic should also be applied on top of it.

So can anyone suggest me the best approach in SSIS, So that i can design the package without creating so many data flow tasks and also there should not be any peformance degrade.. ! Please guide me on this..!

Thanks in Advance


Balaji - BI Developer


Issue with OLEDB Source in BIML

$
0
0

Hi all,

I am trying to automate a data flow with BIML. I am using an expression to build my SQL dynamically based on input parameter. Sparing details of the use case, I need this flexibility in my project. I am having 1 master table which consists of file name and source query.

I want to use SQL Command from Variable Data access mode in OLEDB Source.

On the basis of input file source query need to change automatically .However; my query is not being evaluated when the package is generated. The query will populate after package generation, when I open the source and set access mode SQL Command, but I cannot seem to get this configured automatically as desired. This is preventing me from doing transformations in the script.

Please help me to achieve the above scenario

Below is my BIML Script(C#).

<Bimlxmlns="http://schemas.varigence.com/biml.xsd">

<!-- Database Connection manager-->

      <Connections>

             <ConnectionName="Archive"ConnectionString="Data Source=RLDEVOLP03.DEVELOPMENT.LOCAL;Initial Catalog=Archive;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />

             <ConnectionName="DataStaging"ConnectionString="Data Source=RLDEVOLP03.DEVELOPMENT.LOCAL;Initial Catalog=DataStaging;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;" />

</Connections>

<!-- Name Of the the Package-->

<Packages>

<PackageName="LoadArchive Using BIML"ConstraintMode="Linear"ProtectionLevel="EncryptSensitiveWithUserKey">

<Variables>

<VariableName="V_Archive_tablename"DataType="String"></Variable>

<VariableName="V_Archivequery"DataType="String"EvaluateAsExpression="true">SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum FROM dbo.ImportBBxFbapp a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbapp b ON a.Col001 = b.BBxKey Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)

</Variable>

<VariableName="v_Src_FileName"DataType="String">FBAPP</Variable>

                                              

<!-- Load Data Truncate Staging Sequence Container--> 

<ContainerName="Load Data Truncate Staging"ConstraintMode="Parallel">

<Tasks>

<DataflowName="Archive Data"DelayValidation="true">

<Transformations>

<OleDbSourceName="Source"ConnectionName="DataStaging"ValidateExternalMetadata="false">

<TableFromVariableInputVariableName="User.V_Archivequery"/>

</OleDbSource>            

                   

</Transformations>

</Dataflow>

</Tasks>

</Container>

</Tasks>

</Package>

</Packages>

</Biml>

Regards,

Vipin jha


Thankx & regards, Vipin jha MCP

regarding ssis

$
0
0

Hi,

 in source table data having like this

Eno

Ename

Esloc

Deptno

1

Sreenu

Hyd

10,20,30,40,50

 

I want like this

Eno

Ename

Esloc

Deptno

1

Sreenu

Hyd

10

1

Sreenu

Hyd

20

1

Sreenu

Hyd

30

1

Sreenu

Hyd

40

1

Sreenu

Hyd

50

 How to do this?

regarding ssis

$
0
0

Hi,

I have table like this

Sno

Sname

1,2

Sreenivas

3,4

Reddy

5,6

Raja

7,8

Reddy

 I want like the following table

Sno

Sname

1

Sreenivas

2

Sreenivas

3

Reddy

4

Reddy

5

Raja

6

Raja

7

Reddy

8

Reddy

regarding ssis

$
0
0

Hi,

I have one folder with 5 file text files by using for each file enumerator we store the files in to one folder but suddenly tomorrow one file add to that folder how to store the file into same destination?

Issue importing flat files into SQL server 2008R2

$
0
0

I have csv files that the last column may not have data. SSIS (version 2008R2) will insert the next row's data into the empty cells, which causes my package to fail.

I know this is resolved in 2012 but we are using 2008R2 still. Any suggestions?

Thanks.

Viewing all 24688 articles
Browse latest View live


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