473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

JDBC connections w/ AD login?

aj
I'm a newbie w/ SQL Server 2005.

We will be connecting to SQL Server 2005 via JDBC. We have made this
work by using an SQL Server account, rather than an Active Directory
(AD) account, even though SQL Server IS in mixed authentication mode.
Does mixed mode mean you can connect either way, but only using MS SQL
Server interfaces (like Mgmt Studio), and not something like JDBC?

Can we connect using JDBC w/ an AD login? If so, what form does the
login take? Is the login not in 'DOMAIN/LOGIN' form?

What is the best practice for this sort of thing? We would prefer to
use AD logins (that a sysadmin creates) rather than having a separate
(and probably equal) set of SQL Server logins.

Any help appreciated.

thanks

aj
Sep 6 '07 #1
1 5332
aj (ro****@mcdonalds.com) writes:
I'm a newbie w/ SQL Server 2005.

We will be connecting to SQL Server 2005 via JDBC. We have made this
work by using an SQL Server account, rather than an Active Directory
(AD) account, even though SQL Server IS in mixed authentication mode.
Does mixed mode mean you can connect either way, but only using MS SQL
Server interfaces (like Mgmt Studio), and not something like JDBC?
I don't know JDBC, but I would be very surprised if JDBC would not
support SQL authentication
Can we connect using JDBC w/ an AD login? If so, what form does the
login take? Is the login not in 'DOMAIN/LOGIN' form?
No, it's not. When you use Windows authentication you don't specify
any login at all. All you do is to specify something like
"Trusted_connection=yes" or "Integrated Security=SSPI" in the connect
string. (Again, since I don't know JDBC, I cannot say how you do
there.) You will then log into to SQL Server with the Windows user
you are already logged in with in Windows. That is, you cannot
log in as DOMAIN\Knutte in Windows, and the log in as DOMAIN\Evapeva
in SQL Server.
What is the best practice for this sort of thing? We would prefer to
use AD logins (that a sysadmin creates) rather than having a separate
(and probably equal) set of SQL Server logins.
Windows authentication is considered best practice, although there
are some improvements with SQL logins in SQL 2005.

Windows authentication is also better from a user perspective, as
SQL logins means users will need to know one more username and
password.

The situation when you need SQL login is when Windows authentication
will not work, for instance if there are users accessing SQL Server
from a non-trusted domain.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Sep 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: JShurmatz | last post by:
If anyone can shed some light on this problem I would greatly appreciate it. I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web...
1
by: bogachkov | last post by:
Hello Joe Over the past several years, I have found your responses to jdbc usage/driver related issues to be extremely helpful. I am sure that you're very busy so I will make my question as...
0
by: Robert Schneider | last post by:
Hello everybody, we have the following problem with our Java application: Within our app we have connection pool for JDBC connections which always should be opened. We need this since several...
2
by: soup_or_power | last post by:
How do I configure the MS-SQLSERVER to accept JDBC connections and process the sql? I'm using SQLSERVER 2000 on Windows NT. Thanks for your help
2
by: Hans Horn | last post by:
Folks, I just upgraded to ESE UDBv91 (from v82) and found that there's no COM.ibm.db2.jdbc.net.DB2Driver in db2java.zip anymore. the only one that's there is the COM.ibm.db2.jdbc.app.DB2Driver...
3
by: %NAME% | last post by:
When using embedded SQL for db2 under solaris, you do not need to give username and password since the system will use your unix-login as default credential. However, with JDBC seems I always need...
3
by: Anoop | last post by:
Is it true that there are no type 4 jdbc drivers to connect to a DB2 server v7.1? The DB2 server is hosted on ACF2 (OS/390). We would be connecting from windows and solaris boxes. If it is true,...
1
by: chicago1985 | last post by:
I am always checking if any of my JDBC has Database leaks with our Oracle 9i database. Here is what I use in SQL Plus: select username, program from v$session where username = 'myUserSchemaName';...
1
by: thesti | last post by:
hello, i tried to connect to SQL Server 2000 on my localhost through JDBC. i used the Microsoft SQL Server JDBC Driver 2.0, i was trying to add a new Entity Class from Databases... in Netbean...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.