Showing posts with label connections. Show all posts
Showing posts with label connections. Show all posts

Monday, March 12, 2012

ql server does not allow remote connections

hi,

sql server 2005 express is installed on comp1. my client application is installed on comp2 and comp3. all comps have win xp. when i run my application, it can't connect to sql server express. i got the following message:

an error has occured while establishing a connection to the server. when connecting to sql server 2005, the failure may be caused by the fact that under the default settings sql server does not allow remote connections. (provider: sql network interfaces, error 26 - error locating server/instance specified)

so, how can i solve this problem, to connect to the server?

hi,

SQLExpress installs by default disabling network protocols so that only local connections are available..

you have to run the SQL Server Surface Area Configuration (for services and connections) and enable remote connections..

then run SQL Server Configuration Manager and, in the SQL Server 2005 Network Configuration, enable the desired/required protocol(s) for the instance you are interested with...

additionally, you have to configure firewall exceptions on the pc hosting SQLExpress..

regards

|||

These articles will help walk you through Andrea's suggestions:

Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx

Configuration -Connect to SQL Express and ‘Stay Connected’
http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html

Configuration - Guideline for Connectivity Question Posting
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

|||thanx a lot both !

Saturday, February 25, 2012

Q: username authenticated

Hello,
In SQL, suser_sname() gives me connection user name (I am using a single
user to create all connections), I authenticate users through a login form
aginst a SQL login table. Is there any way I can get a username authenticated
in an SQL query?
Thanks,Jim,
SELECT USER_NAME() will return the database user name. Is this what you are
asking for?
HTH
Jerry
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:04775C04-27FA-42CD-A766-BFF215EED008@.microsoft.com...
> Hello,
> In SQL, suser_sname() gives me connection user name (I am using a single
> user to create all connections), I authenticate users through a login form
> aginst a SQL login table. Is there any way I can get a username
> authenticated
> in an SQL query?
> Thanks,
>|||Hi Jerry,
Thanks for reply. That returns dbo.
I need the username that I used to login in my ASP.Net application, not dbo
or not connection user. It is the used authenticated through a form
authentication. Is there any way I can get the user name in my query for a
View.
"Jerry Spivey" wrote:
> Jim,
> SELECT USER_NAME() will return the database user name. Is this what you are
> asking for?
> HTH
> Jerry
> "JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
> news:04775C04-27FA-42CD-A766-BFF215EED008@.microsoft.com...
> > Hello,
> >
> > In SQL, suser_sname() gives me connection user name (I am using a single
> > user to create all connections), I authenticate users through a login form
> > aginst a SQL login table. Is there any way I can get a username
> > authenticated
> > in an SQL query?
> >
> > Thanks,
> >
>
>|||Hmmm...unless the value is written to a table somewhere as part of your
application, I'm not aware of a way to determine that via T-SQL.
HTH
Jerry
"JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
news:8E72154A-20ED-4E6B-B03D-4B6819CD4FEB@.microsoft.com...
> Hi Jerry,
> Thanks for reply. That returns dbo.
> I need the username that I used to login in my ASP.Net application, not
> dbo
> or not connection user. It is the used authenticated through a form
> authentication. Is there any way I can get the user name in my query for a
> View.
> "Jerry Spivey" wrote:
>> Jim,
>> SELECT USER_NAME() will return the database user name. Is this what you
>> are
>> asking for?
>> HTH
>> Jerry
>> "JIM.H." <JIMH@.discussions.microsoft.com> wrote in message
>> news:04775C04-27FA-42CD-A766-BFF215EED008@.microsoft.com...
>> > Hello,
>> >
>> > In SQL, suser_sname() gives me connection user name (I am using a
>> > single
>> > user to create all connections), I authenticate users through a login
>> > form
>> > aginst a SQL login table. Is there any way I can get a username
>> > authenticated
>> > in an SQL query?
>> >
>> > Thanks,
>> >
>>