SQL Server BIDS OLE DB inputs - sql-server

I have a a script component and an OLE DB destination. My script has 3 columns to return. How do I map each of these 3 columns to the OLE DB destination?
Whenever I drag a connector from the script component to the OLE DB, it makes me select exactly 1 output column. When I try again with another output column, BIDS tells me that there are no available input columns to the OLE DB destination.
Is it possible to have more than one input to an OLE DB destination?
Thanks,

You need to create the output columns in Script transformation .In the input and Output tab expand Output0 and specify the columns which u want .

Related

Move Image column from OracleDB top SQL Server

I have access to an Oracle database and I need to bring its data into SQL Server. The table has a simple structure and I can't change anything on the Oracle side.
I created a linked server inside SQL Server but I can't select the table because of this error :
The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column. The column (compile-time ordinal 1) of object was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 0 at run time
The OLE DB provider "OraOLEDB.Oracle" for linked server supplied inconsistent metadata for a column. The column (compile-time ordinal 1) of object was reported to have a "DBCOLUMNFLAGS_ISFIXEDLENGTH" of 16 at compile time and 0 at run time
I checked and it seems to be a general problem and Oracle suggested using OPENQUERY to get data from these tables.
When I use OPENQUERY the IMAGE ( 'BFILE' ) column is null but I can see in SQL Developer that it is not null.
When I use SSIS, I get this error:
ADO NET Source [33]] Error: The error "ORA-00972: identifier is too long occurred while processing "ADO NET Source.Outputs[ADO NET Source Output].Columns[IMAGE]
Any ideas on how to move a table with an IMAGE (BFILE) column from Oracle database to SQL Server?

No column information was returned by the SQL command. SSDT

I'm attempting to create an update query in SSDT. I'm getting
Unable to parse query text.
The query is:
UPDATE CustOrderWithDisp
SET YARDS = CustOrderWithDisp.QUANTITY * Lkp_TestCodes.[Test_GALS] * 0.00495113
FROM CustOrderWithDisp
INNER JOIN Lkp_TestCodes
ON CustOrderWithDisp.TEST_CODE = Lkp_TestCodes.[SVC CODE]
But if I actually run the query, it works.
I want to use this query in an SSIS package. When I put this query in an OLEDB Source, i get...
The component reported the following warnings:
Error at qry03_CalculateYards [OLE DB Source [33]]: No column information was returned by the SQL command.
I'm a novice at this, so be gentle. Your help is greatly appreciated!
Error at qry03_CalculateYards [OLE DB Source [33]]: No column information was returned by the SQL command.
You are receiving this message because OLEDB Source is a DataFlow Task component, it is used to read data from an Table or SQL Command through an OLEDB Connection.
The OLE DB source extracts data from a variety of OLE DB-compliant relational databases by using a database table, a view, or an SQL command. For example, the OLE DB source can extract data from tables in Microsoft Office Access or SQL Server databases.
You don't have to put this query in an OLEDB Source, you have to use an Execute SQL Task and write this query in the SQL Command property.
For UPDATE queries you have to use Execute SQL Task (in the Control Flow level, no in the DataFlow)
The Execute SQL task runs SQL statements or stored procedures from a package. The task can contain either a single SQL statement or multiple SQL statements that run sequentially.
References
Execute SQL Task
OLEDB Source

SSIS Dynamic Connections, SQL Server names stored in a table

This is my first packet so please let me know if I need to put in more information. I have a database with a table on all my production server, Utility DB and WaitTable. And I have a the same Database and table on a Central destination server on the destination server I also have a table with servernames. So what I need to do is following: create a connection string from servernames in my table on destination server. Connect to all production (source) server and transfer data to my central destination. I have search alot on internet and find articles about this but there is something I have missed, because the SSIS packet works great but i won´t transfer any rows :(
I have 2 connection managers
Connection Source - Have a expression property "connectionString with expression #[User::DemoSQLConnectionString].
LocalHost.test - is connencted to destination server test database
Control Flow, Result of Packet and Variables
Execute task, foreach Loop and Connection managers

Component OLE DB source has no input

I am new at doing SQL server data tools on VS 2010. However what I try do is:
I have created a textfile and imported it as a flatfile
I try to connect the flat file (with the green arrow) with a OLE DB but get the error:
Component OLE DB source has no inputs, or all of its inputs are
already connected to other outputs. You may be able to edit the
component to add new inputs to it.
Why do I get this error?
When I open the flat file a have diffrent rows and data in it, so there actually exists data :/
you need to connect to an OLE DB Destination not source

SSIS Runs Okay Individual Tasks, Not Together

I have a simple SSIS Project. In the control flow I have three steps:
Step 1: Select Data from Db1.Table1
Step 2: Create Table2 in Db2
Step 3: Copy Data in Db1.Table1 to Db2.Table2
If I "Execute Task" one by one in order, it executes fine...but if I try running the entire project I receive the following error:
Error at Copy Data from Table1 to DB2 dbo Table2 Task [OLE DB Destination[40]]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E37.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80040E37 Description: "Invalid object name 'DB2.dbo.Table2".".
The issue was with the validation. On child tasks by default DelayValidation is disabled. Since the second step creates a table which is in the third step populated with the data pulled in the first step, there is a validation error. SSIS looks for the table and it doesn't exist. By enabling DelayValidation it operates fine - since it doesn't force the tables to be in existence before executing.
Your control flow makes no sense to me. There is no reason at all to havea step that only selects records. When this runs as a job who would see it and if you aren;t doing anything with them then why select.
If you are doing no cleanup or transformations why are you even using SSIS? Wouldn;t a t-sql stament of
SElect into table2 from table1 be sufficient? Of course this is problem if running more than once, so I would probably write a script to create the table if is doesn't exist, truncate it is does (I'm assuming you are replacing the data here) and then insert into it.

Resources