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

SSIS and Visual Studio 2012 stored procedure refactor rename.

$
0
0

While I can create a Solution with a project with Business Intelligence SSIS package and SQL Server project, refactor-renaming objects in it does not propagate to the SSIS PACKAGE TASKS that invoke the stored procedure.

How do we get this oversight corrected ? 



SSIS Dynamic Excel Source Metadata problem

$
0
0

Hi,

I have a SSIS package which reads excel source file from shared location and iterate through sheets and loads data into sql server table. The problem the file am using to load data for first time mapping is working. But when the user puts a file with same header and data. It fails saying the metadata mismatch. I am doing it through a For Each Loop Container.

Please suggest  a solution to this problem.

Thanks

Fuzzy Lookup Indexing

$
0
0

Hello Everybody,

For the first run,  i have selected create, Store and maintain index.

For second run, i would like to go for existing index instead of generating or maintaining index each time.

When i am trying to select existing index, it always says Loading to me.

Can anyone please help me out ? why i am unable to select existing index ?


Fuzzy Lookup using existing index failed

$
0
0

Hi All,

Please help me to check on this fuzzy lookup issue.

[Situation]

I have selected to store and maintain index for first time, it works fine (just input 4 variables and look-up from table which contains1 million records). After execution, I altered the option to use existing index to do the same thing but receive the error msg.

[Environment]

SQL Server 2012 RC0 env. & SSDT development env.

[Error Msg]

[Fuzzy Lookup [111]] Warning: Catastrophic failure
[SSIS.Pipeline] Error: Fuzzy Lookup failed the pre-execute phase and returned error code 0x8000FFFF.

I try to reduce my look-up table into 500,000 record, and it works fine by using existing index, but I don't know why??...

Should I change any settings about memory allocation(I set MaxMemoryUsage to 0)? Or may be aboutRC0 issue?

I have changed WarmCaches property to False but not works.... could anyone give some suggestions?

Thanks in advanced.

BR,

Jack

Data flow task failed while tranferring data from OLEDB to XLSB,

$
0
0

Dynamically I created a Excel sheet by 2 SQL tasks .

 1st SQL task: Select top 1 column1 from table( Result:ALLEG27012013 (nvarchar),

This resul tset assigned=@vFILENAME)

2nd SQL task: created Excel sheet( excel connection manager expression:@vFILEPATH+@vFILENAME)

Two tasks succeeded created Excel sheet in XLSB extension

but Data flow task failed (2nd image).

Thanks

Please do help

--MADHU


SQL server 2008

$
0
0

Hi,

I am selecting multiple records from table and joining them.

My query is like this,

SELECT B.ace AS Column1
       K.lastname +' '+ K.firstname AS Column2,
       R.inside AS Column3,
       B.number AS Column4 
      
from Btable B
     left join Ktable K 

     on B.id= K.id       

     left join Other O

     on B.number=O.othernumber    

     left join Rtable R
     on O.somenumber=R.rnumber    
GROUP BY 

                  B.ace,

                  K.lastname +' '+ K.firstname,
                  R.inside
                  B.number

I want to select distinct records of  "K.lastname +' '+ K.firstname" and "R.inside".

I tried giving (SELECT DISTINCT K.lastname +' '+ K.firstname AS Column 2)

but it didn't work. Is there a way to do this?

Thanks

BIDS SSIS Configuration using SQL Server questions

$
0
0

BIDS 2008, SQL 2008 R2

Support SQL 2005, 2008, 2008R2, 2012

I created a BIDS SSIS Package using SQL Server Configurations. A Connection Password is one of the configuration variables. So it created the SSIS Configuration SQL table with the ConfiguredValues. The row that holds the [Password] shows ***** in the ConfiguredValues.  So the idea is that all I have to do is change the Configured Values in the table and it will be picked up by the package and and Job that DTEXEC the package? Do I have to redeploy the package when I can a SSIS Configuration table value?

When I first looked at the SSIS Configuration table after it was created, The [Password] variable had ***** in the Configured Value. Package run fine. But I then ran and UPDATE TABLE to change the password. Now the password is visible in plain text. Is there a way to hide the password again using ***** or do I have to redeploy the package when changing the password to get the ****?

Simple Package - Error output Issue

$
0
0

Hi

I have a simple Flat file to Table load package. Flow is like

1 - FF source --->Error o/p -->Src_Error_FF_Destn
2 - Derived Column Transformation for 5 audit columns
3- OLE DB Destination -->Error o/p -->Destn_Error_FF_Destn

The requirment is,

a) when the FF Source gets the data, if it finds any discrepancies, then those rows should be moved into a
Flat file, say, Error_Source.txt   and
b)While loading the table, if it finds any discrepancies, then those rows should go to a separate flat file called Error_Dest.txt.
c)The error file should be created ONLY if there are any error records.

I have SQL server 2012 and I have created the package. I could do a) & b)  but NOT c). Irrespective of error records are there are not, both files are getting created.

Would really appreciate your valuable help.


error when running a SQL execute task that call a stored procedure

$
0
0

Hi,

When running the following SQL execute task that calls a Stored Procedure:

EXEC EtlLogger.usp_WritePackageAuditLog ?, ?,0, 'init','init',0,'init',? OUTPUT

With the following parameters:

System::PackageName NVARCHAR Input 0

System::ExecutionInstanceGUID Input GUID

User::PackageLogId Output Long 7

I am getting the following error:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value

The SP runs ok from SQL envoirnemnt but not from SSIS. It seems that there is a problem with the SQL execute task calling the SP.

Any ideas how to solve ?

Script Task For Fetching Results and Doing Transformations

$
0
0

Hi All,

I have a script task where I need to fetch data from a table. After the fetch is done I need to save this results in a dataset where I can use it for further transformation.

SELECT UID,CITY+', '+AREA AS Source
FROM NewLeads NL JOIN JDDimKeyword JDK 
ON NL.Category=JDK.Keyword
WHERE NL.Area<>'' AND NL.LeadDate=CONVERT(DATE,GETDATE()) AND JDK.KeywordType='Category'





Now I have to pass this second column (Source) to an API where I need to get the GeoCode for the location(Source). This I have to do for all the rows in the resultset one by one.

After the resultset is being processed I need to store this in a table in database.

Please suggest and give me code examples if you can. I can provide further info if needed.

Thanks.


Himanshu Sharma

SSIS 2008 Use EXEC

$
0
0

Im using SSIS 2008 i want to try and run the following SQL code:

The code is basically checking if a column exist in the return of a udf function, if it is there it it select normally from that column, otherwise i just select a NULL value and create the column for he mapping sake

declare@test nvarchar(100)set@test ='Select Distinct Area From dbo.udf_RiskManagementPlan('') Where Area   is not Null And Area   != ''';ifexists(select object_id from sys.columns where object_id = object_id('dbo.udf_RiskManagementPlan')and name ='Area')exec sp_executesql @testElseselectNullAs Area 

It is working fine in SQL managment studio, but when i try and place it in OLEDB source i keep getting error regarding syntax

i tried placing the entire code in a variable value and just call that still gave same syntax error

i have feeling this has more to do with SSIS problem handling stored procedure and parameters then the syntax, but i cant seem find way around it

Refresh the content of variables

$
0
0

Hi all,

i have 4 variables:

Variable01: @[User::Variable01] = (DT_STR,4,1252)YEAR(GETDATE()) + "-" + (MONTH(GETDATE()) < 10 ? "0" + (DT_STR,2,1252)MONTH(GETDATE()) : (DT_STR,2,1252)MONTH(GETDATE()))

Variable02: @[User::Variable02] =(MONTH(GETDATE()) < 10 ? "0" + (DT_STR,2,1252)MONTH(GETDATE()) : (DT_STR,2,1252)MONTH(GETDATE()))

CurrentFileString01: @[User::CurrentFileString01]= "\\" + "\\" + "server01" +"\\" + "s$" +"\\" + "Backup" + "\\" + "PC" + "\\" + @[User::Variable01] + ".txt" 

CurrentFileString02: @[User::CurrentFileString02]= "\\" + "\\" + "server01" +"\\" + "s$" +"\\" + "Backup" + "\\" + "PC" + "\\" + "AgentSessions_" + @[User::Variable02]  + ".txt" 

When one month ends (for example July ends and August begins) the variables get not the new content.

On 31.07.2013 the content was:

Variable01: 2013-07

Variable02: 07

CurrentFileString01: \\server01\s$\Backup\PC\2013-07.txt

CurrentFileString02: \\server01\s$\Backup\PC\AgentSessions_07.txt

On 01.08.2013 the content is the same. The variables check not again. Only if i open the expression and press "evauate expression" i get the right values:

Variable01: 2013-08

Variable02: 08

CurrentFileString01: \\server01\s$\Backup\PC\2013-08.txt

CurrentFileString02: \\server01\s$\Backup\PC\AgentSessions_08.txt

How can i turn the package to check automaticly the expression?

Info:
I tryed the option "evaluate as expression", but after i do this to more then 2 variables, VisualStudio2008 freeze for more than 15 minutes and after every change in the project it will freeze again. This behavior i have on 2 different maschines: Vista32Bit and Win2008 Server.

Thx, hope someone could help me.
Tobias


How to add the column and move the records in dynamically existing table in sql

$
0
0

Hi,

i have below mentioned query. this query will be create the dynamic tables and records move to dynamically created tables from source.

below query is working fine. but after the insert the records i will add one column in dynamically created table and record move to this created column from another table. 

Declare @Sql Varchar(Max)
Declare @x int
declare @value varchar(100),@schema varchar(100)
SET @schema='aaa'
Declare @f1 Varchar(100)
Declare @table Table(Idt Int Identity(1,1),grp_id numeric(18,0),id int)
DECLARE @TABLENAME_2 NVARCHAR(100)
DECLARE @TABLENAME_1 NVARCHAR(100)
SET @TABLENAME_2 ='abc..table2'
Insert Into @table Select Distinct grp_id,0 from abc..table2
Select @x = Max(Idt) from @table
select @value=(select id from cde..Client where Shortname='+@schema+')
While @x>0
Begin
Select @f1= grp_id From @table Where Idt = @x
SET @TABLENAME_1='condition_'+ @f1
Set @Sql ='If Exists( Select 1 from sys.objects where name = '+ @TABLENAME_1 +' And Type_Desc = ''USER_TABLE'')

Insert Into '+@TABLENAME_1+' Select * from '+@TABLENAME_2+' Where grp_id = '''+@f1+'''
Else 
Select * Into '+@TABLENAME_1+' from '+@TABLENAME_2+' Where grp_id = '''+@f1+'''

---alter table '+@TABLENAME_1+' add id int
---update '+@TABLENAME_1+' set id = '+@value+''
Set @x = @x-1
print @sql
--Exec (@Sql)
End 

this is the query for add the one column and move the records to this column in dynamic create table from another table.

---alter table '+@TABLENAME_1+' add id int
---update '+@TABLENAME_1+' set id = '+@value+''

this is correct ?... this is not working fine.

Regards,

Abdul Khadir.

Job that runs maintenance plan fails after move to new server

$
0
0

Hi,

One of my SQL Servers I have a job that runs a maintenance plan. I recently recreated the job on a different SQL Server and exported the SSIS package relating to the maintenance plan to that server. Now when I run the job on the new server it fails with the following error:

Date		01/08/2013 09:53:50
Log		Job History (TimeWare_Full_Backup.Subplan_1)

Step ID		1
Server		ACHSQL01
Job Name		TimeWare_Full_Backup.Subplan_1
Step Name		Subplan_1
Duration		00:00:07
Sql Severity		0
Sql Message ID		0
Operator Emailed		
Operator Net sent		
Operator Paged		
Retries Attempted		0

Message
Executed as user: ACHESON\sqlagent. Microsoft (R) SQL Server Execute Package Utility  Version 10.50.1600.1 for 64-bit  Copyright (C) Microsoft Corporation 2010. All rights reserved.    Started:  09:53:50  Error: 2013-08-01 09:53:52.13     Code: 0xC002F210     Source: {8CA40E29-4E02-410D-956A-6DD73F1265C8} Execute SQL Task     Description: Executing the query "DECLARE @Guid UNIQUEIDENTIFIER      EXECUTE msdb..sp..." failed with the following error: "The INSERT statement conflicted with the FOREIGN KEY constraint "FK_sysmaintplan_log_subplan_id". The conflict occurred in database "msdb", table "dbo.sysmaintplan_subplans", column 'subplan_id'.  The statement has been terminated.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.  End Error  Error: 2013-08-01 09:53:55.36     Code: 0xC0024104     Source: Back Up Database Task      Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed, and indicate the result using an "out" parameter.  End Error  Error: 2013-08-01 09:53:55.42     Code: 0xC0024104     Source: {E506B23C-1E30-4FF9-BABA-BD3968DC8EA7}      Description: The Execute method on the task returned error code 0x80131501 (An exception occurred while executing a Transact-SQL statement or batch.). The Execute method must succeed, and indicate the result using an "out" parameter.  End Error  DTExec: The package execution returned DTSER_FAILURE (1).  Started:  09:53:50  Finished: 09:53:55  Elapsed:  4.727 seconds.  The package execution failed.  The step failed.

Does anybody know how I can resolve this?

Cheers

Paul

Fuzzy Lookup Indexing

$
0
0

What's the use of below procedures in fuzzy look indexing ? when are they helpful ?

  sp_FuzzyLookupTableMaintenanceInstall

  sp_FuzzyLookupTableMaintenanceInvoke

  sp_FuzzyLookupTableMaintenanceUnInstall

Thank you


How to set connection user name and password from package parameters

$
0
0


Note this question is about SSIS 2012 Project Deployment Model.

I have an OLEDB connection which needs a username and password; since the information accessed is sensitive everyone has to use their own account.  So I need a way to have a configuration in the SSIS 2012 project which sets the Username & password in the project connection dynamically so multiple developers can work on the same project without the username getting checked in to TFS.

Is there a way to use the Project parameters in the project connection manager xml or another way to have different connection strings for each developer?


OLE DB Destination Editor Frustration

$
0
0

Here is something I find frustrating about Mappings in the OLE DB Destination Editor. Maybe somebody knows a tip that can help me with this.Once I have pulled in the OLE DB Destination object, assigned the connection manager and the table name, I want to go to Mappings and check that the mapping lines from fields in the Available Input Columns are pointed at the correct field names in the Available Destination Columns. Usually they are all okay, but sometimes I have to correct some of them. Here is where the frustration comes in. These two windows are too narrow and they often truncate the field names. Even if I expand the windows, the names are still cut off. I can not expand the names to show the full name. So I have a list that looks like:

Report Mo

Corporati

Copy of De

Copy of De

Copy of Er

I can still make the changes using the pull downs below these two windows, but...why doesn't the list of names expand to show the full name. I mean what's the point of allowing the container window to expand if the contents in the window do not expand with it.

Can anybody tell me how to remedy this?

tod 

Execute multiple SQL queries and record results using SSIS

$
0
0

Hi All, I'm trying to achieve following in SSIS. Could you please advise what is the best way forward?

Execute multiple SQL files and record the results in a format that an analyst could review (such as excel).

Background - The SQL files are individual test scripts to validate data between source and target post ETL execution. They are written in following format: 'sql1 EXCEPT sql2 UNION ALL sql2 EXCEPT sql1'. If this compound SQL retreives rows, then that data validation test is considered as Fail since mismatches were found, otherwise, it is considered as Pass. Therefore some SQLs will yield rows while some might not.

Data flow tasks are running slow/ sometime stuck indefinite

$
0
0

Guys,

I am facing a weird problem in data flow tasks in one the SSIS package I didn't work on. Package is designed to load 80 tables on target DB from source DB.Please note source and target DBs are on different servers which are geographically on same location.In package there is data flow task per table load and all are connected in sequence though they are independent.  Below are steps to explain how each DFT is designed.

1. OLEDB source to select source DB table

2. OLEDB source to select target DB table

3. Merge join above OLEDB sources (full outer join)

4. Conditional split to decide on insert or update

5. OLEDB destination if new record (table lock is checked)

6. OLEDB command to update target DB table if existing record.

Some DFT tasks just executes as normal but some are taking around 1 or 2 hours. The issue is at one DFT tasks which gets stuck (seems like deadlock but I am not sure). It is not throwing any error either. It was almost for 2 days stuck there(I just wanted to see how long it takes). I checked all the source and target table count and not a single table having rows more than a quarter of million. Also these tables don't have any PK or FK constraints. I did lot try to figure out why this DFT is getting stuck but no luck.

Any idea or suggestions please.

How to add reference to SSIS script task

$
0
0

Hi ALL

I cannot add the reference to the following:
"Imports Microsoft.AnalysisServices.AdomdClient"
 in SSIS script task. All the objects that i declared become underlined because there is no reference to the above library.
When i go in SSIS script task and open the code to add the reference it does not the list the above library.
I am able to add reference in Visualstudio but not in SSIS.

Please adivse, it is very critical and urgent for my task

Thanks.

Viewing all 24688 articles
Browse latest View live


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