Showing posts with label quot. Show all posts
Showing posts with label quot. Show all posts

Wednesday, March 21, 2012

Problems connecting to "(LOCAL)" from SSIS

I've recently moved from June CTP to RTM. I'm now having a problem connecting to the (LOCAL) server in SSIS via a Native OLE DB\Microsoft OLE DB Provider for SQL Server connection. The error is:

Test connection failed because of an error in initializing provider. [DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access denied.

I'm connecting with Windows Authentication, and I can connect to (LOCAL) with Windows Authentication via Management Studio. If I change the server name to the actual name of my development box then it will connect. I'd like to use (LOCAL) though so it's easily portable between different development environments.

Anyone have any ideas?This is not an SSIS problem; the underlying OLE DB provider is evaluating server names.

Have you tried with "localhost" or "."?

Thanks.|||This doesn't appear to work unless you have TCP/IP enabled. It is disabled by default. It seems that "(local)" no longer forces the use of Shared Memory.

-Doug

Monday, February 20, 2012

Problem with Union ALl

I want to combine 4 columns and map those 4 to respective fileds in the target database.For this..when i used "Union All " its going for cross join and filling the columns with Null vlaues..
Like If each column has 5 rows ,iam getting (4* 5 =20) 20 rows

Is there any solution to avoid for this and to get the 5 rows?

Thanks
Kumar
sorry small mistake . when using UnionAll getting output like this

Like If each column has 5 rows ,iam getting (5+5+5+5)= 20 rows instaead of 5

|||

That's what its supposed to do. What exactly is your requirement?

-Jamie

|||

Sounds like you should be using the Merge Join transformation

from BOL:

The Merge Join transformation provides an output that is generated by joining two sorted datasets using a FULL, LEFT, or INNER join. For example, you can use a LEFT join to join a table that includes product information with a table that lists the country/region in which a product was manufactured. The result is a table that lists all products and their country/region of origin

|||I need only 5 rows with out any null values (making sure that there is no null values in the source)

when i combine ..iam getting ouput like

ID FirstName LastName
1 Null Null
2 Null Null
3 Null Null
Null Kumar Null
Null Jackson Null
Null Tom Null
Null Null Niranjan
Null Null McDonald
Null Null Harry

But I want like this ..is there any solution

ID FirstName LastName

1 Kumar Niranjan
2 Jackson McDonald
3 Tom Harry

I hope you understand what i want to say
|||
I can't use Merge Join Cynic ,Bcoz i have 4 inputs to combine...it will help only when your dealing with 2.
To use Merge join for this scenario i have to sort 4 columns indvidually and then again i have to use 3 merge joins which will be heavy work

|||

Niru wrote:

I need only 5 rows with out any null values (making sure that there is no null values in the source)

when i combine ..iam getting ouput like

ID FirstName LastName
1 Null Null
2 Null Null
3 Null Null
Null Kumar Null
Null Jackson Null
Null Tom Null
Null Null Niranjan
Null Null McDonald
Null Null Harry

But I want like this ..is there any solution

ID FirstName LastName

1 Kumar Niranjan
2 Jackson McDonald
3 Tom Harry

I hope you understand what i want to say

That makes no sense. For example, where is it defined that "1", "Kumar" & "Niranjan" form a single record? Nowhere that I can see.

Perhaps you are implying that the order in which the values appear is important. i.e. RecordX from dataset1 joins with RecordX from dataset2 and RecordX from dataset3. If this is the case you will have to give each row a number (here is how: http://www.sqlis.com/default.aspx?37) and then use the MERGE JOIN component.

-Jamie

|||Thanks Jamie for the hint ..got it solved with that idea.

Thats what i need

Thanks
Niru