Showing posts with label article. Show all posts
Showing posts with label article. Show all posts

Wednesday, March 28, 2012

Named Pipes Provider, error: 40 - AAAAAAAAAAAAAAARGH!

Hi,

I have been getting this error for about 6 hours now. I have read every article from google about it and absolutely none of the solutions work for me.

I am running Windows XP Home Edition

I downloaded and installed Visual Studio Web Developer Express about a week ago.

I downloaded SQL Server Express 2005 yesterday.

It installed fine.

I got my first error trying to add New Item->Sql Server Database only to find out the default instance SQLExpress was not working and i was running a different instance.

Anyway, I am trying to connect to sql server with the below code:

 SqlConnection myConnection =new SqlConnection("server=mycomp/mssqlserver;database=mydb;Trusted_Connection=yes"); SqlCommand myCommand =new SqlCommand("select category, title, article from articles where id=15");// + article + ");", myConnection); myConnection.Open();

Which give me the below error:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:

Line 30: SqlCommand myCommand = new SqlCommand("select category, title, article from articles where id=15");// + article + ");", myConnection);Line 31:Line 32: myConnection.Open();Line 33: Line 34:

I have followed all the instructions online like enabling 445 firewall stuff, making sure i accept local and remote connection, enabling TCP/IP Named pipes and heaps of protocols ect but nothing works.

I am about to uninstall sql server and .net and call it quits.

This stupid server is too hard to configure.

If anyone could help me get it running it would be gretly appreciated however, this question seems to be asked all over the net and i have read gazzilions of threads with all kinds of answers but nothing works.

Thanks

Did you try to re-install SQL? and install it as default instance?

|||

Ok, I got your problem. You have to do some more configuration
Go to SQL Server - SQL Server Configuration Manager.
Check the protocols Named Pipes and TCP/IP should be enabled
then go to Client Protocols, and check Named Pipes and TCP/IP should be enabled

Please check it, I hope it works.
Let me know in case of any difficulties.

|||

Thanks guys.

As you can see in my first post i have tried all the common solutions like configuring the client protocols ect.

I think i will just reinstall and see how it goes.

Cheers

|||

Let us know how it turns out

Monday, March 12, 2012

MySQL to SQL Server 2005

Hi all,
I have to migrate a MySQL database to SQL Server 2005. What's the best
way to accomplish this? I found the msdn article about migrating MySQL
to SQL Server 2000, but nothing about SQL Server 2005.
I installed MyODBC on the server and made a DSN. I then tried the
Migration Wizard from SSMS (Management -> Legacy -> Data Transformation
Services), but in the Source dropdown list I can only select Microsoft
SQL Server, not MySQL.
Is there any information available on this issue or any hints or tips?
Thanks in advance.
Kind regards,
Ruben.> I have to migrate a MySQL database to SQL Server 2005. What's the best
> way to accomplish this? I found the msdn article about migrating MySQL
> to SQL Server 2000, but nothing about SQL Server 2005.
> I installed MyODBC on the server and made a DSN. I then tried the
> Migration Wizard from SSMS (Management -> Legacy -> Data Transformation
> Services), but in the Source dropdown list I can only select Microsoft
> SQL Server, not MySQL.
Hi!
I've never had to migrate data from any other database to MS SQL
Server, since most of the people I know started off with MS SQL Server
and moved to Oracle ;-)
I'm not sure, but the following is what I can suggest.
You can migrate data from any OLE DB data source using the Microsoft
Business Intelligence Development Studio. An OLE DB driver for MySQL is
available at http://luggle.com/~sean
In the Business Intelligence Development Studio, create an Integration
project and add an SSIS package. Add a Data Flow task to the package by
dragging it from the Toolbox. Then, double-click the Data Flow task to
open another window. Here, drag the OLE DB Data Source twice - one for
MySQL and one for SQL Server. Select the table to move, connect the
output of the MySQL OLE DB Data Source to the SQL Server Data Source.
N.I.T.I.N.|||Hi there NiTiN,
Thanks for your reply, it's much appreciated.
I tried the steps you suggested and it gets me pretty far: I added the
two OLE DB Data Sources in my project and then editted the MySQL one.
I select the MySQL OLE DB provider and fill out the authentication info.
It can connect and get the tables from the MySQL database, but then when
I select a table and hit the "Preview" button I get an exception:
"MySQL OLE DB Provider has not been activated"
And another one:
"Opening a rowset for "bookmarks" failed. Check that the object exists
in the database".
I think that it has something to do with the fact that it's MySQL
version 5 and the OLE DB Provider is pretty old, so it was probably
written for MySQL 3.x or 4.x.
I'll continue looking for some other MySQL OLE DB provider. Other tips
are welcome of course. Thanks again.
Kind regards,
Ruben.|||Update: I decided to just buy Full Convert to do the job for me, since
it's probably cheaper to do it that way. ;)
Thanks for the suggestion though.
Kind regards,
Ruben.|||Ruben van Engelenburg wrote:
> "MySQL OLE DB Provider has not been activated"
Good day,
I know you're moving to Full Convert, but just thought I'd suggest an
alternative for anyone else who decides to come across our thread
sometime in the future.
The MySQL OLE DB Provider has to be activated before use - there's a
link on the same page that leads to the activation page. I'm not sure
if it is limited in any way, but there is an option to get a free
activation. I know I should've mentioned this before, but I thought the
activation link on the web page was close enough to the download link
to attract some attention.
BTW, I just read about Full Convert and it looks like a neat product.
Perhaps I'll try it sometime while migrating between databases.
N.I.T.I.N.|||Hi NiTiN,
Thanks for the note. I sure should have seen that, I can't believe I
didn't. :)
Anyway, I did activate it now just to see if it actually works.
Indeed it did get rid of the activation error when I hit Preview on a
table, but I get a new error instead about the MySQL query syntax being
incorrect. I think it has something to do with the MySQL version, so it
might work with an older version of MySQL, just not with MySQL 5.
I can only confirm that Full Convert is a neat product. It sure saved me
a lot of time and the SQL Server version only costs 129 dollar.
The conversion from a MySQL database to SQL Server 2005 gave me four
errors in a total of about 200000 rows. They all had to do with
constraints, so I have to set those manually afterwards (not a big
deal). I can recommend it.
Thanks again for your helpful tips.
Kind reards,
Ruben.

MySQL to SQL Server 2005

Hi all,
I have to migrate a mysql database to SQL Server 2005. What's the best
way to accomplish this? I found the msdn article about migrating MySQL
to SQL Server 2000, but nothing about SQL Server 2005.
I installed MyODBC on the server and made a DSN. I then tried the
Migration Wizard from SSMS (Management -> Legacy -> Data Transformation
Services), but in the Source dropdown list I can only select Microsoft
SQL Server, not MySQL.
Is there any information available on this issue or any hints or tips?
Thanks in advance.
Kind regards,
Ruben.> I have to migrate a mysql database to SQL Server 2005. What's the best
> way to accomplish this? I found the msdn article about migrating MySQL
> to SQL Server 2000, but nothing about SQL Server 2005.
> I installed MyODBC on the server and made a DSN. I then tried the
> Migration Wizard from SSMS (Management -> Legacy -> Data Transformation
> Services), but in the Source dropdown list I can only select Microsoft
> SQL Server, not MySQL.
Hi!
I've never had to migrate data from any other database to MS SQL
Server, since most of the people I know started off with MS SQL Server
and moved to Oracle ;-)
I'm not sure, but the following is what I can suggest.
You can migrate data from any OLE DB data source using the Microsoft
Business Intelligence Development Studio. An OLE DB driver for mysql is
available at http://luggle.com/~sean
In the Business Intelligence Development Studio, create an Integration
project and add an SSIS package. Add a Data Flow task to the package by
dragging it from the Toolbox. Then, double-click the Data Flow task to
open another window. Here, drag the OLE DB Data Source twice - one for
MySQL and one for SQL Server. Select the table to move, connect the
output of the mysql OLE DB Data Source to the SQL Server Data Source.
N.I.T.I.N.|||Hi there NiTiN,
Thanks for your reply, it's much appreciated.
I tried the steps you suggested and it gets me pretty far: I added the
two OLE DB Data Sources in my project and then editted the mysql one.
I select the mysql OLE DB provider and fill out the authentication info.
It can connect and get the tables from the mysql database, but then when
I select a table and hit the "Preview" button I get an exception:
"MySQL OLE DB Provider has not been activated"
And another one:
"Opening a rowset for "bookmarks" failed. Check that the object exists
in the database".
I think that it has something to do with the fact that it's MySQL
version 5 and the OLE DB Provider is pretty old, so it was probably
written for mysql 3.x or 4.x.
I'll continue looking for some other mysql OLE DB provider. Other tips
are welcome of course. Thanks again.
Kind regards,
Ruben.|||Update: I decided to just buy Full Convert to do the job for me, since
it's probably cheaper to do it that way. ;)
Thanks for the suggestion though.
Kind regards,
Ruben.|||Ruben van Engelenburg wrote:
> "MySQL OLE DB Provider has not been activated"
Good day,
I know you're moving to Full Convert, but just thought I'd suggest an
alternative for anyone else who decides to come across our thread
sometime in the future.
The mysql OLE DB Provider has to be activated before use - there's a
link on the same page that leads to the activation page. I'm not sure
if it is limited in any way, but there is an option to get a free
activation. I know I should've mentioned this before, but I thought the
activation link on the web page was close enough to the download link
to attract some attention.
BTW, I just read about Full Convert and it looks like a neat product.
Perhaps I'll try it sometime while migrating between databases.
N.I.T.I.N.|||Hi NiTiN,
Thanks for the note. I sure should have seen that, I can't believe I
didn't.
Anyway, I did activate it now just to see if it actually works.
Indeed it did get rid of the activation error when I hit Preview on a
table, but I get a new error instead about the mysql query syntax being
incorrect. I think it has something to do with the mysql version, so it
might work with an older version of MySQL, just not with mysql 5.
I can only confirm that Full Convert is a neat product. It sure saved me
a lot of time and the SQL Server version only costs 129 dollar.
The conversion from a mysql database to SQL Server 2005 gave me four
errors in a total of about 200000 rows. They all had to do with
constraints, so I have to set those manually afterwards (not a big
deal). I can recommend it.
Thanks again for your helpful tips.
Kind reards,
Ruben.