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

SSIS Package Failed to lock variable

$
0
0

Hi..

I have developed one package that will zip the file naming with current date and upload it to ftp..

The file zip task is done..but i can't upload the created zip file with today's date to ftp.

For. e.g. I have one file Order.mdb

Now i am zipping it by date e.g Order_08_26_2013.zip

this name will be created at runtime using expressions.

But now i am uploading the same file on ftp using runtime expression on FTP task as below

@[User::FullFilePathZip] +"_"+  REPLACE((DT_WSTR, 30) (DT_DBDATE) GETDATE(),"-","_")  + ".zip"

the value of evaluated expression is same as zipped file name..But it says "Failed to lock variable....."

Please find attached screen shot for detail. http://social.msdn.microsoft.com/Forums/getfile/324467


How to get data from XML in row column format using stored procedure in sql server 2008 r2

$
0
0

ALTER proc [dbo].[WebServiceCall]      
as        
begin        
declare @sUrl varchar(4000),@obj int,@response varchar(800)     


set @sUrl ='http://10.130.7.147/Eservice/SSISService.asmx/HelloMoon'    


exec sp_OACreate 'WinHttp.WinHttpRequest', @obj OUT        
exec sp_OAMethod @obj,'Open',NULL,'GET', @sUrl, false        
exec sp_OAMethod @obj,'send'        
exec sp_OAGetProperty @obj,'responseText', @response OUT        
select  @response [response]        
exec sp_OADestroy @obj         

declare @data xml 
declare @data1 xml 
select @data = @response 
declare @str nvarchar(max) 
select @str = cast(@data as varchar(max))          
--select @data = @response 
select @str  = replace(@str, '=', '="')
select @str = replace(@str, '|', '" ')
select @str = replace(@str, '^', '"/><row ')
select @str = '<row ' + @str + '"/>'

--select @data1  = cast(@str as xml)
select
    t.c.value('@Grn', 'nvarchar(max)') as Grn,
    t.c.value('@Challandate', 'nvarchar(max)') as Challandate
from @data.nodes('string') as t(c)

end

I am getting a output from asp.net web service in XML format as :

<?xml version="1.0" encoding="utf-8"?>  <string xmlns="http://abc.org/">age=7|Date=15/04/2006^age=5|Date=15/04/2008</string>

How to split this so that i can get age in age column and date in date column . tried hard but not getting answer. How to solve it. getting ouput from web service in @response.

                                                     

R_Sharma1989

Re-Load DFT Error rows best practise :

$
0
0

Team ,

Package  Flow : Simple Load from Flat file to SQL Destiantion  , Scheduled Daily .

DFT==>FFS==>DataConversion==>SQL Load .

Error Rows via Data Conversion moved over to SQL Table "SSIS Error" .

Just wondering what would be the best practise to re-load  errored rows while in DFT . I've seen some  rows had few datatype mismatches and few of them had truncation errors and are  sucessfully floated over to my  mapped "SSIS Errors" destination tables  in SQL Server.

I have  a default column in my "SSIS Error" table which uniquely identifies package name and Date time  the error rows had flowed in . SO is it a wise idea to Set up and Email Task  immediately at the end of DFT , so that i would get notified on a condition : Eg: Send Email  to me if any   rowcount >1 in "SSIS Errors"  table for specifc scheduled execution ?

We are anticipating these errors to be corrected very soon  at source side , But in the interim is there a  best practise to re-laod data from Error Tables  ( after being corrected ) to  Destination ?Do i go about creating a different package to handle this ?

Thanks in advance for your pointers !


Rajkumar Yelugu

Issue in adding "Script Component Transformation" in Data Flow programmatically while generating SSIS 2008 package.

$
0
0

Hi there,

I am working on a Code Generator for programmatically generating SSIS 2008 packages. These packages will have various file sources viz. CSV, Text (Fixed Width), Excel. MDB etc. After transforming input data, it will be loaded into SQL Server 2008 R2.

Metadata (FileType, FieldNames, FieldDataTypes, etc) is used to generate these packages.

I am using following libraries for the same in my C# project:

  • Microsoft.SqlServer.DTSPipelineWrap
  • Microsoft.SqlServer.DTSRuntimeWrap
  • Microsoft.SqlServer.ManagedDTS

I am facing following  issues while adding "Script Component Transformation" in Data Flow programmatically.

1] Microsoft.SqlServer.Dts.Pipeline.CannotCreateUserComponentException: Cannot create user component class. Make sure there is one class marked with SSISScriptComponentEntryPointAttribute in your script.     at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.CreateUserScriptInstance()

This attribute exists for the class that is being added to script component.

2] The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.

There is no “PreCompile” option in SSIS 2008, the code is precompiled by default. But I might be missing something here.

When I try to click Edit Script button in generated package, I get following error:

1] Failed to create project at location:

C:\Users\<UserFolder>\AppData\Local\Temp\SSIS\<GUID>

The whole issue is related to “adding script code” to the component. I need some sample code for that.

The challenge here is that very limited technical help available online, and whatever available online is related to SSIS 2005.

Please provide any samples you have for implementing this particular requirement in SSIS 2008.

Your help is highly appreciated.

Thanks in advance.


SQL 2008 R2 SSIS integrate with SharePoint 2013

$
0
0

I created SSIS (SQL 2008) packages that works with SharePoint 2010 in the past. In my new job, I am working with SharePoint 2013 and SQL 2008 R2. I found two issues:

(1)   After I installed SSIS SharePoint List Adapter http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652, I do not see the SharePoint list option in the source or destination sections (I tried both 32 bit and 64 bit)?

(2)   Then I add Microsof.SharePoint to reference in the project. There is a yellow triangle with exclamation point next to the Reference and no SharePoint server object is available.

I just wonder is this a SQL version issue and do I need SQL 2012?  I really appreciate your help.

Many thanks

Command Prompt DTEXEC Vs. Scheduled Job

$
0
0

Hi Gurus,

I have a strange problem going. Any help/direction on this would be appreciated. The issue goes like this:

I have a package which fetches about 10M rows from Oracle (single table, no joins). I have created a Job and scheduled this package to run daily. However, I noticed that it takes about 4 hours for it to finish its work. I couldn't find anything to improve on time taken. While playing around, I ran the same package using dtexec utility from command prompt. To my surprise, the package finished in appx 15-20 minutes (I tried this multiple times. Same.)

So I changed the job to run a Command instead of SSIS Package. But when I do so, it again takes 4 hours.

Do note that the job is using my own windows credentials in form of proxy. I have already tried the 32 bit option. Playing around with buffers etc. No matter what I do, the results wont change.

Any Idea on what would make my package run faster via a scheduled job??

Thanks in advance.


Let me know if you have any more questions on this. Please mark this post as an answer if it helps you resolve your question. - Bhawesh


SSIS 2008 execute package task and SQL Job?

$
0
0

Ok I am just now discovering that the execute package task even exists, so forgive the newbie question.  So, if I want to run a package as a SQL Agent job, how does this change if I want to execute other packages?  Do they all get compiled as one job?

Edit SSIS packages with VS 2010 and older ms sql database

$
0
0
Hi,   My group believes that we can't move forward to VS 2010 to edit SSIS packages until we get to MS SQL 2012 databases.  I think that's wrong.  I installed a full SQL Server 2012 on a personal machine and I got the "new"  VS 2010 shell to edit and create SSIS jobs.   I think if I installed just the client tools for a SQL Server 2012 install I would get the VS 2010 shell and be able to edit the new SSIS packages.   I think I could link the newer SSIS packages to an ms sql 2008 database and the Oracle and Teradata db's we are using also.  In fact I think it would be easier because the later vsb 2010 SSIS uses 64 bit more.  Am I right?  The ms ql database version you are using does not have to be related to the version of SSIS you are using, right?

Convert DT_WSTR to DT_Datetimestamp

$
0
0

Hi I have vb6 code ("VALID_DATE") = FormatDate(Mid(Table_Fields(1), 85, 8)),for which i have converted it to SUBSTRING(Data_table,95,8)...

I want to convert SUBSTRING(Data_table,95,8) to (DT_DBTIMESTAMP) in derived column because my destination table has (DT_DBTIMESTAMP) as datatype.

Please suggest a solution..

Thanks in advance..

SSIS Lookup - Set values programmatically

$
0
0

For the SQL 2008 R2  SSIS Lookup Transformation, how do I get the 'Modify the SQL statement' checkbox to be selected programmatically? I can change it through the front end, but I can't find the property to change it programmatically.

As I set the properties:

.SetComponentProperty("SqlCommand", "SELECT [Lookup_Code], [Product_I] FROM [vSource]")

.SetComponentProperty("SqlCommandParam", "SELECT * FROM (SELECT [Lookup_Code], [Product_I] FROM [vSource]) [refTable] WHERE [refTable].[SUB_SYNM_C] = ? OR (SUBSTRING([refTable].[Lookup_Code], 1, 3) >= ? AND SUBSTRING([refTable].[Lookup_Code], 1, 3) <= ? AND SUBSTRING([refTable].[Lookup_Code], 4, 3) = 'XXX')")

As I need to use <= and >= comparisons.

But the checkbox is never ticked, can anyone please tell me what I need to do to tick the check box?

Kind Regards 

Rambabu.S


How to Use Variable in Sharepoint List source SiteURL property ?

$
0
0

Hi All,

Am using a Shrepoint List as a source in my DFT, i had provided SiteListName,SiteListViewName and SiteURL and it is working fine.

The siteurl is project specific one. I have some n number of databases. So i have used a Forloop container to loop through it. Am assigning the ProjectURL to a variable and using that variable in Sharepoint List source for SiteURL property. But am not able to do that it is throwing error to specify URL.

Am not able to assign variable to SiteURL property.

Hope i have explained clearly, if not plz ask.

Thanks,

Amit

Gettting warning :SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED

$
0
0

Hi all,

I'm a beginer with SSIS . When I executed package from SSIS , I got the warning :"SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors" .

Then I try to update : MaximumErrorCount to 4, but I got the warning again.

My Table test : ( It had 17 rows, this is a part of it )

Customer_codeSalary
1A123
23A12
3A10
3A15
5D5
6T

Conditional split : salary > 9 . When It finished, I received only 2 rows ( which is imported to SQL server) instead of 4 rows. Please help me to solve it .

Thanks you very much,

HongNgoc


Can I install SSIS 2008 R2 on a server where SQL Server 2012 SSIS is already installed?

$
0
0

Hello Experts,

Please let me know whether I install SSIS 2008 R2(only) on a server where SQL Server 2012 SSIS (full installation is done) is already installed

I had some packages which are running succesfully in 2008R2, the requirement is to run the same packages from another server which is 2012 SQL Server, the packages were failing, I tried upgrading using wizard, even though it failed because script component task!

Thanks in advance!


cannot see integration service node in SSMS 2012

$
0
0

I installed all the services of SQL server 2012 (database engine, ssis, ssas, ssrs) on  a sandbox with another existing version sql 2008 (db engine, ssis, ...)

The 2012 instances are named instances, and 2008 are default instances.

I read from this article: http://technet.microsoft.com/en-us/library/ms143731.aspx

it says after the second heading: You can install SQL Server 2012 Integration Services (SSIS) side-by-side with an existing instance of SQL Server 2005 Integration Services (SSIS) and SQL Server 2008 Integration Services (SSIS).

But in the table below: it says: You can only install one instance of the Integration Services service on a computer

This is confusing,

And when I connect to SSIS using SSMS, if default computer name, I connected to SSIS 10.50 which is 2008 version, there I cannot see the integration service catalog folder, but if I connet to the .\instance name, it will say doesn't support multi instances

Thanks


SQLFriend



Error while loading data in to fact table in ssis package

$
0
0


Hi,

     In my database we require 5 parameter tables and 2 transaction tables  to create cubes.

Here each table is having composite keys(i.e.2 or 3 primary keys). now i have to create a DWH with 5 dimension tables and 2 fact tables.

eg:

ABC table:(PARAMETER TABLE)

columns:

W,

X,(PRIMARY KEY)

Y,(PRIMARY KEY)

Z

and

DEF Table(Transaction table):

columns: P(primary key)

Q(primary key)

R(primary key)

S,

Y



To get a unique record from the table I need to  create composite keys for my dimension tables,If I create with composite keys it should perform more joins and performance will be poor when i create a cube

so i am loading the unique records in to dimension table with a new column (eg: T column ) and  created primary key(i.e surrogate key)  with  identity column for that table.

so  when  I am loading data in to my dimension table it was loaded successfully in ssis,

when I am loading the transaction table data in to fact table(i.e DWH) I  have created the new column T with foreign key and given NOT  NULL

But when I am loading the data to fact table my ssis package is failed with error.

error:cannot insert NULLS values in to the column

Can any one help me of what was wrong ?

Actually I should not get Null values,I should get the dimension table primary key values

Is this the better way or let me know if any better way to design my DWH and Cubes in ssas with good performance

Expecting Valuable Suggestions

Thanks & Regards

Praveen


SSIS called via sql job does not use defined configuration files!

$
0
0
Anybody knows how to handle this.

I deployed a SSIS.
Then I create a job in which I add the config files.

When running the SSIS, the config files used are the ones the developper was using instead of the ones defined in the job.

I tried, redeploying, redefining the config files, deleting and recreating both the job and the ssis.  Still, the config files I define are not used.  When looking at the sql generated, the files are the adequate ones.  However, at run time, I receive the message for a different file then the one defined:

If I script the job and look at the command I get:

@command

=N'/SQL "\Import" /SERVER SQLSVR
/CONFIGFILE "E:\Mssql\SSIS\Import\Configuration\LIVE\cnfg_Import_Properties.dtsConfig" 
/CHECKPOINTING OFF /REPORTING E'
,

When looking at the generated log file, I get:
OnWarning,SQLSVR08,GREGORY\IntServices,Import,{A08A9F3D-1DDB-4AAC-8791-371AD44D3B65},{3C719D08-E954-4396-A5B6-A76910E27ED9},1/6/2010 11:00:17 AM,1/6/2010 11:00:17 AM,-2147409902,0x,The configuration file name "C:\WD\Development\Main\SSIS\Import\Import\cnfg_Import_Properties.dtsConfig" is not valid. Check the configuration file name.

Is there something I can do to force the usage of the config file defined at the job level and to forget the one the developper was using on his local computer?

SSIS: How to handle values when using derived column

$
0
0

Hi everyone, My SSIS package finished when I used derived column to create FULLNAME column from Last_Name, Middle_Name, Last_Name. But something is not right exactly :

Here is my issues: (With expression : Last_Name + " " + Middle_Name + " " + First_Name)

Customer_CodeLast_NameMiddle_NameFirst_NameFULLNAME
1BÌNHNULL NULL
2CHỊLAN CHỊ LAN 
3caNULL NULL
4buihongtruongbui hong truong


Instead of :

Customer_CodeLast_NameMiddle_NameFirst_NameFULLNAME
1BÌNHNULL Bình
2CHỊLAN CHỊ LAN 
3caNULL ca
4buihongtruongbui hong truong

Please help me to solve it.

Thank you so much.


Outlook add in: How to create buttons which values are defined in a .txt file?

$
0
0
hi,
I'm creating an outlook add in with a custom command bar. I want it to create automatically several buttons which values and names depend on a .txt file, stored in Appdata\Roaming\param.txt
For instance, if in param.txt I've got type1,2, type2, 9... it creates 2 buttons type1 and type2 and when I click on it, it allows to add 2 and 9 hours to the email due date.
Does anyone have an idea
thanks for replying

SSIS Data flow task error -2146233033

$
0
0

What is error -2146233033?

I created a Data flow task that copy data from ADO Net Source to a flat file destination. I am redirecting the records with errors in another flat file. One of my records has error code -2146233033 and I can’t find the description for this code. I looked in MSDN library "Integration Services Error and Message Reference" , but it’s not there.

Loop on control flow so file loads in excel seperatly

$
0
0

Hi

I have one pre existing package which has source which exec a sp with parameters and dump that into excel file at a location now it is something like this,

exec [dbo].[sp_name]
 @planlist = '1,5,20'

so this is what we have in a source, and working great now the problem is we got some more plan ids like 4,27,28 and i have to built in one package only so it should be like loop like,

[dbo].[BHS_UP_PROVIDER_METRICS_PLAN_NETWORK]
 @planlist = '1,5,20' ---- takes this and load in one excel with given name

goes for a loop and 

[dbo].[BHS_UP_PROVIDER_METRICS_PLAN_NETWORK]
 @planlist = '4' ---- takes this and load in one excel with given name

then 

[dbo].[BHS_UP_PROVIDER_METRICS_PLAN_NETWORK]
 @planlist = '27' ---- takes this and load in one excel with given name

then 

[dbo].[BHS_UP_PROVIDER_METRICS_PLAN_NETWORK]
 @planlist = '28' ---- takes this and load in one excel with given name

and so on

now as you see planid could be single value or multiple...how to take care of this in a single package?


ANK HIT - if reply helps, please mark it as ANSWER or helpful post

Viewing all 24688 articles
Browse latest View live


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