473,761 Members | 5,578 Online
Bytes | Software Development & Data Engineering Community
+ 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 5354
aj (ro****@mcdonal ds.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_connec tion=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****@sommarsk og.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
4495
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 Server 6.1 with the SQL Server 2000 JDBC Driver. The background: 1. I have downloaded the SQL Server 2000 JDBC Driver and installed it on the web server.
1
2028
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 brief as possible - the reason I didn't post this to a newsgroup is that I don't want to hear any more hype or links to benchmarks (since the vast majority of the benchmarks don't test concurent/mixed-transaction environments). (I am also posting a...
0
1316
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 users should be served at the same time. The app is running on a pc and is always available. But the problem is that the data base (DB2-UDB) is on a AS400 which is rebooted every night. That means that the JDBC connections become invalid. But...
2
1573
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
9679
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 All my projects croake coz of this. Did ibm pull the jdbc net driver? if yes, what's to be used instead? Also, I noticed that there's no JDBC applet service anymore!
3
10278
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 to provide username and password, the Java API DriverManger.getConnection(String url) does not work. I am not sure if this is because the JDBC driver, or because it does not work for DB2 under solaris. Any comments? Thanks a lot!
3
22839
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, what are my options? Will I have to install db2 connect on every client machine that needs to connect to the DB2 servers? Is the DB2 Connect freely available or will we have to purchase it? I have also read on this group that we can install DB2...
1
2058
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'; If I dont close my connections the above query shows a program running called JDBC Thin Client. If I do alot of JDBC inserts and updates in my Web Application, the query will show many lines of JDBC Thin Client showing up. When I do close my...
1
4199
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 6.7.1 i couldnt make it, as i got the following error Unable to add connection. Cannot establish a connection to jdbc:sqlserver://localhost:1433;databaseName=Northwind using com.microsoft.sqlserver.jdbc.SQLServerDriver (The TCP/IP connection
0
9538
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9353
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10123
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9909
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9788
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6623
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3889
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 we have to send another system
3
3481
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.