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

MSSQL 2008 Precision Problem

$
0
0

Hello everyone,

I have a problem about precision range in MSSQL 2008. I am trying to transfer data from Oracle db to MSSQL db. One column in Oracle db has a precision larger than 38, which is '76.43448990049567164100213185805651059565'. Therefore, I give an execution error like;

Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver]The number, 76.43448990049567164100213185805651059565, has a precision larger than allowed by the SQL Server.

What can I do at this point? Please help me

Thank You


how to get return values from stored procedure to ssis packge?

$
0
0

Hi,

I need returnn values from my stored procedure to ssis package -

My procedure look like  and ssis package .Kindly help me to oget returnn value to my ssis package

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE [TSC]
	-- Add the parameters for the stored procedure here
	@P_STAGE VARCHAR(2000)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	--SELECT <@Param1, sysname, @p1>, <@Param2, sysname, @p2>
	truncate table [INPUTS];
	INSERT 
	INTO 
	[INPUTS_BASE]
	SELECT 
	[COLUMN]	
	FROM [INPUTS];
	RETURN 
END

and i am trying to get the return value from execute sql task and shown below
and i am taking my returnn value to result set variable

SSIS:name PasswordVerifier

$
0
0

Hi,

In the SSIS project file (.dtproj) we have a property called PasswordVerifier like below:

<SSIS:Property SSIS:Name="PasswordVerifier" SSIS:Sensitive="1">AQAAAN...</SSIS:Property>

The project has the protection level set to EncryptSensitiveWithUserKey.

The weird thing is that the value of property is changed even if the project is open only by the same person (so it is the same user profile). This new value is causing a check-out at source control level which is very annoying.

Any idea how to avoid this behavior?


Daniel

split by & based on column name

$
0
0

I have 4 rows in 'dataset' table in 'result' field and it is seperated by ampersand (&). I want to divide one field into multiple fields based on field name. How do I do this in SSIS? I'am ok to do this using sql. Fieldname are higligtened. It would be nice it can be doable without .net script

Result
deptid=1 & firstname=din & lastname=kal &   middlename=kum
firstname=raj & lastname=puli &  middlename=kumar & deptid=2
firstname=pavan & lastname=gud & middlename=kumarrao
deptid=7 & firstname=sha & lastname=hank

Output

deptidfirstnamelastnamemiddlename
1dinkalkum
2pulirajkumar
 pavangudkumarrao
7shahank 

connectiong to SQLServer in script component (SSIS)

$
0
0
Hi

I'm very new to SSIS but can't find the answer to this anywhere.

I'm simply trying to connect to a SQLServer database from within a script component.

I am doing this using a [Native OLE DB\SQL Native Client] connection manager which i've added to the script component and called it SQLconnection.

this is the code:

Dim SQLconnMgr As IDTSConnectionManager90 = Me.Connections.SQLconnection

Dim SQLConn As sqlClient.SQLConnection = CType(SQLconnMgr .AcquireConnection(Nothing), sqlClient.sqlConnection)

The first line is fine...but I get this error in the second line:

[ Unable to cast COM object of type 'System.__ComObject' to class type 'System.Data.sqlClient.sqlConnection'. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface. ]

Can anyone help? I'm totally stuck

thanks!

andy

SSIS Import Flat File to SQL: reuse source columns to populate SQL table

$
0
0

I have flat file come from external.  The source fields are breaking into "atomic " such that the destination table will have to assembly into column. E.g.

CustomerLastName = Column 2

CustomerFirstName = Column 1

CustomnerEmail = Column 1 + "." + Column 2 + "@ourcrop.com"

CustomerID = Column 1 + Column 2 + Column 5

...

Is there a way to reuse the columns in SQL mapping?


emptying a folder using SSIS script task

$
0
0

Hi Guys,

I am generating reports to a directory (folder), via ssis script task and C#.. I want to validate the following..

1. Deleting all old reports except last 10 reports. My report name for example is Report_DDMMYYYY

2. If current report already exists then I want to overwrite that report every time if i run the ssis script task (which exists in a foreach loop container) manually.

I am using Streamwriter to dump the data into a flatfile report.

Thanks.

 

i have one column in that column i have numeric and string data but i want to load only numeric data

$
0
0

Hi all

I am new to ssis I have one column in that column i have numeric and string data but i want to load only numeric data into 

destination .for example

table1 

id

1

2

3

a

dc

output 

---------------------

1

2

3

but this task i want to due in ssis.


dimension merge transformation for sql server 2012

$
0
0

Hi,

Has anybody tried Dimension Merge (former Kimball SCD) for SQL Server 2012?

Thanks.


Remember to mark as an answer if this post has helped you.



SSIS job performance issues

$
0
0

Hi,

I have an SSIS job that runs a view and the data output from that view is populated into a table on a different database on the same server.

Until about two weeks ago this was taking less than 45 minutes to run but it now takes over 9 hours.

So far in my investigation it seems that the slow part of the process is in the populating of the data into the table on the other database. When I run the view query on it's own it completes in 57 seconds.

How do I investigate this and hopefully speed it up?

Oh, by the way I'm using SQL Server 2008 R2

Thanks

Paul

Strange - oledb data source preview shows results, but running results in 0 records

$
0
0

So I have this as a command of a OLEDB source, and the preview shows a sample result set.  Mappings are correct, builds with no errors etc.  Works fine in SSMS. However, when I run this Dataflow task in SSIS, I get NOTHING.  Huh?

Here is the query

DECLARE @StartTime datetime,@EndTime DATETIME, @ExecTimeMS INT
SELECT @StartTime=GETDATE()

DECLARE @t TABLE (tval NVARCHAR(30) )
INSERT INTO @t SELECT TOP 10 t.control_number FROM MyBigTable t

SELECT @EndTime=GETDATE()
SELECT @ExecTimeMS = DATEDIFF(ms,@StartTime,@EndTime) 
SELECT CAST('Top10LogBigTSelect' as NVARCHAR(100)) as query_name,@ExecTimeMS as exec_time_ms, GETDATE() as record_date

Visual Studio does not recognize Integration services being installed Sql Server 2008 R2

$
0
0
I am trying to modify .dtsx packages that we run daily in Visual Studio. However when I select edit all I get in Visual studio is an error that says integration services needs to be installed. I already have integration services installed though im not sure why Visual Studio does not recognize that.

Compatibility raw file from sql server 2012 to sql server 2005

$
0
0

Hi all I got a SSIS which creates40Raw file, from a SQL SERVER 2012 instance.

I try to load files in SQL SERVER 2005, using a 2005 SISS, but got this error:

"The file had bad version and flags information. the file is damaged or not a SSIS-produces raw data file"

I think is an backward compatibility error.
How is it possible manage RAW from 2012 directly in a SSIS 2005?
Do I haveto convert my import SSIS for an SQL Server 2012 istance for using native 2012 raw file?

Thanks, Alen

Italy

Powershell 3.0 script misbehaves when launched by SQL Agent job in SQL 2012

$
0
0

I have a Powershell 3.0 script that runs fine from the PS prompt on Windows 2008 R2, but when I execute it through an SQL Agent job in SQL 2012 I get different behavior.  I was launching it as a powershell step, but since I was using features of 3.0 that didn't work, so I started launching it as a CMD job where I started Powershell with the script as an argument.  The script runs to a point, but then goes astray.  The script encrypts flat files created by an SSIS package then deletes the flat files and moves the encrypted versions into an archive folder.  When run from the Powershell prompt it works fine, but when run as a step in SQL Agent, it completes much faster than from the prompt and the files disappear.  I can see the encrypted files being created, so it seems to get that far, and then all the files suddenly disappear.

The paths are set outside the function and they look fine, and the files to process are passed in as an array.  When running from SQL I found I had to hard-code the file paths to make it work, which is another minor issue.  I have include the function below.

Thanks in advance for any help you may be able to offer.

Function ArchiveFiles([string[]] $files)
{
# Path to executable
$exe = "C:\Program Files (x86)\GNU\GnuPG\gpg2.exe"

try
{
foreach($file in $files)
{
# Add command line arguments to an array, then execute the app with the array
$CmdArgs = "--batch", "--yes", "--encrypt", "--recipient", "info@exacttarget.com", ($file)
& $exe $CmdArgs

# Delete the clear-text source files from the current folder
Remove-Item -path $file

            $file += ".gpg"

# Move the encrypted files into the archive folder
Move-Item $file $ArchivePath -Force
}
Return $True
}
catch
{
Return $False
}
}# End ArchiveFiles()

 

Multi records import

$
0
0

Hi All,

I am cleansing data. The source table is:

ID, DATE, COMMON_NUMBER,PRICE
1, 02/01/2013, 001, 20
2, 02/01/2013, 001, 10
3, 02/01/2013, 001, 25
4, 03/18/2013, 002, 5
5, 03/18/2013, 002, 10

How can I make my Destination table as:

ID, DATE, COMMON_NUMBER,TOTAL
1, 02/01/2013, 001, 55
2, 03/18/2013, 001, 15

I have the details in another table (with common fields with source table) but sometimes it is missing the price. Can I update the price of the details table at the same time?

Thanks


How to insert VBscript in Script task in SSIS for Format Excel-columns?

$
0
0

I want to format the Excel columns by My macro code( it is VB)

the code is

SubDBMatch_InputFormat()'
'Macro recorded 8/8/2011by ngrant'
    Columns("A:G").Select
    Selection.NumberFormat = "@"
    Columns("G:G").Select
    Selection.NumberFormat = "mm/dd/yyyy"
    Columns("H:H").Select
    Selection.NumberFormat = "mm/dd/yyyy"
    Columns("I:I").Select
    Selection.NumberFormat = "#,##0.00"
    Columns("J:M").Select
    Selection.NumberFormat = "@"
    Columns("N:N").Select
    Selection.NumberFormat = "mm/dd/yyyy"
    Columns("O:AO").Select
    Selection.NumberFormat = "@"

    Set currentWorkSheet = ActiveWorkbook.Worksheets(1)
    usedRowsCount = currentWorkSheet.UsedRange.Rows.Count
    
    For Row = 1 To (usedRowsCount)
    Cells(Row, 42).Value = "1"

    Next Row

End Sub

I want to insert in Sript component-Edit Script

File path+name and Sheet:"C:\Users\Healthcare\Desktop\DB_INPUT_12162013.xls"  and Sheet1

Can u guide me on Readonly variable: ?

                            Readwrite variable ?

                           Please provide Edit script (by consider above code) ?

Please help me.

Thanks

-MADHU

Script task edit on visual studio 2008 Integration Services project fails

$
0
0

I installed BIDS from SQL Server 2008 R2 installer. I have .Net Framework 3.5 SP1 and sql server 2008 R2 with SP2.
I also have BIDS 2010 and sql 2012 installed on the same machine, which is working fine.

I created a new SSIS project on Visual Studio 2008 and added a script task to the control flow. I added User::test in the read only variables list. When I click on edit script I get the error copied below. The MSDN forum (http://blogs.msdn.com/b/jason_howell/archive/2010/08/18/vsta-setup-and-configuration-troubles-for-ssis-2008-and-r2-installations.aspx) suggested to uninstall and re install SQL Server 2008 to fix this problem, which I did, but it did not fix the problem. What needs to be done to fix this problem?

Is there a way Microsoft tech support can check my installation via webex to help fix it?

Error:
"
Error: TITLE: Microsoft Visual Studio
------------------------------

Cannot show Visual Studio 2008 Tools for Applications editor.

------------------------------
ADDITIONAL INFORMATION:

The VSTA designer failed to load:  "System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at VSTADTEProvider.Interop.VSTADTEProviderClass.GetDTE(String bstrHostID, UInt32 dwTimeout)
   at Microsoft.SqlServer.VSTAHosting.VSTAScriptingEngine.EnsureDTEObject()" (Microsoft.SqlServer.VSTAScriptingLib)

------------------------------
BUTTONS:

OK
------------------------------

"

Thanks for your help.

The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

$
0
0

 We developed a SSIS Package to pull the data From Oracle source to Sql Server 2012. Here we used ADO.Net source to pull the records from Source but getting the below error after pulling some 40K records.

  [ADO NET Source [2]] Error: The ADO NET Source was unable to process the data. ORA-64203: Destination buffer too small to hold CLOB data after character set conversion.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. 
 The PrimeOutput method on ADO NET Source returned error code 0xC02090F5. 
 The component returned a failure code when the pipeline engine called PrimeOutput(). 
The meaning of the failure code is defined by the component, 
but the error is fatal and the pipeline stopped executing. 
 There may be error messages posted before this with more 
information about the failure.

Anything that we can do to fix this?


Reason to set MaxErrorCount along with Propogate value for Excel Files

$
0
0

Hi,

I had an ETL earlier which processed CSV files from a folder. The requirement was to load the error files into a Rejected folder but continue to process all the files from the source Folder. This requirement was satisfied by setting the value of the system variable "Propogate" in EventHandler section for DataFlowTask to "false".

MaxErrorCount value for the ForEach Loop is having its default value as "1".

When tested, it was working perfectly fine

Now currently there is an Excel file as source having same requirement as above. But even when then variable "Propogate" was set to "false" as above, the execution was getting stopped when an error file was found.

Later I found the below link :

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/0065b5c2-f633-4cbf-81f9-031d1ed25555/how-to-skip-wrong-excel-files-ignore-errors-on-ssis-foreach-task

As mentioned in the link, I have done below changes

1)Set MaxErrorCount for ForEachLoop to 1000

2)"Propogate" variable is set to false

Now this is working perfectly fine.

Can you please let me know why did the setting of "Propogate" worked for CSV but did not work for Excel. For Excel files why was an additional setting for MaxErrorCount  was required.

It would be very much helpful if I can get a detail information on the above

Thanks,

Raksha


Raksha

Creating snapshot table:

$
0
0

Hi,

Too start off, as part of a new project i have been given a query that i'm able to run in SQL Server Management Studio, this query uses 'MSDB' database to produce a current result of various job's status that run on a daily basis. It produces columns such as 'JobName', 'LastRunDate', 'CompletetionTime', 'LastStepRun', 'LastStepOfJob', 'StatusOfLastStepRun'. To do this it creates a tempory table and drop's it at the end. - This is to give you an idea of what i wan't.

Now i have been tasked with creating an SSIS package to create a snapshot table of this, which would then create a view which i will eventually make a report out of using SSRS, which would then be put on a SharePoint site which is currently under construction by members of my team.

This is the issue i have: My experience of SSIS is very limited, only to the point of troubeshooting minour packages run on a monthly basis. Is the logic i have been given even possible? if so, how would i go about doing this? Is there certain things that i should watch out for? Even if you can point me in the right direction that would be great!

Please help!

Many Thanks,

Plain_Clueless


Plain_Clueless

Viewing all 24688 articles
Browse latest View live


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