Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Friday, March 23, 2012

External columns from Sybase stored procedures

I need to execute several stored procedures on a Sybase server and copy the results to SQL Server 2005 tables. While using an ad-hoc sql statement the "Available External Columns" list is correct, however when using a stored procedure the list is empty. I've tried to work around this a couple of ways without success.

1) DelayedValidation.
I ran the sql from the stored procedure body in the OLE DB Source to set the column list, then turned on DelayValidation for the Data Flow component. When I switch to using a stored procedure it still connects to the Sybase database and removes the column list. Still does this even after turning on DelayedValidation for the sequence container and entire package (the OLE DB source itself does not have the option).

2) Using a variable that changes during runtime.
I copied the sql from the Sybase procedure into the default value of a variable. A script changes it to a procedure at runtime. This provides a column list in design mode but throws the error "The external metadata column collection is out of synchronization with the data source columns. The external metadata column xxxx needs to be removed from the external metadata column collection" and repeats for every column in the list. I know that the column names and data types are identical.

3) Manually updated the external/output columns list.
Was very painful and gave me the same errors.

It seems that DelayedValidation is the route I'm supposed to take, but I don't see how it would be any different during runtime.

Any ideas would be greatly appreciated!

I since learned that the OLE DB data source also has a DelayValidation property, but I still see the same errors with this enabled.
|||Well I think I answered my own question. After switching the connection from the "Native\Sybase" type to ".Net Providers\Sybase" and changing the OLE DB connection to a DataReader I found a new option on the DataFlow property that allowed me to change the sql through an expression at runtime. I may have also needed to turn off the ValidateExternalMetadata property too, not sure yet.

External columns from a Sybase stored procedures

I need to execute several stored procedures on a Sybase server and copy the results to SQL Server 2005 tables. While using an ad-hoc sql statement the "Available External Columns" list is correct, however when using a stored procedure the list is empty. I've tried to work around this a couple of ways without success.

1) DelayedValidation.
I ran the sql from the stored procedure body in the OLE DB Source to set the column list, then turned on DelayValidation for the Data Flow component. When I switch to using a stored procedure it still connects to the Sybase database and removes the column list. Still does this even after turning on DelayedValidation for the sequence container and entire package (the OLE DB source itself does not have the option).

2) Using a variable that changes during runtime.
I copied the sql from the Sybase procedure into the default value of a variable. A script changes it to a procedure at runtime. This provides a column list in design mode but throws the error "The external metadata column collection is out of synchronization with the data source columns. The external metadata column xxxx needs to be removed from the external metadata column collection" and repeats for every column in the list. I know that the column names and data types are identical.

3) Manually updated the external/output columns list.
Was very painful and gave me the same errors.

It seems that DelayedValidation is the route I'm supposed to take, but I don't see how it would be any different during runtime.

Any ideas would be greatly appreciated!

I since learned that the OLE DB data source also has a DelayValidation property, but I still see the same errors with this enabled.
|||Well I think I answered my own question. After switching the connection from the "Native\Sybase" type to ".Net Providers\Sybase" and changing the OLE DB connection to a DataReader I found a new option on the DataFlow property that allowed me to change the sql through an expression at runtime. I may have also needed to turn off the ValidateExternalMetadata property too, not sure yet.

Sunday, February 26, 2012

Express installation fails with "invalid installation package"

I get an error when trying to install the SQL Native Client. It says it cannot find the installation package and to use a valid copy of 'sqlncli.msi'. I've downloaded the Express setup twice and get the same error from both of them.
I'm attempting this in a VMWare session setup for Windows 2K, Advanced Server. I am trying to test my installation and setup procedures. This is not a production setup, just install testing and documentation. I have allocated only 272MB to the VMWare session, which is why the system doesn't meet the recommended settings.
Any help would be greatly appreciated.
Below is the Summary.txt output file.
Microsoft SQL Server 2005 9.00.2047.00
==============================
OS Version : Microsoft Windows 2000 Advanced Server Service Pack 4 (Build 2195)
Time : Wed May 03 09:54:23 2006

CPCWIN2KVM1 : The current system does not meet recommended hardware requirements for this SQL Server release. For detailed hardware requirements, see the readme file or SQL Server Books Online.
Machine : CPCWIN2KVM1
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.2047.00
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0003_CPCWIN2KVM1_SQLSupport_1.log
--
Machine : CPCWIN2KVM1
Product : SQL Native Client
Error : An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'.
--
Machine : CPCWIN2KVM1
Product : Microsoft SQL Server Native Client
Product Version : 9.00.2047.00
Install : Failed
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0003_CPCWIN2KVM1_SQLNCLI_1.log
Last Action : InstallFinalize
Error String : An installation package for the product Microsoft SQL Server Native Client cannot be found. Try the installation again using a valid copy of the installation package 'sqlncli.msi'.
Error Number : 1706
--
Machine : CPCWIN2KVM1
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.2047.00
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0003_CPCWIN2KVM1_SqlWriter_1.log
--
Machine : CPCWIN2KVM1
Product : MSXML 6.0 Parser
Product Version : 6.00.3883.8
Install : Successful
Log File : c:\Program Files\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\SQLSetup0003_CPCWIN2KVM1_MSXML6_1.log
--
Remove the Native Client in the control panel/add remove programs and rerun the installation.|||

Let us know if this resolved your issue. Feel free to mark the thread as answered if it did.

If you're still having problems I can move this thread to the Setup group to see if they have some ideas.

Regards,

Mike Wachal
SQL Express team

-
Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=307712&SiteID=1

|||

I was having the same problem. I removed the Native Client in the control panel and all seems to be working fine now.

Alex

Express and Standard

Hi All,
I received a copy of SQL Server 2005 Standard at a conference. To say
the least I am beyond blown away!!
Anyway, I went out and purchased Visual Studio 2005 Pro. When installing
it also installed SQL Server Express (I thought it would skip it since
standard was already there. I was going to uninstall express but I
wanted to make sure:
It won't screw up my Visual Studio install?
And in Add/Remove programs that is referenced by the "SQL Server Desktop
Engine". Am I right?
Thanks for your input.
Also was curious how the old timers feel about SQL becoming an object
orientated language platform? I guess in some ways it already was. I
just had never thought of it that way before.
KellyYou're about to start a holy war :)
"Also was curious how the old timers feel about SQL becoming an object
orientated language platform? I guess in some ways it already was. I
just had never thought of it that way before."
SQL is not an OOL, and I would try to avoid thinking of it like that.
SQL is a set-oriented language; data is handled en masse. That being
said, I am excited about the inclusion of the CLR in SQL Server because
it allows me to write functions to augment the data I collect and store
in my database (for example, I can write a function in the CLR to
handle conversion of my ip addresses from dotted quad to integer
format, allowing me to select greater ranges of related data).
However, I sat through one of the SQL Road Show discussions for
developers, and groaned as I heard developer after developer ask how
could store their complex business objects in SQL Server; I would hate
to be the DBA supporting that shop, because performance will suffer. I
butt heads with our OOP developers all the time because they want to
iterate through a collection and insert one row of data at a time into
our warehouse. SQL works best with sets; that's what it's designed
for.
Not sure about your installation questions, but wanted to drop my.02 in
before it got ugly :)
Stu|||Hello scorpion53061,

> Anyway, I went out and purchased Visual Studio 2005 Pro. When
> installing it also installed SQL Server Express (I thought it would
> skip it since standard was already there. I was going to uninstall
> express but I wanted to make sure:
> It won't screw up my Visual Studio install?
Nope. Uninstalling Express shouldn't mess up your VS install.

> And in Add/Remove programs that is referenced by the "SQL Server
> Desktop Engine". Am I right?
No, that's MSDE, the SQL Server 2000 version of SQL Server 2005 Express Edit
ion.
Express should be clearly labelled as Express.

> Also was curious how the old timers feel about SQL becoming an object
> orientated language platform? I guess in some ways it already was. I
> just had never thought of it that way before.
It's not, see my response to Stu.
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/|||Hello Stu,

> You're about to start a holy war :)
> "Also was curious how the old timers feel about SQL becoming an object
> orientated language platform? I guess in some ways it already was. I
> just had never thought of it that way before."
It's always been a platform for OOPs, just as Textfiles, sockets, RAM, etc.
Nothing to build a Jihad on. ;)

> SQL is not an OOL, and I would try to avoid thinking of it like that.
Its true that SQL, and in our space, T-SQL, is not an OOPL, and yes, its
wise to not think of it as one. But SQL Server isn't just a T-SQL processor.
The "Box Pox" (LINQ) is all about adding query processing to the OOPL. How
that will work out is yet to be seen, but it's clear that something like
it will materalize.

> SQL is a set-oriented language; data is handled en masse. That being
> said, I am excited about the inclusion of the CLR in SQL Server
> because it allows me to write functions to augment the data I collect
> and store in my database (for example, I can write a function in the
> CLR to handle conversion of my ip addresses from dotted quad to
> integer format, allowing me to select greater ranges of related data).
Exactly. SQLCLR should be used to extend the reach and depth of T-SQL as
a tool for solving data manipulation problems with high degrees of parallali
zation
and volumes of disk I/O.

> However, I sat through one of the SQL Road Show discussions for
> developers, and groaned as I heard developer after developer ask how
> could store their complex business objects in SQL Server; I would hate
> to be the DBA supporting that shop, because performance will suffer.
I'm glad somebody actually remembers my talk from the Roadshows where I was
"don't do that" for using UDTs as mapped objects. :)
Its not only raw performance that suffers, but its the total sustainability
of the application that does as well.

> I butt heads with our OOP developers all the time because they want to
> iterate through a collection and insert one row of data at a time into
> our warehouse. SQL works best with sets; that's what it's designed
> for.
Yep. Now I would argue that if developers really do want to store object
data in a database, store the serialized XML and be done with it. Provided
it has a good fixed schema. :)
Thank you,
Kent Tegels
DevelopMentor
http://staff.develop.com/ktegels/