Thursday, March 29, 2012

Can't get more than first field to evaluate.

I am having trouble getting an

IMBogus1 -

Can you provide more details about your problem? I'm afraid you haven't given us enough information to even know what you were doing when you had problems.

thanks,

|||We are still waiting on information from you. If we don’t hear from you in the next seven days, we will delete the thread. We do this to keep the system full of useful information for customers searching for answers and focus expert attention on active unanswered questions.|||

The trouble I am having is doing an evaluation expression of multiple results and looking for the entire sum of the results in my evaluation expression. Instead it only returns the sum or count of the first result field and ignores all the other result fields.

Thanks,

Pete

|||

Pete -

I can't tell from your description whether you are having this issue with a feature of Team Edition for Database Professionals, or whether you're having some sort of general Visual Studio problem. Can you provide a little more background? What Visual Studio feature are you using when you encountering this problem? Is this something you are running in to while using the Database Unit Testing features?

|||i am working on sql reporting|||

Ah, okay. I've moved your thread to the SQL Server Reporting Services forum, where you can get a better response about SQL Server Reporting questions.

Can't get mirroring working for all DBs?

I'm getting the following errors when trying to set up mirroring for a DB.
[PRINCIPAL]
Date3/2/2007 2:52:06 PM
LogSQL Server (Current - 3/5/2007 8:44:00 AM)
Sourcespid99
Message
Communications to the remote server instance 'TCP://SQL2:5022' failed before
database mirroring was fully started. The ALTER DATABASE command failed.
Retry the command when the remote database is started.
Date3/2/2007 2:52:06 PM
LogSQL Server (Current - 3/5/2007 8:44:00 AM)
Sourcespid99
Message
Error: 1413, Severity: 16, State: 1.
Date3/2/2007 2:52:06 PM
LogSQL Server (Current - 3/5/2007 8:44:00 AM)
Sourcespid37s
Message
The mirroring connection to "TCP://SQL2:5022" has timed out for database
"DB1" after 10 seconds without a response. Check the service and network
connections.
Date3/2/2007 2:52:06 PM
LogSQL Server (Current - 3/5/2007 8:44:00 AM)
Sourcespid37s
Message
Error: 1479, Severity: 16, State: 1.
[MIRROR]
Date3/2/2007 2:52:49 PM
LogSQL Server (Current - 3/5/2007 8:46:00 AM)
Sourcespid35s
Message
The mirroring connection to "TCP://SQL1:5022" has timed out for database
"DB1" after 5 seconds without a response. Check the service and network
connections.
Date3/2/2007 2:52:49 PM
LogSQL Server (Current - 3/5/2007 8:46:00 AM)
Sourcespid35s
Message
Error: 1479, Severity: 16, State: 1.
This only occurs for this particular DB. I have mirroring running
successfully for 4 other DBs. The only difference I can see is that the
problematic DB is significantly larger than the other mirrored DBs... it's
~70GB.
I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
instances.
Please help...
interesting. cant say I've seen this before but trying running consistancy
check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
the timeout.
M.
"slin" <slin@.discussions.microsoft.com> wrote in message
news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
> I'm getting the following errors when trying to set up mirroring for a DB.
> [PRINCIPAL]
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Communications to the remote server instance 'TCP://SQL2:5022' failed
> before
> database mirroring was fully started. The ALTER DATABASE command failed.
> Retry the command when the remote database is started.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Error: 1413, Severity: 16, State: 1.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> The mirroring connection to "TCP://SQL2:5022" has timed out for database
> "DB1" after 10 seconds without a response. Check the service and network
> connections.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> [MIRROR]
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> The mirroring connection to "TCP://SQL1:5022" has timed out for database
> "DB1" after 5 seconds without a response. Check the service and network
> connections.
>
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> This only occurs for this particular DB. I have mirroring running
> successfully for 4 other DBs. The only difference I can see is that the
> problematic DB is significantly larger than the other mirrored DBs... it's
> ~70GB.
> I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
> instances.
> Please help...
|||Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'll
show me what's failing, but not having any luck so far...
-S
"Mark Broadbent" wrote:

> interesting. cant say I've seen this before but trying running consistancy
> check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
> the timeout.
> M.
>
> "slin" <slin@.discussions.microsoft.com> wrote in message
> news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
>
>
|||Well... I finally got it working. It seemed like the large physical size of
the transaction log file was causing the problem. The log file was 200GB,
but it was only 1% used. I shrunk the log file size back down to 1GB and did
the whole restore/backup process and mirroring started right up.
"slin" wrote:
[vbcol=seagreen]
> Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'll
> show me what's failing, but not having any luck so far...
> -S
> "Mark Broadbent" wrote:
sql

Can't get mirroring working for all DBs?

I'm getting the following errors when trying to set up mirroring for a DB.
[PRINCIPAL]
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid99
Message
Communications to the remote server instance 'TCP://SQL2:5022' failed before
database mirroring was fully started. The ALTER DATABASE command failed.
Retry the command when the remote database is started.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid99
Message
Error: 1413, Severity: 16, State: 1.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid37s
Message
The mirroring connection to "TCP://SQL2:5022" has timed out for database
"DB1" after 10 seconds without a response. Check the service and network
connections.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid37s
Message
Error: 1479, Severity: 16, State: 1.
[MIRROR]
Date 3/2/2007 2:52:49 PM
Log SQL Server (Current - 3/5/2007 8:46:00 AM)
Source spid35s
Message
The mirroring connection to "TCP://SQL1:5022" has timed out for database
"DB1" after 5 seconds without a response. Check the service and network
connections.
Date 3/2/2007 2:52:49 PM
Log SQL Server (Current - 3/5/2007 8:46:00 AM)
Source spid35s
Message
Error: 1479, Severity: 16, State: 1.
This only occurs for this particular DB. I have mirroring running
successfully for 4 other DBs. The only difference I can see is that the
problematic DB is significantly larger than the other mirrored DBs... it's
~70GB.
I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
instances.
Please help...interesting. cant say I've seen this before but trying running consistancy
check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
the timeout.
M.
"slin" <slin@.discussions.microsoft.com> wrote in message
news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
> I'm getting the following errors when trying to set up mirroring for a DB.
> [PRINCIPAL]
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Communications to the remote server instance 'TCP://SQL2:5022' failed
> before
> database mirroring was fully started. The ALTER DATABASE command failed.
> Retry the command when the remote database is started.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Error: 1413, Severity: 16, State: 1.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> The mirroring connection to "TCP://SQL2:5022" has timed out for database
> "DB1" after 10 seconds without a response. Check the service and network
> connections.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> [MIRROR]
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> The mirroring connection to "TCP://SQL1:5022" has timed out for database
> "DB1" after 5 seconds without a response. Check the service and network
> connections.
>
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> This only occurs for this particular DB. I have mirroring running
> successfully for 4 other DBs. The only difference I can see is that the
> problematic DB is significantly larger than the other mirrored DBs... it's
> ~70GB.
> I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
> instances.
> Please help...|||Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'll
show me what's failing, but not having any luck so far...
-S
"Mark Broadbent" wrote:

> interesting. cant say I've seen this before but trying running consistancy
> check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causin
g
> the timeout.
> M.
>
> "slin" <slin@.discussions.microsoft.com> wrote in message
> news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
>
>|||Well... I finally got it working. It seemed like the large physical size of
the transaction log file was causing the problem. The log file was 200GB,
but it was only 1% used. I shrunk the log file size back down to 1GB and di
d
the whole restore/backup process and mirroring started right up.
"slin" wrote:
[vbcol=seagreen]
> Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'
ll
> show me what's failing, but not having any luck so far...
> -S
> "Mark Broadbent" wrote:
>

Can't get mirroring working for all DBs?

I'm getting the following errors when trying to set up mirroring for a DB.
[PRINCIPAL]
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid99
Message
Communications to the remote server instance 'TCP://SQL2:5022' failed before
database mirroring was fully started. The ALTER DATABASE command failed.
Retry the command when the remote database is started.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid99
Message
Error: 1413, Severity: 16, State: 1.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid37s
Message
The mirroring connection to "TCP://SQL2:5022" has timed out for database
"DB1" after 10 seconds without a response. Check the service and network
connections.
Date 3/2/2007 2:52:06 PM
Log SQL Server (Current - 3/5/2007 8:44:00 AM)
Source spid37s
Message
Error: 1479, Severity: 16, State: 1.
[MIRROR]
Date 3/2/2007 2:52:49 PM
Log SQL Server (Current - 3/5/2007 8:46:00 AM)
Source spid35s
Message
The mirroring connection to "TCP://SQL1:5022" has timed out for database
"DB1" after 5 seconds without a response. Check the service and network
connections.
Date 3/2/2007 2:52:49 PM
Log SQL Server (Current - 3/5/2007 8:46:00 AM)
Source spid35s
Message
Error: 1479, Severity: 16, State: 1.
This only occurs for this particular DB. I have mirroring running
successfully for 4 other DBs. The only difference I can see is that the
problematic DB is significantly larger than the other mirrored DBs... it's
~70GB.
I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
instances.
Please help...interesting. cant say I've seen this before but trying running consistancy
check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
the timeout.
M.
"slin" <slin@.discussions.microsoft.com> wrote in message
news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
> I'm getting the following errors when trying to set up mirroring for a DB.
> [PRINCIPAL]
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Communications to the remote server instance 'TCP://SQL2:5022' failed
> before
> database mirroring was fully started. The ALTER DATABASE command failed.
> Retry the command when the remote database is started.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid99
> Message
> Error: 1413, Severity: 16, State: 1.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> The mirroring connection to "TCP://SQL2:5022" has timed out for database
> "DB1" after 10 seconds without a response. Check the service and network
> connections.
> Date 3/2/2007 2:52:06 PM
> Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> Source spid37s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> [MIRROR]
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> The mirroring connection to "TCP://SQL1:5022" has timed out for database
> "DB1" after 5 seconds without a response. Check the service and network
> connections.
>
> Date 3/2/2007 2:52:49 PM
> Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> Source spid35s
> Message
> Error: 1479, Severity: 16, State: 1.
>
> This only occurs for this particular DB. I have mirroring running
> successfully for 4 other DBs. The only difference I can see is that the
> problematic DB is significantly larger than the other mirrored DBs... it's
> ~70GB.
> I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
> instances.
> Please help...|||Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'll
show me what's failing, but not having any luck so far...
-S
"Mark Broadbent" wrote:
> interesting. cant say I've seen this before but trying running consistancy
> check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
> the timeout.
> M.
>
> "slin" <slin@.discussions.microsoft.com> wrote in message
> news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
> > I'm getting the following errors when trying to set up mirroring for a DB.
> >
> > [PRINCIPAL]
> >
> > Date 3/2/2007 2:52:06 PM
> > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > Source spid99
> > Message
> > Communications to the remote server instance 'TCP://SQL2:5022' failed
> > before
> > database mirroring was fully started. The ALTER DATABASE command failed.
> > Retry the command when the remote database is started.
> >
> > Date 3/2/2007 2:52:06 PM
> > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > Source spid99
> > Message
> > Error: 1413, Severity: 16, State: 1.
> >
> > Date 3/2/2007 2:52:06 PM
> > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > Source spid37s
> > Message
> > The mirroring connection to "TCP://SQL2:5022" has timed out for database
> > "DB1" after 10 seconds without a response. Check the service and network
> > connections.
> >
> > Date 3/2/2007 2:52:06 PM
> > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > Source spid37s
> > Message
> > Error: 1479, Severity: 16, State: 1.
> >
> >
> > [MIRROR]
> >
> > Date 3/2/2007 2:52:49 PM
> > Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> > Source spid35s
> > Message
> > The mirroring connection to "TCP://SQL1:5022" has timed out for database
> > "DB1" after 5 seconds without a response. Check the service and network
> > connections.
> >
> >
> > Date 3/2/2007 2:52:49 PM
> > Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> > Source spid35s
> > Message
> > Error: 1479, Severity: 16, State: 1.
> >
> >
> > This only occurs for this particular DB. I have mirroring running
> > successfully for 4 other DBs. The only difference I can see is that the
> > problematic DB is significantly larger than the other mirrored DBs... it's
> > ~70GB.
> >
> > I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
> > instances.
> >
> > Please help...
>
>|||Well... I finally got it working. It seemed like the large physical size of
the transaction log file was causing the problem. The log file was 200GB,
but it was only 1% used. I shrunk the log file size back down to 1GB and did
the whole restore/backup process and mirroring started right up.
"slin" wrote:
> Already did a DBCC CHECKDB... No errors. I'm using Profiler to see if it'll
> show me what's failing, but not having any luck so far...
> -S
> "Mark Broadbent" wrote:
> > interesting. cant say I've seen this before but trying running consistancy
> > check DBCC CHECKDB (refer to BOL) perhaps a corruption in the db is causing
> > the timeout.
> >
> > M.
> >
> >
> > "slin" <slin@.discussions.microsoft.com> wrote in message
> > news:E52523C6-0B5C-4507-B6FA-9439EFD1C02E@.microsoft.com...
> > > I'm getting the following errors when trying to set up mirroring for a DB.
> > >
> > > [PRINCIPAL]
> > >
> > > Date 3/2/2007 2:52:06 PM
> > > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > > Source spid99
> > > Message
> > > Communications to the remote server instance 'TCP://SQL2:5022' failed
> > > before
> > > database mirroring was fully started. The ALTER DATABASE command failed.
> > > Retry the command when the remote database is started.
> > >
> > > Date 3/2/2007 2:52:06 PM
> > > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > > Source spid99
> > > Message
> > > Error: 1413, Severity: 16, State: 1.
> > >
> > > Date 3/2/2007 2:52:06 PM
> > > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > > Source spid37s
> > > Message
> > > The mirroring connection to "TCP://SQL2:5022" has timed out for database
> > > "DB1" after 10 seconds without a response. Check the service and network
> > > connections.
> > >
> > > Date 3/2/2007 2:52:06 PM
> > > Log SQL Server (Current - 3/5/2007 8:44:00 AM)
> > > Source spid37s
> > > Message
> > > Error: 1479, Severity: 16, State: 1.
> > >
> > >
> > > [MIRROR]
> > >
> > > Date 3/2/2007 2:52:49 PM
> > > Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> > > Source spid35s
> > > Message
> > > The mirroring connection to "TCP://SQL1:5022" has timed out for database
> > > "DB1" after 5 seconds without a response. Check the service and network
> > > connections.
> > >
> > >
> > > Date 3/2/2007 2:52:49 PM
> > > Log SQL Server (Current - 3/5/2007 8:46:00 AM)
> > > Source spid35s
> > > Message
> > > Error: 1479, Severity: 16, State: 1.
> > >
> > >
> > > This only occurs for this particular DB. I have mirroring running
> > > successfully for 4 other DBs. The only difference I can see is that the
> > > problematic DB is significantly larger than the other mirrored DBs... it's
> > > ~70GB.
> > >
> > > I'm running SQL 2005 Enterprise x64 for both principal and mirror SQL
> > > instances.
> > >
> > > Please help...
> >
> >
> >

Tuesday, March 27, 2012

Can't get MAX DISTINCT to work the way I want it to

I have 3 numeric fields in a table that need to be returned by a query:
SupervisorLineID (autoincrementing ordinal), SupervisorID and LineID.
SupervisorLineID is the only definite unique value; there are cases where
one supervisor can manage more than one production line, and thus be
represented many times in the table. There are also cases where more than
one supervisor can manage a line, complicating things further.
What I need to return is one unique record for each LineID, with the highest
SupervisorLineID number as the selecting factor, along with the matching
SupervisorID. I tried using MAX DISTINCT on the SupervisorLineID, but oddly
enough it caused the opposite of what I expected: all supervisors were
returned EXCEPT the one represented by the max SupervisorLineID per line!
This caused lines to appear more than once in many cases.
I've tried various approaches and none produce the desired results. I know
this has to be possible-- any ideas?
Thanks,
Randall ArnoldRandall Arnold wrote:

> I've tried various approaches and none produce the desired results.
> I know this has to be possible-- any ideas?
Please provide DDL and some testdata, you are talking about more than 1
table I presume? We can't guess all the tablestructures.
Kind regards,
Stijn Verrept|||Hi
Since you have not posted a table stucture + sample data I did some testing
on Northwind database and Orders table
SELECT * FROM Orders
WHERE OrderDate=(SELECT MAX(OrderDate) from Orders O
WHERE O.CustomerId=Orders.CustomerId)
Getting highest OrderDate for each Customer
"Randall Arnold" <randall.arnold@.nokia.com> wrote in message
news:OwClf.16116$Nb2.285732@.news1.nokia.com...
>I have 3 numeric fields in a table that need to be returned by a query:
>SupervisorLineID (autoincrementing ordinal), SupervisorID and LineID.
>SupervisorLineID is the only definite unique value; there are cases where
>one supervisor can manage more than one production line, and thus be
>represented many times in the table. There are also cases where more than
>one supervisor can manage a line, complicating things further.
> What I need to return is one unique record for each LineID, with the
> highest SupervisorLineID number as the selecting factor, along with the
> matching SupervisorID. I tried using MAX DISTINCT on the
> SupervisorLineID, but oddly enough it caused the opposite of what I
> expected: all supervisors were returned EXCEPT the one represented by the
> max SupervisorLineID per line! This caused lines to appear more than once
> in many cases.
> I've tried various approaches and none produce the desired results. I
> know this has to be possible-- any ideas?
> Thanks,
> Randall Arnold
>|||Randall wrote on Wed, 07 Dec 2005 14:41:50 GMT:

> I have 3 numeric fields in a table that need to be returned by a query:
> SupervisorLineID (autoincrementing ordinal), SupervisorID and LineID.
> SupervisorLineID is the only definite unique value; there are cases where
> one supervisor can manage more than one production line, and thus be
> represented many times in the table. There are also cases where more than
> one supervisor can manage a line, complicating things further.
> What I need to return is one unique record for each LineID, with the
> highest SupervisorLineID number as the selecting factor, along with the
> matching SupervisorID. I tried using MAX DISTINCT on the
> SupervisorLineID, but oddly enough it caused the opposite of what I expect
ed:
> all supervisors were returned EXCEPT the one represented by the max
> SupervisorLineID per line! This caused lines to appear more than once in
> many cases.
> I've tried various approaches and none produce the desired results. I
> know this has to be possible-- any ideas?
> Thanks,
> Randall Arnold
DISTINCT applies to an entire row, not a single column.
Without DDL I've had to make some assumptions.
I think this might work ...
SELECT A.LineID, A.SLID, B.SupervisorID FROM
(SELECT LineID, MAX(SupervisorLineID) AS SLID FROM Table GROUP BY LineID) AS
A)
INNER JOIN Table B ON A.SLID = B.SupervisorLineID AND A.LineID = B.LineID
There's probably an easier way to write this.
Dan|||Actually it's only one table, and I provided the structure (field list) in t
he first post. That's really all there is to the table. Sorry if I didn't
make that clear, but I would have listed other tables if any were involved.
Test data would be as follows:
RecentLineSupervisor_View SupervisorID SupervisorLineID LineID
18 9804 1
108 9913 1
128 -->9964 1
7 9715 19
11 9752 19
118 -->9894 19
1 9831 20
24 9688 20
108 -->9927 20
6 9782 22
77 9771 22
78 -->9978 22
As I said, I just want to see each LineID represented once, with the highest
value for SupervisorLineID determining which record is returned. Desired re
cords marked with arrows.
Thanks,
Randall Arnold
"Stijn Verrept" <stjin@.entrysoft.com> wrote in message news:YLWdnelcNs6FZAveRVnyig@.scarlet.
biz...
> Randall Arnold wrote:
>
>
> Please provide DDL and some testdata, you are talking about more than 1
> table I presume? We can't guess all the tablestructures.
>
> --
>
> Kind regards,
>
> Stijn Verrept|||Randall Arnold wrote:
> I have 3 numeric fields in a table that need to be returned by a query:
> SupervisorLineID (autoincrementing ordinal), SupervisorID and LineID.
> SupervisorLineID is the only definite unique value; there are cases where
> one supervisor can manage more than one production line, and thus be
> represented many times in the table. There are also cases where more than
> one supervisor can manage a line, complicating things further.
>
If those are the only three columns then the combination of
(supervisorid, lineid) should be unique and declared as such -
otherwise your table is full of redundant garbage. Therefore the answer
would be:
SELECT supervisorid, lineid
FROM your_table AS T
WHERE supervisorlineid =
(SELECT MAX(supervisorlineid)
FROM your_table
WHERE lineid = T.lineid) ;
However, you then seem to be breaking the golden rule of using an
IDENTITY column - don't assign any business significance to it. In
future, please post DDL and sample data so that we don't have to guess
your requirements.
David Portas
SQL Server MVP
--|||Please don't assume I designed this table; rest assured I would NOT have
taken this approach! I'm stuck with trying to extract meaningful
information from a previous employee's cowboy database. In fact, the only
reason I have to create this query at all is to select a single
supervisor-to-line record for each line, and that ability *should* have been
designed into the structure. Had the former data manager done his job
properly, I wouldn't be dealing with this.
As for DDL and structure, it seemed to me I posted enough info. As I told
another gentleman, had there been another table involved I would have
indicated so. I also figured that listing the only 3 fields involved and
describing their type and role would cover it; note that everyone who
provided a suggestion based on a single table was on the right track so it
seems to me it wasn't TOO confusing. But I'll try to be more pedantic in
the future <g>.
Anyway, it looks like one of the methods listed here will work. Thanks all,
Randall Arnold
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:1133968276.805046.224980@.o13g2000cwo.googlegroups.com...
> Randall Arnold wrote:
> If those are the only three columns then the combination of
> (supervisorid, lineid) should be unique and declared as such -
> otherwise your table is full of redundant garbage. Therefore the answer
> would be:
> SELECT supervisorid, lineid
> FROM your_table AS T
> WHERE supervisorlineid =
> (SELECT MAX(supervisorlineid)
> FROM your_table
> WHERE lineid = T.lineid) ;
> However, you then seem to be breaking the golden rule of using an
> IDENTITY column - don't assign any business significance to it. In
> future, please post DDL and sample data so that we don't have to guess
> your requirements.
> --
> David Portas
> SQL Server MVP
> --
>|||Randall Arnold wrote:
> Please don't assume I designed this table; rest assured I would NOT have
> taken this approach! I'm stuck with trying to extract meaningful
> information from a previous employee's cowboy database. In fact, the only
> reason I have to create this query at all is to select a single
> supervisor-to-line record for each line, and that ability *should* have be
en
> designed into the structure. Had the former data manager done his job
> properly, I wouldn't be dealing with this.
> As for DDL and structure, it seemed to me I posted enough info. As I told
> another gentleman, had there been another table involved I would have
> indicated so. I also figured that listing the only 3 fields involved and
> describing their type and role would cover it; note that everyone who
> provided a suggestion based on a single table was on the right track so it
> seems to me it wasn't TOO confusing. But I'll try to be more pedantic in
> the future <g>.
> Anyway, it looks like one of the methods listed here will work. Thanks al
l,
> Randall Arnold
>
In the absence of the DDL it's reasonable to assume that we lack the
information about the alternate key(s) because that information was so
conspicuously absent from your post. I didn't assume you designed it. I
assumed you'd want to fix it.
David Portas
SQL Server MVP
--|||> As for DDL and structure, it seemed to me I posted enough info.
That's all fine and good. However, in order for us to provide you with a
meaningful, accurate and testable solution, instead of guessing, we ask for
a bit more. I don't understand where the vehement objection to providing
proper specs comes from. The prevailing opinion seems to be that we are
lazy and are trying to be a pain in the ass. Nothing could be further from
the truth... please read http://www.aspfaq.com/5006 before assuming that
what you provide should be enough for anyone to solve the problem.|||There was no "vehement objection" to providing proper specs, Aaron. Just a
minor goof IMO on my part based on personal tendencies (ie, omitting
reference to what *isn't* there such as other tables). I don't understand
where this perception of a "vehement objection" comes from. Certainaly not
from anything I've posted! Personally, I'm all too eager to provide as much
detail as possible. Again, I *thought* I had. Mea culpa. But no need for
a hangin', please. The verbal beating has been enough.
This is a silly axle anyway. I gotta unwrap myself and get back to work
<g>.
Randall Arnold
"Aaron Bertrand [SQL Server MVP]" <ten.xoc@.dnartreb.noraa> wrote in message
news:eyRFaW0%23FHA.3676@.tk2msftngp13.phx.gbl...
> That's all fine and good. However, in order for us to provide you with a
> meaningful, accurate and testable solution, instead of guessing, we ask
> for a bit more. I don't understand where the vehement objection to
> providing proper specs comes from. The prevailing opinion seems to be
> that we are lazy and are trying to be a pain in the ass. Nothing could be
> further from the truth... please read http://www.aspfaq.com/5006 before
> assuming that what you provide should be enough for anyone to solve the
> problem.
>

Cant get list of servers

I can't get my server to show with the DMO function ListAvailableSQLServers or with the osql -L flag. The OS is windows 2000, but the drive is fat32 and doesn't have Directory Service.
Do you need NTFS to have Directory Service, and does SQL Server need Directory Service to broadcast its available servers?
I've got Visual Studio .Net and had no luck when I searched for an answer.I meant Active Directory.|||no neither ADS nor NTFS is essential for server listing. r u able to connect to other servers using EM or QA? is EM showing the complete list? of not there could be issues with the broadcasting server. check if 1433 port is not blocked by any firewall programa at server end. also check that the server is not hidden by server network utility >> TCPIP >> hide server.|||It is actually MSDE, so I don't have EM or QA. But I have Visual Studio .Net and it has Server Explorer which functions much like EM and QA. The databases and programs I use to connect are on the same machine. I use this to learn/practice SQL Server. I don't have a machine with a server OS, so I can't check "proper" server operation.
But yes, Server Explorer connects and shows my SS instance. I can use osql, programs I create in VB.net, or even web pages scripted with ADO or DMO objects to connect and modify the SS databases, as long as I specify the server. The only thing I can't seem to do is get a list of the servers (I only have one server).
I have a software firewall, but only have it running while my dial-up is online.
Not sure what you mean by "server network utility >> TCPIP >> hide server". I have the server/client tools that were included (in the tools\binn folder); the program cnfgsvr.exe sounds like a good place to start. I'll check it out.
Thanks|||the server network utility i am referring to uses ...\bin\svrnetcn.exe (non-msde version). the exe u have identified may work as well, not sure. for same machine sql server uses shared-memory net lib. if TCPIP or Named Pipe is not enabled, i have seen that OSQL -L fails to identify local server...|||Yeah, that's the one,SVRNETCN.EXE, the Sql Server Network Utility. Both Tcp/Ip and Named Pipes protocols are enabled, the default port 1433 is set, and the Hide Server option is unchecked.
I forgot to mention that my MSDE was included free with my VS.Net. When I installed it, I chose all the defaults which gave my sql server an instance name of VSDOTNET. I don't know why it didn't just install with the default computername. Maybe that has something to do with it?
So I used the Sql Server Client Network Utility, CLICONFG.EXE, and created aliases, one for tcp/ip and one for named pipes. The aliases were listed properly with OSQL -L and using the DMO App.ListAvailableSQLServers() function. I don't know why computername\vsdotnet won't list without the aliases.

Cant get linq to recognize that sproc has changed

I have a GridView that is populated by a stored procedure via linq. I changed the stored procedure to return an additional column, but I can't get the additional column to show up in the GridView. The GridView has autogeneratecolumns=true, so if I were using a SqlDataSource the new column would show up automagically. But now it is not showing up and I cannot reference it. I can't figure out how to make linq recognize that my stored procedure has changed.

I have tried deleting the sproc definition from the dbml file, making sure the partial class is removed the .vb file, refreshing the stored procedures list in database explorer, and adding the sproc definition back again (a hassle), but still it insists on defining only the original columns and not the new column.

How do get linq to get back in sync with the database?

Is there any way to get linq back in sync after database changes??

sql

Can't get linked servers to work

I'm having trouble getting a new linked server to work.
Server Mfr is 2005 Dev (sp1) and is the 'local' server.
Server Krypton is 2000 EE sp3 and is the target server I need to link to and
query.
I have a valid Windows login on both systems and I'm in the sysadmin group
on both servers.
After linking the servers using Mgt Studio, I ran this:
EXEC sp_addlinkedsrvlogin @.rmtsrvname = 'KRYPTON', @.useself = 'true'
When I try running this query:
SELECT * FROM OPENQUERY(KRYPTON, 'SELECT * FROM CRICUST WHERE CustName =
''Acme''')
I get these errors:
OLE DB provider "SQLNCLI" for linked server "KRYPTON" returned message
"Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18452, Level 14, State 1, Line 0
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.
Can you see what I'm missing?
Thanks!
djNo login credentials are being passed to the remote server.
Did you set everything up needed for delegation?
Have you tried with a SQL Login to see if the basics parts
(without the delegation issues) are working? For the linked
server, Just map all users to a valid SQL login on the
remote server to see if that works.
-Sue
On Thu, 10 Aug 2006 06:40:02 -0700, dj
<dj@.discussions.microsoft.com> wrote:

>I'm having trouble getting a new linked server to work.
>Server Mfr is 2005 Dev (sp1) and is the 'local' server.
>Server Krypton is 2000 EE sp3 and is the target server I need to link to an
d
>query.
>I have a valid Windows login on both systems and I'm in the sysadmin group
>on both servers.
>After linking the servers using Mgt Studio, I ran this:
>EXEC sp_addlinkedsrvlogin @.rmtsrvname = 'KRYPTON', @.useself = 'true'
>When I try running this query:
>SELECT * FROM OPENQUERY(KRYPTON, 'SELECT * FROM CRICUST WHERE CustName =
>''Acme''')
>I get these errors:
>OLE DB provider "SQLNCLI" for linked server "KRYPTON" returned message
>"Communication link failure".
>Msg 10054, Level 16, State 1, Line 0
>TCP Provider: An existing connection was forcibly closed by the remote host
.
>Msg 18452, Level 14, State 1, Line 0
>Login failed for user '(null)'. Reason: Not associated with a trusted SQL
>Server connection.
>Can you see what I'm missing?
>Thanks!
>dj|||Hi Sue -
We're not on AD, so I believe delegation isn't an option.
If I'm using Windows authentication and my account exits on both machines,
do I still need to pass credentials? I thought the 'useself' parameter took
care of that.
Or am I just very confused (quite possibly)?
Thanks.
"Sue Hoegemeier" wrote:

> No login credentials are being passed to the remote server.
> Did you set everything up needed for delegation?
> Have you tried with a SQL Login to see if the basics parts
> (without the delegation issues) are working? For the linked
> server, Just map all users to a valid SQL login on the
> remote server to see if that works.
> -Sue
> On Thu, 10 Aug 2006 06:40:02 -0700, dj
> <dj@.discussions.microsoft.com> wrote:
>
>|||You are correct that if you aren't using AD, you can't use
delegation. Delegation will pass your authentication
information from one server to another. useself just says to
use the current login for authentication against the remote
server but doesn't really manage any of the passing of
credentials or how that will work (or not work).
Try using a SQL login for the security mappings to the
remote linked server.
-Sue
On Thu, 10 Aug 2006 11:07:01 -0700, dj
<dj@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi Sue -
>We're not on AD, so I believe delegation isn't an option.
>If I'm using Windows authentication and my account exits on both machines,
>do I still need to pass credentials? I thought the 'useself' parameter too
k
>care of that.
>Or am I just very confused (quite possibly)?
>Thanks.
>"Sue Hoegemeier" wrote:
>

Cant get LIKE to work

I have the below procedure that will not work- I must be losing my mind, this is not that difficult - mental roadblock for me.

Using SQL Server 2000 to create SP being called by ASP.Net with C# code behind

stored procedure only returns if input exactly matches L_Name

PROCEDURE newdawn.LinkNameLIKESearch
@.L_Name nvarchar(100)
AS
SELECT [L_Name], [L_ID], [C_ID], [L_Enabled], [L_Rank], [L_URL]
FROM tblContractorLinkInfo
WHERE L_Name LIKE @.L_Name
RETURN

I tried: WHERE L_Name LIKE ' % L_Name % ' no luck. What am I missing?

Thank you

try it like this:

LIKE '%' + @.L_Name + '%'

|||

Ever have a day when you really fell dumb - I am having way too many of them.

Thank you.

Can't get it to listen on TCP port 1433

Been having SQL Server 2000 running for some time now, but recently it stopped listening on TCP port 1433, the log reports its listening on shared memory, Named pipes and Rpc, but no sign of 127.0.0.1 port 1433 or any errors to say why it won't listen.

I've done a netstat -na and nothing else is listening on that port, tried restarting using the enterprise manager, gonna try restarting the entire Server when everyone has gone home, but I'm pretty sure its been restarted recently.

All the other archive logs going back a few days show its not listening.

Yes, I have used the Server network utility to make sure TCP/IP is enabled and set to 1433, even added a comma and 1434 to see if it will listen on multiple ports, no go.

Any help?
What service pack do you have installed?|||Have you told your firewall to allow connections to Microsoft SQL Server?|||SQL Server 2000 - 8.00.194 build 3790 Service pack 1

Mmmm, isn't SP3 out?
Lets hope it doesn't break it even more, as after the restart of the entire server last night, its now not responding to TCP connections locally 127.0.0.1

Not sure about the firewall, I'll have to check, its been fine with it for the past few years.

|||

SP4 has been out for quite some time. Here is a handy web site which lists all of the hot fix and service packs which have been released http://www.sqlsecurity.com/FAQs/SQLServerVersionDatabase/tabid/63/Default.aspx.

Start by upgrading to SQL 2000 SP4. Odds are a Windows 2000 hot fix shuts down SQL from talking over the net if prior to SP3 as there is a major security flaw prior to SP3 which the SQL Slammer worm expliots.

Can't get into sa account

In SQL Server 2005, I renamed a database but it did not rename it in the
login default database. Since this is the default database for the sa
signon, I can't sign into the SQL Server. I am in a catch-22. I have only
one other login to the SQL Server and it also defaults to the same database
that apparently didn't get renamed :(.
Please help me get access to my SQL Server again,
TerryThis is a multi-part message in MIME format.
--030709040002030508020607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
I answered this in microsoft.public.sqlserver.security.
--
*mike hodgson*
http://sqlnerd.blogspot.com
Terry wrote:
>In SQL Server 2005, I renamed a database but it did not rename it in the
>login default database. Since this is the default database for the sa
>signon, I can't sign into the SQL Server. I am in a catch-22. I have only
>one other login to the SQL Server and it also defaults to the same database
>that apparently didn't get renamed :(.
>Please help me get access to my SQL Server again,
>Terry
>
>
--030709040002030508020607
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>I answered this in microsoft.public.sqlserver.security.</tt><br>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font></span> <b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"><br>
<font face="Tahoma" size="2"><a href="http://links.10026.com/?link=http://sqlnerd.blogspot.com</a></font></span>">http://sqlnerd.blogspot.com">http://sqlnerd.blogspot.com</a></font></span>
</p>
</div>
<br>
<br>
Terry wrote:
<blockquote cite="mid600A72B6-BFBE-4475-BB1A-F6EACEED0CBC@.microsoft.com"
type="cite">
<pre wrap="">In SQL Server 2005, I renamed a database but it did not rename it in the
login default database. Since this is the default database for the sa
signon, I can't sign into the SQL Server. I am in a catch-22. I have only
one other login to the SQL Server and it also defaults to the same database
that apparently didn't get renamed :(.
Please help me get access to my SQL Server again,
Terry
</pre>
</blockquote>
</body>
</html>
--030709040002030508020607--

Can't get into sa account

In SQL Server 2005, I renamed a database but it did not rename it in the
login default database. Since this is the default database for the sa
signon, I can't sign into the SQL Server. I am in a catch-22. I have only
one other login to the SQL Server and it also defaults to the same database
that apparently didn't get renamed .
Please help me get access to my SQL Server again,
Terry
I answered this in microsoft.public.sqlserver.security.
*mike hodgson*
http://sqlnerd.blogspot.com
Terry wrote:

>In SQL Server 2005, I renamed a database but it did not rename it in the
>login default database. Since this is the default database for the sa
>signon, I can't sign into the SQL Server. I am in a catch-22. I have only
>one other login to the SQL Server and it also defaults to the same database
>that apparently didn't get renamed .
>Please help me get access to my SQL Server again,
>Terry
>
>
sql

Can't get into sa account

In SQL Server 2005, I renamed a database but it did not rename it in the
login default database. Since this is the default database for the sa
signon, I can't sign into the SQL Server. I am in a catch-22. I have only
one other login to the SQL Server and it also defaults to the same database
that apparently didn't get renamed .
Please help me get access to my SQL Server again,
TerryI answered this in microsoft.public.sqlserver.security.
*mike hodgson*
http://sqlnerd.blogspot.com
Terry wrote:

>In SQL Server 2005, I renamed a database but it did not rename it in the
>login default database. Since this is the default database for the sa
>signon, I can't sign into the SQL Server. I am in a catch-22. I have only
>one other login to the SQL Server and it also defaults to the same database
>that apparently didn't get renamed .
>Please help me get access to my SQL Server again,
>Terry
>
>

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.
sql

Can''t get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed? The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory? Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.

Can't get IntegratedSecurity with JDBC driver

Hi;

I used SQLServerDatabaseMetaData (which requires a connection to return this data which seems unnecessary) to get:

name: Microsoft SQL Server 2005 JDBC Driver
version: 1.1.1501.101
Passing a url of: jdbc:sqlserver://localhost:1433;DatabaseName=Northwind;IntegratedSecurity=true

I get the error:
Oct 7, 2006 3:46:09 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

I copied over x86\sqljdbc_auth.dll and then it worked. I assume this is required with the jar file. This leads to a couple of questions:

    What are the files xa\x86\sqljdbc_xa.dll & x64 files for? Are they needed?

    The jar file can just travel with my java code. Should the dll do the same or does it need to be in the path and/or the default directory?

    Are there any other files needed or just these two?

thanks - dave

Take a look at the following msdn link

http://msdn2.microsoft.com/en-us/library/ms378428.aspx

http://msdn2.microsoft.com/en-us/library/ms378672.aspx

Hope this helps

|||

sqljdbc_xa dll is for xa transactions. YOu do not need them if you are not using XA transactions.

The intgrated auth dll is required (sqljdbc_auth.dll) if you are using integrated authentication. See the links raj provided to see where to place this dll.

Those are the only two files outside of the jar.

|||

I am working on the windows authentication on a windows 2003 server. So i used the 64 sqljdbs_auth.dll and rebooted . I still get "WARNING: Failed to load the sqljdbc_auth.dll" and i cannot do a windows authnetication.

I do have the dll in the system pth adn have copied the dll to C:\windows\system32 as well. Any ideas?

thanks!

|||Are you using 64 bits version of windows 2003?|||

Hi, Dave,

Where did you copy the sqljdbc_auth.dll? The directions say to "copy the file to a directory on the Windows system path on the computer where the JDBC driver is installed." The statement confuses me a little. Did you copy the file to a specific location or just any location that happens to be in the path?

Thanks,

Stephanie

|||I copied it to the same directory as the jar file.|||I've copied these dll's all over the file system (including WINNT, system32, and the directory the jar file is in) and I still get WARNING: Failed to load the sqljdbc_auth.dll
Is there a call to the object you can make to get this file to load?

Paul|||The reason I asked about making an object call is because of the error statement I get that reads:
SQLException: This driver is not configured for integrated authentication.

How might I configure it?
My connection string is just
"jdbc:sqlserver://serverName:1433;integratedSecurity=true;"|||

Does the instructions at http://msdn2.microsoft.com/en-us/library/ms378428.aspx help. I'll copy them on this post to relieve some of the confusion. Please pay particular attention to the last suggestion about using the –Djava.library.path explicitly. This will allow you to put the dll in one location on your computer and then point the java executable to it such as:

Java.exe –Djava.libary.path="C:\jdbc\" HelloWorld

In the above example the dll will be in the C:\jdbc\ directory and your application is called HelloWorld.

Connecting with Integrated Authentication

The JDBC driver supports the use of Type 2 integrated authentication on Windows operating systems through the integratedSecurity connection string property. To use integrated authentication, copy the sqljdbc_auth.dll file to a directory on the Windows system path on the computer where the JDBC driver is installed.

The sqljdbc_auth.dll files are installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

Note: On a 32-bit processor, use the sqljdbc_auth.dll file in the x86 folder. On a 64-bit processor, use the sqljdbc_auth.dll file in the x64 folder.

Alternatively you can set the java.libary.path system property to specify the directory of the sqljdbc_auth.dll. For example, if the JDBC driver is installed in the default directory, you can specify the location of the DLL by using the following virtual machine (VM) argument when the Java application is started:

-Djava.library.path=C:\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_<version>\enu\auth\x86

Regards,

Jaaved Mohammed

|||

Hi,

My sqljdbc.jar is located in the following directory

C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu

And I copied x86 directory from C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.1\enu\auth

And used following steps to establish database connection

Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
String connectionUrl = "jdbc:sqlserver://localhost:1433;IntegratedSecurity=true;";
Connection con = DriverManager.getConnection(connectionUrl);

and getting the following error

Mar 26, 2007 12:51:50 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at testproject.JdbcDriverTest.main(JdbcDriverTest.java:60)

Please help me out in fixing this issue.

Thanks

Purnima


|||

Purnima,

Did you try the recommendations that I gave above. Did you copy the entire x86 directory to the new location or just the contents of the x86 directory?

Thanks,

Jaaved Mohammed [MSFT]

|||

I copied entire x86 dierctory to the new location.

Thanks

Purnima

|||

hi denial

i am getting same problem and unable to

sort the error

will u please tell me how to sort out this probl,me

where exactle i have to copy sqljdbc_auth.dll.

pleasse replay soon

|||I follow the instruction in connection sample and add the dll path to java command to avoid sqljdbc_auth.dll cannot load error but I got the wrong data. I am using Windows XP SP2 PRO and SQL Server 2005 which is installed in Windows 2003 Server.

connect.java is my filename that i used to test the jdbc connection.
I compiled the connect.java successfully without error but when I run it using java command I got this funny output.

C:\>java -Djava.library.path=C:\Java\tools\sql2005jdbc\sqljdbc_1.2\enu\auth\x86 connect
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20
0E-20

Please help with this error.