Unix Technical Forum

sql server remote connection

This is a discussion on sql server remote connection within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> i am trying to connect to sql server in a remote database by using windows > authentication. I tried ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 09:43 PM
=?Utf-8?B?dWRheQ==?=
 
Posts: n/a
Default sql server remote connection

i am trying to connect to sql server in a remote database by using windows
> authentication. I tried to connect using php and cgi. The apache service
> under which i am running my cgi or php is under localsystem account. If i
> change it to administrator account, i am able to connect to remote sql server
> using windows authentication. But due to some limitations i want the apache
> server/service to be run only on localsystem account, but to connect to
> remote sql database using windows authentication. ( I dont want to use mixed
> mode in SQL)Is it possible to connect using cgo or php?If it is possible what
> is the connection string to be used? Or is SQLAuthenticatin compulsary be
> used in connectng to remote sql server?.
> the connection string that i am using are given below:
>
> "Provider=sqloledb;Network Library=DBMSSOCN;Data Source=PMP3,1433;Initial
> Catalog=PMP_V3_0;Integrated Security=SSPI";
>
> strConnection = _T("Driver={SQL Server};Server=MyServerName;"
> "Trusted_Connection=yes;"
> "Database=MyDatabaseName;");


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 09:46 PM
Srik Raghavan
 
Posts: n/a
Default Re: sql server remote connection

Ensure that an SPN is registerd in active directory for the sqlserver
account. only kerberos will work in this case unless you use sql auth. for
kerberos to work the SPN associated with sqlserver must be registered in
active directory.

"uday" <uday@discussions.microsoft.com> wrote in message
news:C67F14FD-FEAB-415B-986F-A0107CD1C814@microsoft.com...
> i am trying to connect to sql server in a remote database by using windows
>> authentication. I tried to connect using php and cgi. The apache service
>> under which i am running my cgi or php is under localsystem account. If i
>> change it to administrator account, i am able to connect to remote sql
>> server
>> using windows authentication. But due to some limitations i want the
>> apache
>> server/service to be run only on localsystem account, but to connect to
>> remote sql database using windows authentication. ( I dont want to use
>> mixed
>> mode in SQL)Is it possible to connect using cgo or php?If it is possible
>> what
>> is the connection string to be used? Or is SQLAuthenticatin compulsary be
>> used in connectng to remote sql server?.
>> the connection string that i am using are given below:
>>
>> "Provider=sqloledb;Network Library=DBMSSOCN;Data Source=PMP3,1433;Initial
>> Catalog=PMP_V3_0;Integrated Security=SSPI";
>>
>> strConnection = _T("Driver={SQL Server};Server=MyServerName;"
>> "Trusted_Connection=yes;"
>> "Database=MyDatabaseName;");

>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:48 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com