Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Monday, March 19, 2012

Assistance in connecting a SQL Server Client to SQL Server sitting in a shared environment

Hi,

I need to connect to a SQL server thats running in say abc.trident.com and also sits in a shared environment..

I have couple of questions

1) That SQL server is accessible from my network, yet when I swtich on my enterprise manager I am unable to view that in the list of running SQL servers in the populated list.

Is it because its sitting in a shared environment I am unable to view that?

2) What is the connection striing I should use to connect to the server..When I try to configure a SQL server registrations it normally asks for SQL Server name along with the user authentication

Should I mention fill the Server: field as

abc.trident.com

or

// abc.trident.com/abc.trident.com

to connect to the clustered server.

Can some one tell me the proper connection string if both aforementioned ones are incorrect?

Thanks in Advance

What error it throws !?

1) That SQL server is accessible from my network, yet when I swtich on my enterprise manager I am unable to view that in the list of running SQL servers in the populated list.

Is it because its sitting in a shared environment I am unable to view that?

>> Is this server is out side your network!!!? have you tried connecting using QA? is NET DDE and NET DDE DDSM service are running ? Is NETBIOS enabled?

2) What is the connection striing I should use to connect to the server..When I try to configure a SQL server registrations it normally asks for SQL Server name along with the user authentication

Should I mention fill the Server: field as

abc.trident.com

or

// abc.trident.com/abc.trident.com

to connect to the clustered server.

Refer connectionstring.com for different connection strings.

Regards

Hemantgiri S. Goswami

|||

1) is NET DDE and NET DDE DDSM service are running ? Is NETBIOS enabled?

Yes

2) The connectionstring.com site appears to be dead and has some irrevlant ads. can you tell me if my connection string format to represent a Clustered SQL server is correct or any other site from which I can get the accurate info

Efforts in googling ended in vain.

3) The error

<SQLServer does not exist or access denied ConnectionOpen.connect())>

Here the SQL server lies out side my network and the network is even accessible from a Tracert.

but the SQL server is up and running according to the Admin.

|||No takers!|||

Hi,

You have said that the server is outside network.... If it is behind firewall have you check the proper firewall rule is placed in order to get you access !? and Port too...

Refer this KB for the workaround http://support.microsoft.com/kb/328306/en-us

Hemantgiri S. Goswami

Wednesday, March 7, 2012

Assertion failed!

I'm connecting to a SQL Server 2000, sp3 running on Win2k
Server, SP3, english version from a workstation with
Win2k, sp 3, english version.
The client software is written in C# and I'm using ADO.NET
to connect.
Occasionally I get this fault:
Assertion failed!
Program: ...\..\..\Myprog.exe
File: ..\..\..\nt\ssock\src\ntsockc.c
Line: 1053 (sometimes other lines...)
Expression: 1 == pConnectionObject->fCallCheck
Any suggestions what could be wrong?
/MattiasHi Mattias,
If the Assertion is thrown by the C# application, you need to post in C# or
ADO.NET newsgroup for accurate information, e.g.
microsoft.public.dotnet.languages.csharp,
microsoft.public.dotnet.framework.adonet. The problem should be related to
SQL Server.
When the problem occurs, I suggest that you use Query Analyzer to connect
to the SQL Server from the computer where the problem occurs. If the
problem does not occur, it indicates that the problem is with the
application.
In addition, since it is a random problem, it could be quite complex. You
could also contact Microsoft Product Support Services via
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS, so that
we can have dedicated engineer to assist you.
This posting is provided "AS IS" with no warranties, and confers no rights.
Regards,
Bill Cheng
Microsoft Support Engineer
--
| Content-Class: urn:content-classes:message
| From: "Mattias Andersson" <mattias.andersson@.ip-consult.se>
| Sender: "Mattias Andersson" <mattias.andersson@.ip-consult.se>
| Subject: Assertion failed!
| Date: Mon, 30 Jun 2003 00:17:00 -0700
| Lines: 18
| Message-ID: <067701c33ed7$9931e2e0$a101280a@.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcM+15kxvfxven3cQMytFjuuieMjcA==| Newsgroups: microsoft.public.sqlserver.server
| Path: cpmsftngxa09.phx.gbl
| Xref: cpmsftngxa09.phx.gbl microsoft.public.sqlserver.server:22143
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| I'm connecting to a SQL Server 2000, sp3 running on Win2k
| Server, SP3, english version from a workstation with
| Win2k, sp 3, english version.
|
| The client software is written in C# and I'm using ADO.NET
| to connect.
|
| Occasionally I get this fault:
| Assertion failed!
| Program: ...\..\..\Myprog.exe
| File: ..\..\..\nt\ssock\src\ntsockc.c
| Line: 1053 (sometimes other lines...)
|
| Expression: 1 == pConnectionObject->fCallCheck
|
| Any suggestions what could be wrong?
|
| /Mattias
|

Friday, February 24, 2012

aspnetdb on host, connection string

Hi

I am having trouble connecting to aspnetdb on the shared host. On my local server this is my connection string which works fine:

<addname="MyLocalSqlServer"connectionString="Data Source=.\SQLExpress;Integrated Security=SSPI;Initial Catalog=aspnetdb;User Instance=false"

providerName="System.Data.SqlClient" />

But, this doesn't work on the host (just putting in host address):

<addname="MyLocalSqlServer"connectionString="190.40...232,1444;Integrated Security=SSPI;Initial Catalog=aspnetdb_booksale;User Instance=false"

providerName="System.Data.SqlClient" />,

and I get the error :

Login failed for user ''. The user is not associated with a trusted SQL Server connection.

so I put in the user id and password that i used when I created the aspnetdb_booksale db

<addname="MyLocalSqlServer"connectionString="Data Source=196...232,1444;Integrated Security=False;User ID=aspnetdbbooksale; password=amanda;Initial Catalog=aspnetdb_booksale;User Instance=false"

providerName="System.Data.SqlClient" />

and I get the error:

The ConnectionString property has not been initialized.

Any ideas for me?

Amanda

Hi

My problem is not the connection string, because the one below works when I use the add user wizard. However, I get the error when I use the "createuser.membership" method. Funny tho it worked on my local server...

<addname="MyLocalSqlServer"connectionString="Data Source=196...232,1444;Integrated Security=False;User ID=aspnetdbbooksale; password=amanda;Initial Catalog=aspnetdb_booksale;User Instance=false"

|||

So you mean you got the "The ConnectionString property has not been initialized" when you connect from remote machine using the connection string below?

addname="MyLocalSqlServer"connectionString="Data Source=196...232,1444;Integrated Security=False;User ID=aspnetdbbooksale; password=amanda;Initial Catalog=aspnetdb_booksale;User Instance=false"

Really strange. Every time you got the same error message?

ASPNET security on my sql server

Dear all

I had a problem connecting to my website (through lan) from other machines in the company here.

I googled some and figured out that I have to change the security settings of aspnet in my sql server express 2005.

I did as suggested and now its working

My question is - what should be the real security settings for aspnet on my sql server ?

Should I really add it to the sysadmin ? (what solved the problem...)

Guy

Security settings depend on your environment. They should by design be the least permissions that allow access, but in your case it would mean configuring a new account just for this purpose and you'd likely not add any additional security in an intranet environment.

Jeff

|||

Hi

Thanks for the reply

I am talking about the real world not the lan

I had the problem on lan and that led me to the question :)

Please tell me what should I do on an Internet case

Guy

|||It still depends on what the website needs to do with SQL Server. What was the problem with the SQL Server connection before you add IIS account (or other account?) to sysadmin role of SQL Server?

Thursday, February 16, 2012

ASP.NET Web application, problem connecting to database

Hi,

I have a problem connecting to database using windows authorization.

this is sample code
SqlConnection oSQLConn = new SqlConnection();
oSQLConn.ConnectionString="integrated security=SSPI;Server=SHAREPOINT\\EPM;Database=STS_sharepoint_1;Trusted_Connection=true;";
oSQLConn.Open();
on Windows Aplication it work good but on ASP.NET Web application I got an Server Error - Login failed for user *****************
is it problem with IIS configuration?

Make sure there is a user account for <machinename>/ASPNET and also the account has permissions on the objects.|||

Where can I check it? in ASP.Net configuration or in IIS configuration?

Greetz

|||In Sql Server under users under the database you are working on in Enterprise Manager
|||There is "My Domain\Domain Users" and still it don't work:/ I'm running asp script from computer in My Domain.

Sunday, February 12, 2012

ASP.net Connection String

Hi I am new to asp.net and I am having problems connecting to a SQL Server database. My code is;

Dim myConnection As New SqlConnection("server='localhost'; user id='sa'; password='ExamResults'; Database='ExamResults'")
Dim myCommand As New SqlDataAdapter("select * from tblStudents", myConnection)

Dim rstStudents As New DataSet()
myCommand.Fill(rstStudents, "tblStudents")

I'm not too sure if this should be placed in the <script runat="server"> or just after declaring the namespaces.

Also, how do you reference the select statement in the code, currently I have;

<ASP: response.write rstStudents.fields("Surname") Response.write ("test")/
Any help would be greatly appreciatedYou should look at theServer-Side Data Access quickstart for a jump start.

All of the Quickstarts can be found here: http://www.asp.net/Tutorials/quickstart.aspx

Terri

ASP.NET connecting to MSDE

G'day,
I'm very new to ASP.NET (but not to programming) and I'm having some trouble with connecting to a database.

I am using C#.NET and I dragged the SqlConnection component onto the form, set the connection string to (local) and to use integrated security, and on that data link properties page I can press the test connection and it works fine, and I can see the databases in "select database on server" drop down box... but when I try and Open() the connection I get a

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'AMD2500\ASPNET'.

Can anyone help me?

Thanks,
RobboIf you want your web app to impersonate the user, you need to have the following two sections in web.config:

<configuration>
<system.web>
<identity impersonate="true"/>
<authentication mode="Windows" />
</system.web>
</configuration>

ASP.NET 2.0-SQLEXPRESS 2005 Connection Problem

i got an error just like that.What must i do?

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)

Does your ASP.NET user account have rights to access SQL server?

If yes you should look for your message in forum I saw one post about how to configure server to allow remote connections

Thanks

|||

http://ambarishganguly.blogspot.com/2006/12/remote-connections-to-sql-server-2005.html

and also restart the SQL Server Browser will allow remote connections

|||

Are you running this on your local computer or a hosted site?

If this error happens on your local server, your SQL Express service is probably not running or you did some funky configuration

If this error happens on a hosted site, your hoster probably do not support SQL Express and you need to update the connection information to point to a SQL server.

|||

Dearibrahimersoy

Which SqlServer do u use in your web 2000 or 2005 ?. Can u show your web.config here ?

|||

Hi,

This error might be cuased that SQL Server does not allow remote connections. Because by default, this is not enabled.

To solve this problem, you can follow the instructions on the following KB article.

http://support.microsoft.com/kb/914277/en-us

HTH.

Thursday, February 9, 2012

asp.net 2.0 data base connection problem.....

we have Sql Server 2000 and Sql Server 2005 IN A SINGLE MACHINE.

when connecting with data base Sql Server 2000 with asp.net 2.0 application ,an error occur

"Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding."

can anyone suggest any idea to solve this problem...

thanking u.

Hi niladrisekharghosh,

Execute your query in your in Query Analyzer to see how long it takes.The default sql connection timeout is 30s so if it takes more than 30s to finish your query you have reset the timeout(or you have to optimize your query):

myCommand.CommandTimeout = 180 (more than 30s)

Hope it helps.

|||

You can increate the query timeout, on the connection there is a property called Timeout =

ASP.NET 1.1 connecting to DBF

Hi all,
My problem is :
I have ASP.NET 1.1 app that must connect to existing DBF data files.
I tried to do this with existing ODBC for DBF but I have following problem :
Either if DBF file had appropriate index NTX file, the unknown exception
occured or if index didn't exist than the query seems to return result
without WHERE clause which unfortunately exists.
I fount 3-rd party drivers (Data Direct) but the price (4000$) per processor
is very expensive for me.
Did anyone have similar problem and how he solved it?
Does exist cheaper solution?
Toni
Hi Toni,
Which "ODBC for DBF" are you using? FoxPro files are DBFs but there are
other DBF files that aren't in the exact same format, and your mention of
NTX index files makes me think yours are not FoxPro files (they have CDX
indexes). There is a FoxPro and Visual FoxPro ODBC driver, but I don't think
it will read DBFs that have NTX indexes correctly.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"Toni Cvetkovski" <tonic@.semos.com.mk> wrote in message
news:e7pJt3evFHA.3984@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> My problem is :
> I have ASP.NET 1.1 app that must connect to existing DBF data files.
> I tried to do this with existing ODBC for DBF but I have following problem
> : Either if DBF file had appropriate index NTX file, the unknown exception
> occured or if index didn't exist than the query seems to return result
> without WHERE clause which unfortunately exists.
> I fount 3-rd party drivers (Data Direct) but the price (4000$) per
> processor is very expensive for me.
> Did anyone have similar problem and how he solved it?
> Does exist cheaper solution?
> Toni
>
>
>

ASP.NET 1.1 connecting to DBF

Hi all,
My problem is :
I have ASP.NET 1.1 app that must connect to existing DBF data files.
I tried to do this with existing ODBC for DBF but I have following problem :
Either if DBF file had appropriate index NTX file, the unknown exception
occured or if index didn't exist than the query seems to return result
without WHERE clause which unfortunately exists.
I fount 3-rd party drivers (Data Direct) but the price (4000$) per processor
is very expensive for me.
Did anyone have similar problem and how he solved it?
Does exist cheaper solution?
ToniHi Toni,
Which "ODBC for DBF" are you using? FoxPro files are DBFs but there are
other DBF files that aren't in the exact same format, and your mention of
NTX index files makes me think yours are not FoxPro files (they have CDX
indexes). There is a FoxPro and Visual FoxPro ODBC driver, but I don't think
it will read DBFs that have NTX indexes correctly.
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@.msn.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden
"Toni Cvetkovski" <tonic@.semos.com.mk> wrote in message
news:e7pJt3evFHA.3984@.TK2MSFTNGP09.phx.gbl...
> Hi all,
> My problem is :
> I have ASP.NET 1.1 app that must connect to existing DBF data files.
> I tried to do this with existing ODBC for DBF but I have following problem
> : Either if DBF file had appropriate index NTX file, the unknown exception
> occured or if index didn't exist than the query seems to return result
> without WHERE clause which unfortunately exists.
> I fount 3-rd party drivers (Data Direct) but the price (4000$) per
> processor is very expensive for me.
> Did anyone have similar problem and how he solved it?
> Does exist cheaper solution?
> Toni
>
>
>