Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Saturday, February 25, 2012

Connection error 40

Hi,
I developed a programm with dot.net 2.0.
On my environment ervy thing works fine.
When I try to use it on the customers envrionment I get the following error
message:
"An error has occured while establishing a connection to the server.
When connecting to SQL Server 2005, this failuer may be cused 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)"
I want to get connect to an SQL 2000 server. Named Pipes and TCP/IP are
enabled on the server.
I use the following connection String:
"Server=server.domain.com; Initial Catalog=database.mdf;;Integrated
Security=False;Connect Timeout=30;Password=password; UID=user"
How can I solve this problem?
TIA
Marcus MngelCheck your connection string, it doesn't look right. I've never seen the
keys "UID" and "Password" used in the same connection string, and unless
you're using Express Edition, you dont need .mdf on the end of your DB name.
Check out this site for help on your connection string:
http://www.connectionstrings.com/
My guess is it should look something like this:
"Server=server.domain.com;Database=database;User ID=user;Password=password;"
"Marcus Mngel" <nc-maengema@.netcologne.de> wrote in message
news:eht7n6$t4t$1@.newsreader2.netcologne.de...
> Hi,
> I developed a programm with dot.net 2.0.
> On my environment ervy thing works fine.
> When I try to use it on the customers envrionment I get the following
> error
> message:
> "An error has occured while establishing a connection to the server.
> When connecting to SQL Server 2005, this failuer may be cused 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)"
> I want to get connect to an SQL 2000 server. Named Pipes and TCP/IP are
> enabled on the server.
> I use the following connection String:
> "Server=server.domain.com; Initial Catalog=database.mdf;;Integrated
> Security=False;Connect Timeout=30;Password=password; UID=user"
> How can I solve this problem?
> TIA
> Marcus Mngel
>
>

Connection Error

Hi,

I have developed a program which connects to an SQL Express 2005 server. This worked fine until yesterday when the server failed. I have set up a new server, same name, config, etc and restored the data back into the database.

When the program runs it displays an error:

System.Runtime.InteropServices.COMException (0x800A0E7D): The connection cannot be used to perform this operation. It is either closed or invalid in this context.

Connection code that is erroring:

rs.Open(s, sq, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic)

* s is the search string

* sq is the connection string

sq.open("Provider=SQOLEDB;Data Source=mns-web01\sqlexpress;User ID=WLANClient;Password=password;Initial Catalog=WLAN;")

It also has a 'ghost' user which cannot be removed or re-created. This is the user which the code uses to connect to the database.

Any ideas?

Thanks

Sounds like somewhere in your code you closed or destroyed the connection, and tried to initiate an action after that. Create a simple connection test section of code with a simple select, and then try layering your other code back in. This happens a lot when you're doing looping or calling out to sub procedures.

Buck Woody

Friday, February 24, 2012

Connection Error

Hi all
When i try to access sqlserver from a custom developed assembnly i get the
following error
"
Request for the permission of type
System.Data.SqlClient.SqlClientPermission, System.Data, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
"
can any one please suggest me how to go about this
Thanks
Srujan.NDid you configure a Code Access Security group for your assembly?
Search the newsgroup and you'll find several posts on custom assembly
and Code Access Security.
Andy Potter

Connection cannot be made to http://localhost/ReportServer

I have developed a reports in Business Intelligence Development studio and when I am tring to deploy it.
It says that
Connection cannot be made to http://localhost/ReportServer
What does it really mean.Is SSRS service running ?|||

Do you have Reporting Services install on Localhost?

Has it been configured?

Is IIS running?

That's a start.

BobP

|||Yess, it is runnning .|||IIS install - > start, control panel, add remove progs, add/remove windows components ->
tick IIS, click next etc...

Think you need to be running XP pro to do this, don't think you can do it from Home edition

Shurely you need to do this before you install RS, no? I can't remember the install process of RS....|||

It wont let you install SSRS without IIS.

BobP

|||If IIS is running then it must be user permissions on the IIS folder.

Connection Bussy.

Hello to everyone,

I have developed a package with multiple Data Flow Tasks, all of the data goes to a sql server database. This package worked perfectly well on a development machine (with win 2k3), but now I 've deployed the package on a production server (with win 2k3 too), and when I execute the package with a web service (network service user) I get the following error:

Code Snippet

An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Connection is busy with results for another command". Source: My DataFlow TimeStamp:7/7/2007 2:18:08 PM Error: The "input "OLE DB Destination Input" (27)" failed because error code 0xC020907B occurred, and the error row disposition on "input "OLE DB Destination Input" (27)" specifies failure on error. An error occurred on the specified object of the specified component.


I wonder if it could be permission issue with the Network Service user or maybe SQL SERVER must have any parameter set that I'm not taking into consideration.

any clue?

regards

Sounds like a problem with SQL Server rather than SSIS. Did you try searching the web it? I did and I came up with this:

FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query

(http://support.microsoft.com/default.aspx/kb/822668/)

-Jamie

|||hello, thanks for your response.

well, I was taking into consideration to install ServicePack 2, so i'm downloading it now. I guess if this could be a problem with the version of SQL SERVER, On a previous machine I was using the Enterprise Edition and everything was running well and now I'm just with the Standard one. Could it be an issue to take care of?. I'll install SP2 and I'll tell you what happened.

best regards.|||
I found the answer,

well, my package has 20 DataFlow Tasks, and when i debugged the hole package i realized that I always had 3 or 4 failing tasks with the "Connection is busy...." error message, so I decided to link them with a Completion Precedence Constraint (the blue one) and it worked fine.

I wonder if this problem occurs is because a lack connections on the Sql Server connection pool or something related.

thanks anyway, It worked for me.|||

I received the same error today and only have 4 data flows although it has been working without any issues for the last few weeks. Is there a SQL server or SSIS parameter that needs to be bumped up somewhere?

Connection Broken

I have developed on application that connects to a sql database using tcp/ip
Sometimes the connection may get broken, for example with laptop users.
What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.You either implement this through your own "sanity db class" with
sending a trivial command like "Select 'Sanity Check'" to SQL Server
and doing this in a try catch block, or you wrap the command you are
trying to send in a try catch block and retry upon the specific error
class for a lost connection.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hello,
Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..
Thanks
Hari
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.|||There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
----
---
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.

Connection Broken

I have developed on application that connects to a sql database using tcp/ip
Sometimes the connection may get broken, for example with laptop users.
What is the most efficient way of detecting when this happens, instead of
the string of sql errors that we get.
Hello,
Mostly this should be because of some network issues. See if your network is
persistent..Run a ping from one of the laptop to sql server and redirect to
text file
and see if there is any request time-out..
Thanks
Hari
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.
|||There are several Framework classes that can be called to see if the Network
changes state (which kills a connection) or you can use others to see if the
SQL Server instance is still responding. Yes, it sounds like there are
network hardware (or throughput/capacity) issues.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
"Michael Tissington" <mtissington@.newsgroups.nospam> wrote in message
news:%231OsvqFoHHA.208@.TK2MSFTNGP05.phx.gbl...
>I have developed on application that connects to a sql database using
>tcp/ip
> Sometimes the connection may get broken, for example with laptop users.
> What is the most efficient way of detecting when this happens, instead of
> the string of sql errors that we get.

Tuesday, February 14, 2012

Connecting to sqlexpress from another machine.

I have developed an application in vs.net and have an sql express version on
one of my computers (Actually both computers).
How do I connect to this database from the other machine (workgroup, not
dedicated server)
When I try to connect through the Add Connection I get the message
'An error has occured while establishing a connection to the server. When
connecting to SQL Server 2005,
this failure may be caused by the fact under the default settings SQL Server
does not allow remote connections.
(Provider: SQL Network Interface, error: 26 -Error locating Server/Instance
Specified)'
reidarTHi
Can you connect using SQLCMD? It could be that you have not enable remote
connections with SqlSAC.exe! When you connect you should be able to specify
the machine name\Instance or the IP address\Instance in your connection
string. If you can connect using the IP address and not the hostname you may
need to add it to your hosts file.
John
"reidarT" wrote:
> I have developed an application in vs.net and have an sql express version on
> one of my computers (Actually both computers).
> How do I connect to this database from the other machine (workgroup, not
> dedicated server)
> When I try to connect through the Add Connection I get the message
> 'An error has occured while establishing a connection to the server. When
> connecting to SQL Server 2005,
> this failure may be caused by the fact under the default settings SQL Server
> does not allow remote connections.
> (Provider: SQL Network Interface, error: 26 -Error locating Server/Instance
> Specified)'
> reidarT
>
>|||reidarT wrote:
> I have developed an application in vs.net and have an sql express version on
> one of my computers (Actually both computers).
> How do I connect to this database from the other machine (workgroup, not
> dedicated server)
> When I try to connect through the Add Connection I get the message
> 'An error has occured while establishing a connection to the server. When
> connecting to SQL Server 2005,
> this failure may be caused by the fact under the default settings SQL Server
> does not allow remote connections.
> (Provider: SQL Network Interface, error: 26 -Error locating Server/Instance
> Specified)'
> reidarT
>
Use the Surface Area Configuration tool to enable remote connections...
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Connecting to sqlexpress from another machine.

I have developed an application in vs.net and have an sql express version on
one of my computers (Actually both computers).
How do I connect to this database from the other machine (workgroup, not
dedicated server)
When I try to connect through the Add Connection I get the message
'An error has occured while establishing a connection to the server. When
connecting to SQL Server 2005,
this failure may be caused by the fact under the default settings SQL Server
does not allow remote connections.
(Provider: SQL Network Interface, error: 26 -Error locating Server/Instance
Specified)'
reidarTHi
Can you connect using SQLCMD? It could be that you have not enable remote
connections with SqlSAC.exe! When you connect you should be able to specify
the machine name\Instance or the IP address\Instance in your connection
string. If you can connect using the IP address and not the hostname you may
need to add it to your hosts file.
John
"reidarT" wrote:

> I have developed an application in vs.net and have an sql express version
on
> one of my computers (Actually both computers).
> How do I connect to this database from the other machine (workgroup, not
> dedicated server)
> When I try to connect through the Add Connection I get the message
> 'An error has occured while establishing a connection to the server. When
> connecting to SQL Server 2005,
> this failure may be caused by the fact under the default settings SQL Serv
er
> does not allow remote connections.
> (Provider: SQL Network Interface, error: 26 -Error locating Server/Instanc
e
> Specified)'
> reidarT
>
>|||reidarT wrote:
> I have developed an application in vs.net and have an sql express version
on
> one of my computers (Actually both computers).
> How do I connect to this database from the other machine (workgroup, not
> dedicated server)
> When I try to connect through the Add Connection I get the message
> 'An error has occured while establishing a connection to the server. When
> connecting to SQL Server 2005,
> this failure may be caused by the fact under the default settings SQL Serv
er
> does not allow remote connections.
> (Provider: SQL Network Interface, error: 26 -Error locating Server/Instanc
e
> Specified)'
> reidarT
>
Use the Surface Area Configuration tool to enable remote connections...
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Sunday, February 12, 2012

Connecting to SQL Server via a Lan Connection

Hi, I have developed a windows form application which connects to a sql server 2k database via the following conneciton string:

Private con As New SqlConnection("Data Source=(local);trusted_connection=true;Initial Catalog=Database1")

This works fine for running locally but I need to give my Windows form application to other users on the lan and have them reach my database server. So next I tried:

Private con As New SqlConnection("WorkStation ID= E134017.nw.nos.Boeing.com;Data Source=(local);trusted_connection=true;Initial Catalog=Database1")

where E134017.nw.nos.boeing.com is the full network path to my computer

It does not work and results in "Server does not exist or access is denied"

I next went in SQL and turned on tcp/ip and still no luck.

Any ideas,

Fred

Hi Fred
I think you have to change your Data source in the connection string to the Server Name (PC Name that the SQL server is installed on)
i.e.
Private con As New SqlConnection("Data Source=FredPC;trusted_connection=true;Initial Catalog=Database1")

Friday, February 10, 2012

Connecting to SQL Server database via windows form app

Hi, I have developed a windows form application which connects to a sql server 2k database via the following conneciton string:

Private con As New SqlConnection("Data Source=(local);trusted_connection=true;Initial Catalog=Database1")

This works fine for running locally but I need to give my Windows form application to other users on the lan and have them reach my database server. So next I tried:

Private con As New SqlConnection("WorkStation ID= E134017.nw.nos.Boeing.com;Data Source=(local);trusted_connection=true;Initial Catalog=Database1")

where E134017.nw.nos.boeing.com is the full network path to my computer

It does not work and results in "Server does not exist or access is denied"

I next went in SQL and turned on tcp/ip and still no luck.

Any ideas,

Fred

The good way of doing this, at least in my opinion is to kepp the connectin string in App.Config file, thus you can chage it without bother to compile again.
so you'll have something like

<configuration>
<add key="ConnectionString" value="server=(local);trusted_connection=yes;database=b1;"/>
</configuration>

when you copy the application to another workstation, you can change the connection string to server=DB_SERVER_NAME;trusted_connection=yes;database=b1;", where DB_SERVER_NAME is the name of the cmputer where the SQL Server is or the one that you refer to local. Then you have to add the remote users into your database server and grant access to db1.|||Your connection string is looking for a SQL Server on the user's workstation. Don't you want to change your Data Source property to point to the name of your database server?

Darrel|||that's the reason i explain in the 2nd paragraph to replace the DB_SERVER_NAME appropriately.|||Ok, this is the connection string I am using

Data Source = \\E134017.nw.nos.boeing.com;Trusted_Connection=True;Initial Catalog=Database1

\\E134017.nw.nos.boeing.com is the full path to the server computer. E134017 is the computer name.

Using this connection string, I go to another computer on the network and login and try to reach my server thru my connection string.

I get"Server does not exist or access is denied"

That same connection string works fine as a login on the server itself.

I am lost.

Fred|||

The SQL forum is a better venue for your question.

|||This is the connection string we use in our Winapps:
Data Source=<Your server name here>;user id=<your user ID here>;password=<users Password here>;initial catalog=<Database name here>
Hope this helps
Deasun|||then use this

server=E134017;trusted_connection=yes;database=Database1;