[DUG] Delphi failed login to MSSQL
David Brennan
dugdavid at dbsolutions.co.nz
Thu Mar 25 23:29:44 NZDT 2010
If you are using integrated security then the user needs a server login in
the form Domain\UserName or if not on a domain then ServerName\UserName (it
is possible that BUILTIN\Users works too, tbh I have never played with
that).
If the user is already able to connect to the server using integrated
security on MSSQL Management Studio then this may mean that they already
have a server login in that form.
If they do have a valid integrated security server login then the next
obstacle is that they need to be setup as a database user in the database
(basically granted access to the database). You should be able to do this
from SQL Server Management Studio when going into the security settings.
There are a few weird things which can happen with database users getting
mismatched when copying databases between SQL Servers which could cause you
a problem but if that happens while trying to grant database access then you
should get an error message back that you can investigate.
Cheers,
David.
-----Original Message-----
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of John Bird
Sent: Thursday, 25 March 2010 9:36 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Delphi failed login to MSSQL
I have a connection to a MSSQL database that fails if the logged in user is
a non-administrative user on Windows XP
This is the connection string:
DefaultConnectionString:='Provider=SQLOLEDB.1;'
+'Integrated Security=SSPI;Persist Security Info=False;'
+'User ID=sa;Initial Catalog=mobile_xx;'
+'Data Source=localhost;Use Procedure for Prepare=1;'
+'Auto Translate=True;Packet Size=4096;'
+'Workstation ID=DELPHI-207;'
+'Use Encryption for Data=False;'
+'Tag with column collation when possible=False';
Same non-admin user can run MSSQL management studio but also cannot connect
to the database.
I think the problem is using Windows authentication for the connection - a
non-admin user is not enough?
Anyone have ideas on what settings need to be changed to allow logins for
non-admin users? This connection could be made read-only if that makes it
possible to connect. (Note - other programs can access the same database
as a non-admin user).
John
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
unsubscribe
More information about the Delphi
mailing list