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

XML Source - how to stream a 50GB XML file to a database?

$
0
0

Hi guys!

I have been trying to load a 50GB XML file (well, just a 1 "row" at first) in to SQL server via OleDB connection. It seems that this component does not stream the data, but tried to load it into memory - I have only 8GB, so that might be an issue.

Very few people will have 50GB mem on their development machines, so how do I get around this limit? Is there a streaming version of the XML source????

I did make a test with a 500MB subset version of the same file, and it worked just fine. All became green - with 50GB I do not even get to the "yellow stage". :-(

Thanks



SSIS Job returns different results

$
0
0

I have a SSIS package that queries password age of SQL accounts and send an email with the query results if rowcount >0. When I execute the package manually it returns 10 results and emails appropriately. However, when I let the agent run the job It sends the email with 0 rows. I pulled the tsql out of the SSIS package and ran it as a job using the TSQL and got the same result 0 rows.  Anyone know what me be causing this? I am trying to add the code block but the site doesn't seem to want to accomodate me.

Thanks


Deploy SSIS Package with Oracle ADO.Net Connectin

$
0
0

Hi ,

     I'm trying to deploy my SSIS package with Connection to Oracle Data base ,I'm getting the below error .

Description: ADO NET Source has failed to acquire the connection {ABC807A0-C8CB-4052-BEE5-A3B100798C2D} with the following error message:

"ERROR [28000] [Oracle][ODBC][Ora]ORA-01005: null password given; logon denied  

  ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed

  ERROR [28000] [Oracle][ODBC][Ora]ORA-01005: null password given; logon denied  ".  End Error 

Error: 2014-03-10 13:27:31.25     Code: 0xC0047017  

Can anyone guide me on this ,Thanks in Advance .


Anita

Using System::StartTime in variable for external file name comes out incorrect sometimes

$
0
0

Hi All,

I have an interesting dilemma.  I'm using SQL Server 2005 with Visual Studios 2005 (9.00.4035.00).

I'm writing records from my database table out to an external flat file, nothing fancy other than in the naming of the file being dynamic and using system time.  So I have a couple of variables set:

CR_Dir = \\host\directory\

CR_Outfile = "AP_" +  (DT_WSTR, 4)  YEAR( @[System::StartTime] ) + RIGHT("0" + (DT_WSTR, 2) MONTH(@[System::StartTime] ),2) + RIGHT("0" + (DT_WSTR,2) DAY( @[System::StartTime] ),2) + RIGHT("0"+ (DT_WSTR,2) DATEPART("Hh", @[System::StartTime] ), 2) + RIGHT("0" + (DT_WSTR,2) DATEPART("mi", @[System::StartTime] ),2) + RIGHT("0" + (DT_WSTR,2) DATEPART("ss", @[System::StartTime] ),2)+ "_chref"

And then in my Connection Manager properties I have an expression that brings them all together with a file extension:

@[User::CR_Dir] +  @[User::CR_Outfile] + ".ctl"

So what I should get for example is something like AP_20140309214502_chref.ctl  (if the job was run on 03/09/2014 @ 9:45pm) When executed properly.  I do this for two flat files one with an extension of .txt and the other with .ctl.  These steps are working fine the majority of the time.

However, my problem is that occasionally, the portion of the filename that contains the datetime stamp is completely incorrect for one of the two files that are created during the same time frame.  And I'm not talking about a few seconds or even a minute or two, the date is off by weeks.  Here's an example:

AP_20140309214502_chref.txt

AP_20140213152253_chref.ctl

This has happened twice since starting to run this job over the past four months, once on 12/15/2013 and again 03/09/2014.  This job is run every night at 9:45pm, and all the other days that this job runs the two filenames come out perfectly.  So I'm leaning towards something in the system that may be corrupting my variable every once in a while?  But because it happens intermittently how can I verify this?  Or is there a better way to perform what I'm trying to do that would be more accurate and consistent?

Any help would be appreciated.

Thanks


Sawyer

Create a status bar inside SSIS C# Script?

$
0
0

I am moving rows from one table to another using a C# script. Please don't tell me to use SSIS components for that. I am looping the incoming dataset using a for loop and I want to see the current iteration, ie for loop index in a GUI box. I can useMessageBox.Show("Text"), but I need to press ok/cancel to allow the code to continue. So, I thought of using a status bar instead. I tried an example I got online - http://www.c-sharpcorner.com/uploadfile/mahesh/statusbar-in-C-Sharp/

The line this.Controls.Add(mainStatusBar); in the example (below) causes the error -

csproj.ScriptMain' does not contain a definition for 'Controls'
and no extension method 'Controls' accepting a first argument of type '.csproj.ScriptMain' could be found (are you missing a using directive 
or an assembly reference?)

This happens despite adding the reference - System.Windows.Forms.dll and doing a save all (ieCtrl+Shift+S). The script has a import using System.Windows.Forms; already.

Why am I getting this error and how do I fix it ?

Code -

protectedStatusBar mainStatusBar =newStatusBar();protectedStatusBarPanel statusPanel =newStatusBarPanel();protectedStatusBarPanel datetimePanel =newStatusBarPanel();privatevoidCreateStatusBar(){// Set first panel properties and add to StatusBar
    statusPanel.BorderStyle=StatusBarPanelBorderStyle.Sunken;
    statusPanel.Text="Application started. No action yet.";
    statusPanel.ToolTipText="Last Activity";
    statusPanel.AutoSize=StatusBarPanelAutoSize.Spring;
    mainStatusBar.Panels.Add(statusPanel);// Set second panel properties and add to StatusBar
    datetimePanel.BorderStyle=StatusBarPanelBorderStyle.Raised;
    datetimePanel.ToolTipText="DateTime: "+System.DateTime.Today.ToString();
    datetimePanel.Text=System.DateTime.Today.ToLongDateString();
    datetimePanel.AutoSize=StatusBarPanelAutoSize.Contents;
    mainStatusBar.Panels.Add(datetimePanel);

    mainStatusBar.ShowPanels=true;// Add StatusBar to Form controlsthis.Controls.Add(mainStatusBar);}privatevoid button1_Click(object sender,EventArgs e){
    statusPanel.Text="Button is clicked.";}privatevoid checkBox1_CheckedChanged(object sender,EventArgs e){
    statusPanel.Text="CheckBox is checked.";}privatevoid textBox1_TextChanged(object sender,EventArgs e){
    statusPanel.Text="TextBox edited.";}

Array of string into a variable in SSIS

$
0
0

Hi Guys need urgent help....

I have a query, For example, Select * From Employee Where Employee ID In (2,3,4..)

This I have to use it in a ole db data source to get the data from a view based on the condition of Employee ID.

I selected Data Access Mode as Sql command mode and entered the command as 

 Select * From Employee Where Employee ID In ?

 

Now I have to pass variable as 1,2,3,4

When I do this, only the first value before the first comma is passed as variable.

How do I pass this array of string as variable for the sql command.

Thank You

 

 

 

 

 

 


Oracle sp call works with MSDAORA but not with OraOLEDB.Oracle linked server: ORA-01801.

$
0
0

I am calling an Oracle stored procedure using the OraOLDDB.Oracle provider which is returning an ORA-01801 error. It only returns this error on one of three Oracle servers that I have tested. The stored procedure works fine on the other servers. The servers are running nearly identical databases. The stored procedure is the same on all servers. It simply does a select from one table and an insert passing sysdate to a date field on another table, nothing complex. If I use Oracle's SQL Developer or MSDAORA then the stored procedure works fine on all servers.

The issue occurs when calling the stored procedure from SQL Express 2005 or 2012 on my 64-bit PC. It also occurs when calling the stored procedure from two other PCs running SQL 2012. I am able to run other queries and stored procedures on the problem server. Again, it does not occur on any of these PCs when calling it on the other two Oracle servers. I do not have rights to modify the stored procedure or create a new one.

DECLARE @lInsertResult VARCHAR(300)
SET @lInsertResult = NULL
EXECUTE ( 'begin SP_TRACE_DELETE (?,?,?); end;',  N'Z077213261731645', N'd', @lInsertResult OUTPUT) AT IPC_SERVER

Is SSRS installation and deployment always a hassle ?

$
0
0

I have used many tools from different big corporations such as MS. I have faced small issues here and there in the installation. But, SSRS wins the award for being the most painful. I have been trying to install it on my local system for learning SSRS for a long time. I have had several issues which were sorted out through google searches. Now, it looks like I have reached a dead end. I am wondering if this tool is even worth using ? Do I really need to hire a $200/hr consultant to install SSRS on my computer for learning ? 

In case you are interested, here is the question - 

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/767e903e-277c-4e55-b633-44b6cd600fb5/fixing-the-cryptic-ssrs-error-rsserverconfigurationerror?forum=sqlreportingservices#767e903e-277c-4e55-b633-44b6cd600fb5




Use SSIS 2012 but not MS Sql 2012 db

$
0
0

Hi,  Our group wants to use SSIS 2012 but stay on MS Sql 2008 for database.  I am very confident I could use the  Sql Server 2012 Developer copy I bought from amazon to run ssis 2012 on my laptop and access our ms sql 2008 databases.   But when I had a job finished and wanted to put in in production, we generally run ssis on the servers that our database machines are on.   So here are some questions:

- Can you install just the dtexec part of ssis 2012 without the rest of ssis on a server?

- Does installing ssis 2012 on a server require that the ms sql 2012 database be there so ssis 2012 can save objects somewhere?

- can ms sql 2012 database and ms sql 2008 database run on the same server at the same time?

- If all I wanted to install was ssis 2012 on the server,  would I have to buy a full ms sql 2012 db license to be able to do that?

Thanks.  ssis 2008 is running into problems of drivers for Oracle and all the 32 and 64 bit stuff.  It would really be nice to just start clean with ssis 2012.

Need help with expression builder issue

$
0
0

Hi all

I'm hoping someone can help with an issue I'm having. I'm creating a database for a manufacturing joinery. For 1 of my forms, Ive to create a despatch form which includes order details along with customer details. Some customers can have contracts in which they get a fixed price on certain item. This is where the problem lies.

For my customers table, I have a field called "On contract" which is a Yes/No field. I've created a query to attempt to make this form. I'm having trouble with adding a total column at the end of this query. Quantity,Unit Price, Contract Price are also in the query. I've been trying to build an expression to say like;

iif [on contract] = "Yes", [Quantity] * [Contract Price]

iif [on contract] = "no", [Quantity] * [Unit Price]

It obviously wont work, what am I doing wrong?

Thanks in advance

SSIS: Input Excel File Name (Includes Report Date) From Dir Into Relative ReportDate Column of Existing Table in SQL-Server

$
0
0

I have a directory of Excel files that includes the date in the file name; they represent reports. I have already imported all the data into sequel server from the excel files but need to attach the date from the File Name to each of those records that were imported into Sql-Server.

Example Dir List.

A_201008.xls
A_201009.xls
A_201010.xls.........

The following is my C# ScriptTask to fill an array of File Names:

usingSystem;usingSystem.Data;usingMicrosoft.SqlServer.Dts.Runtime;usingSystem.Windows.Forms;usingSystem.IOpublicvoidMain(){// TODO: Add your code herestring[] files =Directory.GetFiles(@"\\S\Apps\Files\", "A*.xls*", SearchOption.AllDirectories); int Flag = 0; string dir = @"\\S\Apps\Files\";string[] files1;int numFiles; files1 =Directory.GetFiles(dir); numFiles = files.Length;for(int i =0; i < numFiles; i++){string file = files[i].ToString();int file1 = file.IndexOf(dir,StringComparison.CurrentCultureIgnoreCase);if(file1 !=-1){MessageBox.Show(file);Flag=1;}}

if(Flag==0){MessageBox.Show("No Matches Found");}Dts.TaskResult=(int)ScriptResults.Success;}

The MsgBoxes are the just for testing the script and will be removed.

My question is this. What is the protocol in SSIS to grab the File Names from my array to insert them in the relevant rows of my table in SQL-Server?

Please Note that I already know what to do to trim the file names for the date.

Thanks


how to fix "cannot convert between unicode and non-unicode string data types" :/

$
0
0

Environment: SQL Server 2008 R2
Introduction:Staging_table is a table where data is being stored from source file. Individual and ind_subject_scores are destination tables.
Purpose: To load the data from a source file .csv while SSIS define table  fields with 50 varchar, I can still transfer the data to the entity table/ destination and keeping the table definition.


I'm getting validation error "Cannot convert between a unicode and a non-unicode string data types" for all the columns.

Please help

Derived Column SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR

$
0
0

Hi in visual studio 2012, I had a derived column with the expression: 

"(" + SUBSTRING(Ethnicity,(FINDSTRING(Ethnicity,"(",1) + 1),(FINDSTRING(Ethnicity,")",1) - 2)) + ")"

It was working fine, and esentally it was striping out every think that was not words in parentheses to leave (xxxx). however i noticed that the length of the columns was not correct so i repointed the flat file connection manager to the csv data source and it now showed that it had pulled 5170 rows instead of the 2700 out from the csv, however a error is now occurring at derived column 2, and the error message is not that helpful when your a noob at SSIS

[Derived Column 2 [11]] Error: An error occurred while evaluating the function.

[Derived Column 2 [11]] Error: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR.  The "Derived Column 2" failed because error code 0xC0049067 occurred, and the error row disposition on "Derived Column 2.Inputs[Derived Column Input].Columns[ReadCode]" specifies failure on error. An error occurred on the specified object of the specified component.  There may be error messages posted before this with more information about the failure.

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Derived Column 2" (11) failed with error code 0xC0209029 while processing input "Derived Column Input" (12). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.  There may be error messages posted before this with more information about the failure.

Can anyone help?



SQL Server linked server to Oracle

$
0
0

We have a SQL Server instance with a linked server to Oracle 9i.  When doing a select * (from Oracle) into some_table everything works as expected.

There is a project to move the SQL Instance to a new clustered server.  We confirmed that the OS, SQL and Oracle Driver versions are the same.  The problem is that when we run the exact same statement the table is being created with unicode columns.

For Example:

Oracle

Col1 Varchar2(20),

Col2 Varchar2(100)

Select into on current SQL Instance creates

Col1 Varchar(20),

Col2 Varchar(100)

Select into on new SQL Instance creates

Col1 NVarchar(20),

Col2 NVarchar(100)

Any help to identify how to resolve this issue?

Thank You,

Michael

Import & Export Wizard

$
0
0
How i can enter data in multiple tables using import and export wizard. Thx

FTP Task but with limited transfer speed, is this possible ?

$
0
0

Hello,

we have a remote WAN location with limited network bandwidth, I want to run a package there to copy files from server FTP but to limit the file transfer to say 5K/s not to kill the bandwidth for other tasks already running and connecting to server

is there anyway to do this ?

Thank you

Bassam

loading data in sql server using flat files

$
0
0

Hi ,

I have a flat file which has a column delimiter as ctrl A  which is shown as SOH in notepad ++.

I want to know if this flat file can be loaded in Sql server usgin SSIS.

If yes then what is the column delimiter which I need to provide my connection .

Please help

THanks in advance

Enable / Disable SSIS execute process task from Script task

$
0
0
anyone please please copy the code to Enable / Disable SSIS execute process task from Script task
Ramana

SSIS - OLD DB Source (data access mode)

$
0
0

if i add a OLD DB Source to data flow control. after i select the connection manager, if i choose "SQL Command from variable" from the data access mode.

how can i pass the vaiable to the parameter? or what is difference between "SQL command from variable" and "SQL command"?

UnPivot in the foreach loop container

$
0
0

Hi

I would like to "unpivot" SEQUENTIALLY each row in a table

Before the pivot task in the foreach loop container how to read sequentially each row ?

1/ from a PK ?

2/ from parameters with a WHERE field1 = ? and field2 = ? and field3=?....

These parameters have been set up prevoiouly in the loop

3/ Others ? ...

Thx for your help

Viewing all 24688 articles
Browse latest View live


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