Friday, March 23, 2012
How to use SSPI for login
If my java app is running on Windows, how can I have it use SSPI for
the login instead of requiring a username/password.
? - thanks - dave
david@.at-at-at@.windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
Page 2 Stage -- http://www.Page2Stage.com
Enemy Nations -- http://www.EnemyNations.com
me -- http://dave.thielen.com
Barbie Science Fair -- http://www.BarbieScienceFair.info
(yes I have lots of links)
Dave:
Which SQL Server JDBC are you using?
-shelby
Shelby Goerlitz
Microsoft, SQL Server
"David Thielen" <david@.windward.net> wrote in message
news:odsjh1ttchi0990og1bqac98ft0hlpm0mu@.4ax.com...
> Hi;
> If my java app is running on Windows, how can I have it use SSPI for
> the login instead of requiring a username/password.
> ? - thanks - dave
>
> david@.at-at-at@.windward.dot.dot.net
> Windward Reports -- http://www.WindwardReports.com
> Page 2 Stage -- http://www.Page2Stage.com
> Enemy Nations -- http://www.EnemyNations.com
> me -- http://dave.thielen.com
> Barbie Science Fair -- http://www.BarbieScienceFair.info
> (yes I have lots of links)
|||The Microsoft one.
thanks - dave
On Tue, 6 Sep 2005 11:29:44 -0700, "Shelby Goerlitz [MSFT]"
<shelbyg@.online.microsoft.com> wrote:
>Dave:
>Which SQL Server JDBC are you using?
>-shelby
>Shelby Goerlitz
>Microsoft, SQL Server
>"David Thielen" <david@.windward.net> wrote in message
>news:odsjh1ttchi0990og1bqac98ft0hlpm0mu@.4ax.com.. .
>
david@.at-at-at@.windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
Page 2 Stage -- http://www.Page2Stage.com
Enemy Nations -- http://www.EnemyNations.com
me -- http://dave.thielen.com
Barbie Science Fair -- http://www.BarbieScienceFair.info
(yes I have lots of links)
|||Dave:
Which Microsoft one?
The SQL Server 2000 Driver for JDBC --
http://www.microsoft.com/downloads/d...displaylang=en
or
The SQL Server 2005 JDBC Driver --
http://www.microsoft.com/sql/downloads/2005/jdbc.mspx
-shelby
Shelby Goerlitz
Microsoft, SQL Server
"David Thielen" <david@.windward.net> wrote in message
news:e0srh1hjudv6gb49rumivuin03fo9iut4d@.4ax.com...
> The Microsoft one.
> thanks - dave
>
> On Tue, 6 Sep 2005 11:29:44 -0700, "Shelby Goerlitz [MSFT]"
> <shelbyg@.online.microsoft.com> wrote:
>
> david@.at-at-at@.windward.dot.dot.net
> Windward Reports -- http://www.WindwardReports.com
> Page 2 Stage -- http://www.Page2Stage.com
> Enemy Nations -- http://www.EnemyNations.com
> me -- http://dave.thielen.com
> Barbie Science Fair -- http://www.BarbieScienceFair.info
> (yes I have lots of links)
|||Sql Server 2000.
thanks - dave
On Tue, 6 Sep 2005 14:44:57 -0700, "Shelby Goerlitz [MSFT]"
<shelbyg@.online.microsoft.com> wrote:
>Dave:
>Which Microsoft one?
>The SQL Server 2000 Driver for JDBC --
>http://www.microsoft.com/downloads/d...displaylang=en
> or
>The SQL Server 2005 JDBC Driver --
>http://www.microsoft.com/sql/downloads/2005/jdbc.mspx
>-shelby
>Shelby Goerlitz
>Microsoft, SQL Server
>
>"David Thielen" <david@.windward.net> wrote in message
>news:e0srh1hjudv6gb49rumivuin03fo9iut4d@.4ax.com.. .
>
david@.at-at-at@.windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
Page 2 Stage -- http://www.Page2Stage.com
Enemy Nations -- http://www.EnemyNations.com
me -- http://dave.thielen.com
Barbie Science Fair -- http://www.BarbieScienceFair.info
(yes I have lots of links)
|||I switched to the SP3 JDBC drivers you listed below - same problems (I
think I had SP2 before).
All the docs say this should work - and it does work when hibernate
calls. So why doesn't this work for a direct call?
thanks - dave
ps - I have put a sample program, output, DB contents, etc. at
http://www.windward.net/jdbc_unicode.zip
On Tue, 6 Sep 2005 14:44:57 -0700, "Shelby Goerlitz [MSFT]"
<shelbyg@.online.microsoft.com> wrote:
>Dave:
>Which Microsoft one?
>The SQL Server 2000 Driver for JDBC --
>http://www.microsoft.com/downloads/d...displaylang=en
> or
>The SQL Server 2005 JDBC Driver --
>http://www.microsoft.com/sql/downloads/2005/jdbc.mspx
>-shelby
>Shelby Goerlitz
>Microsoft, SQL Server
david@.at-at-at@.windward.dot.dot.net
Windward Reports -- http://www.WindwardReports.com
Page 2 Stage -- http://www.Page2Stage.com
Enemy Nations -- http://www.EnemyNations.com
me -- http://dave.thielen.com
Barbie Science Fair -- http://www.BarbieScienceFair.info
(yes I have lots of links)
How to use sp_addlogin
Hi all,
I want to add a windows user login which looks like: MachineName\UserName, however back slash "\" is not allowed in ap_addlogin. With UserName only, the privileges are not granted correctly as far as I tested. How can I walk around? Any ideas? I use SQL express.
Br,
XZ
I don't know what documentation comes with SQL Express, but if it is that limited to not cover basic T-SQL like this I'd go get a copy of the full SQL Server Books Online (BOL), free download available. You can also use BOL through the MSDN Library website.
sp_addlogin has only been preserved for backward compatability, try CREATE LOGIN instead-
USE [master]
GO
CREATE LOGIN [XXX\ASPNET] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
USE [AdventureWorks]
GO
CREATE USER [ASPNET] FOR LOGIN [XXX\ASPNET]
GO
You may also like to try a more appropriate forum, perhaps the SQL Security forum. Since SQL Express does not even include SSIS I don't think this is the best one to choose.
|||Thanks for fast reply I guess it's the most recommended way, however I am still interested in the way of using C# and sp_addlogin.
BR,
Xuan
sqlWednesday, March 21, 2012
How to use sp_addlogin
Hi all,
I want to add a windows user login which looks like: MachineName\UserName, however back slash "\" is not allowed in ap_addlogin. With UserName only, the privileges are not granted correctly as far as I tested. How can I walk around? Any ideas? I use SQL express.
Br,
XZ
I don't know what documentation comes with SQL Express, but if it is that limited to not cover basic T-SQL like this I'd go get a copy of the full SQL Server Books Online (BOL), free download available. You can also use BOL through the MSDN Library website.
sp_addlogin has only been preserved for backward compatability, try CREATE LOGIN instead-
USE [master]
GO
CREATE LOGIN [XXX\ASPNET] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO
USE [AdventureWorks]
GO
CREATE USER [ASPNET] FOR LOGIN [XXX\ASPNET]
GO
You may also like to try a more appropriate forum, perhaps the SQL Security forum. Since SQL Express does not even include SSIS I don't think this is the best one to choose.
|||Thanks for fast reply I guess it's the most recommended way, however I am still interested in the way of using C# and sp_addlogin.
BR,
Xuan
sqlFriday, February 24, 2012
How to use a variable in update statement?
I have a table with a column called username. In that column I have a value in the form "domain_A\user". There are about 2900 records in the table. I want to change the domain portion to "domain_B"of a select few of the users based on a list. I would hope that I can use an update statement that has a variable. Then get that variable from the list I have.
Any help is greatly appreciated.update tbl set username = a.username
from tbl inner join a_list a
on tbl.username = replace(a.username, 'domain_B', 'domain_A')|||declare @.domain varchar(20)
set @.domain = 'domain_B\'
update test set jsp_name=@.domain+substring(jsp_name,10,15) where --ur where clause