Why SQLserver Uses NTlogin Though Select To Use The Sql Login??

Oct 2, 2001

I have sql server 2000 loaded on my nt machine. Also have another sql2000 server on the network. I have connected to the these servers thru sql enterprise managers.
We have a vb application which uses sql database. I have created a DSN to the server on the network with the options to use sql login and supplied the username and passwords.

when I try to start the vb application it asks for the which dsn to use. then it gives the sql error message saying login failed for the nt user ( i.e my nt login name) then displays another login box with use trusted connection option checked. I wasn't ables to figure out why the DSN is using the nt login instead of sql login.
Any help is greatly apppreciated. Thank you.

View 4 Replies


ADVERTISEMENT

SQL Server Not Picking Up New NTLogin Name

Oct 11, 2007

Can anyone suggest an alternative to the following problem?

We have had 2 users change their NTLogin in AD. For example, from jsmith to jbloggs. NB this is a change, NOT a completely new login. When the users connect to sql server and call the function SYSTEM_USER, the login returned is the old login:

TheDomainjsmith

This is causing an audit trail problem. Exactly the same issue exists with sys.sysprocesses.

The only way I have found of correcting the problem is by restarting the SQL server service which is obviously not ideal for such a trivial issue.

You can recreate this problem via local users on a sql box as well:

1. Create a local user on the SQL box called FirstUserName and grant access to SQL
2. do a runas on management studio and runas the FirstUserName user
3. connect to SQL and run SELECT SYSTEM_USER, you will get [nameofsqlbox]FirstUserName which is correct
4. kill management studio
5. rename the user SecondUserName
6. do a runas on management studio and runas the SecondUserName user (note, same user, now has different login name)
7. connect to SQL and run SELECT SYSTEM_USER, you will get [nameofsqlbox]FirstUserName which is now incorrect
8. restart sql server service
9. connect to SQL and run SELECT SYSTEM_USER, you will get [nameofsqlbox]SecondUserName which is now correct

Any solutions other than just sucking up a restart everytime a user changes login name would be much appreciated!

View 15 Replies View Related

NTlogin User Account To Sql 2000

Dec 15, 2004

is there a way to move login names or Win 2000 active directory to SQL?
need to get NT login name, emp id to database so i can use for some other application and the way to automate update like in DTS

THANKS

View 1 Replies View Related

Sqlserver Login And User

Mar 30, 2006

What is the diffrence between Sql Server Login and Sql server DatabaseUser?I want to put a funtionality in my application from where administartormake Application User.these application user will be made also in sqlserver..Now I am confuse here In sqlserver Login and UserWell I will make both for A new user of my application Sqlserver Loginand Sql server user,Plz help me What to do with It..

View 2 Replies View Related

How To Grant Backup And Restore ONLY To A Sqlserver Login

Apr 15, 2008

Hi guys! When it comes to writing sql statements, I do ok.  But I just know the basics on sql server dba stuff.I need to create a sql server login account that has the ability to backup and restore databases, BUT NOTHING ELSE.No ability to change anything other than via the restore process. I figured out how to do the backup portion of my requirement, but not the restore part.Any ideas? Thanks in advance! 

View 3 Replies View Related

MSDE SQLSERVER 2000: Login Failed

Feb 12, 2008

Hello

I have a installation of MSDE MSQLSERVER on my machine, in this server i run a local database. The problem began when I uninstalled the msde sqlserver and reinstalled it. The program tha uses the database not are connecting, they prompt: "login failed"

Can you help me?

View 1 Replies View Related

Poking A Hole In Vista Firewall For Sqlserver Login

Jan 5, 2007

I've tried letting in 1433,1434 443,444 and I still can't get through.  When I turn off the firewall, it works.  What Am I missing?

View 3 Replies View Related

Property Login Was Not Set. (Microsoft.SqlServer.Express.ConnectionInfo)

Feb 3, 2008

Hi, having a bit of a problem - I'm trying to attach a database in MS SQL Server Management Studio Express. When I try in Windows Authentication I can't see any of my databases when I try to browse, so I had a look around on Google a saw mentioned that I should maybe use SQL Server Authentication. Only I don't know my user name and password, where can I configure this? I remember when I was setting up entering a password, but not a user name. Any ideas? thanksmander 

View 2 Replies View Related

Need A SqlServer Stored Procedur To Check Login Credentials

Mar 10, 2006

Sid writes "Hi,
can anybody plz provide me the stored procedure for checking the credentials(uid,Pwd) of a login page in sqlserver.

Thanks,
Sid."

View 2 Replies View Related

How To Use Sqlcmd Command To Login To Sqlserver With Sa Account Which Have Empty Password

Oct 11, 2007

the password of sa account is empt

I use "sqlcmd -S servername -U sa " command but failed

any suggestions?

thanks

View 8 Replies View Related

Create Failed For Login 'NT AUTHORITYNetwork Service' (Microsoft.Sqlserver.Smo)

Mar 6, 2008

I'm installing Windows Small Business Server 2003 R2 Premium. I am at the stage where I am installing the Premium Technologies. Specifically, I am trying to configure permissions for the new SHAREPOINT instance of SQL Server 2005. When I try to create the new login NT AuthorityNetwork Service, typing it exactly as specified in the instructions, I get the following error:

Create failed for Login 'NT AUTHORITYNetwork Service' (Microsoft.Sqlserver.Smo)


For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Login&LinkId=20476

------------------------------

ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Windows NT user or group 'NT AUTHORITYNetwork Service' not found. Check the name again. (Microsoft SQL Server, Error: 15401)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15401&LinkId=20476

------------------------------

BUTTONS:

OK

------------------------------


The following links yielded nothing:

http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates

http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=15401&LinkId=20476

Does anyone know what's causing this? I've done a few installs of SBS R2 Premium and this is the first time I encountered this.

View 1 Replies View Related

I Can't Login To Sqlserver With A Username And A Password But Works With NT Integrated Security !!

Nov 21, 2006

hi
i have created a username and a password in sqlserver 2000 from logins in Enterprise manager
and i permit him to the database i need to connect to ..
and i check all server roles for that user and i make sqlserver authentication for him with a password and then i goto the udl file to connect to that database using that user it fails !! and says

"login failed for that user 'myusername' reason not associated with a trusted sqlserver connection"

while i use NT integrated security it works well
so how can i connect to sqlserver using a username and a password

thanks in advance

View 3 Replies View Related

How To Select The Selected Row From Table Using SQLSERVER

Jun 12, 2007

i have the table name is "Books". its contains 10 Rows.... I want select 5,6 rows,or 7,8 not first and last..... Any tell me the Query for that...

Regards,

S.sajan

View 3 Replies View Related

[298] SQLServer Error: 18452, Login Failed For User ''. The User Is Not Associated With A Trusted SQL Server Connection.

Mar 11, 2008

I received the above error yesterday and haven't been able to trace it to any job or process running. We haven't implemented any changes to the server in the past few months, and it doesn't look to be a user-established connection, since the Client IP Address of the SSPI handshake error is from the server itself.

I logged this set of messages in SQL AgentServer error log:


Date 10.03.2008 6:15:19 PM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[298] SQLServer Error: 18452, Login failed for user ''. The user is not associated with a trusted SQL Server connection. [SQLSTATE 28000]

Date 10.03.2008 6:15:19 PM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)
Message
[382] Logon to server '<server>' failed (ConnAttemptCachableOp)

Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
Error: 17806, Severity: 20, State: 2.

Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
SSPI handshake failed with error code 0x80090304 while establishing a connection with integrated security; the connection has been closed. [CLIENT: <IP Address>]

Date 10.03.2008 6:15:19 PM
Log SQL Server (Current - 11.03.2008 2:32:00 PM)
Source Logon
Message
Error: 18452, Severity: 14, State: 1.

Any help in explaining this would be greatly appreciated.

View 8 Replies View Related

Calling Encrypt2 Function From Sqlserver Select Query

Jul 23, 2005

I use a database that has user names stored in Encrypted format usingthe following API.Declare Sub Encrypt2 Lib "QPRO32.DLL" (ByVal Work As String, ByValPASSWORD As String)Every time i require the user name i have to again decrypt the nameusing the same function.My problem is that when i fetch a large number of records i have toloop through every record and call the encrypt function for eachrecord.Instead of binding the recordset to my control i need to loopthrough and fill my controlA MSHFlexGrid in Vb6.0.Is there a way out to this problem that will make my record populatiogfaster withoutout changing the current Encrypted users.Thanx in Advance

View 2 Replies View Related

Update Set Of Columns Using Select Query In Sqlserver 2000

Feb 14, 2008

hi !!!!!!!!!!!!!!!!!!!!!!!
I have 3 tables

let say Employee,Employee_temp,emp_approval

i want to update employee table by selecting columns from employee_temp

i do that using oracle but i want it using sql server 2000

Sample syntax Below: for oracle

update employee e set (col1,col2,col3,col4)=
(select t1.col1,t1.col2,t1.col3,t1.col4 from employee_temp t where t.col1=:new.col1) where e.col1=:new.col1


this syntax for oracle....

plsease provide sql 2000 syntax and sql 2005 syntax please.........


thank you.

View 6 Replies View Related

Oracle To SQLServer Conversion For SELECT TO_CHAR(SYSDATE,'DDMMYYYYHHMMSS')

Nov 6, 2004

Hi,

i am trying to convert the following oracle sql,

SELECT TO_CHAR(SYSDATE,'DDMMYYYYHHMMSS')
(oraclequery)
into a MSSQLServer sql query.

Could you help me to get the equivalent of the above query in sqlserver.

PS: i tried using the following query, but i cannot get the month equivalent as 01/02/03/04 instead i get january/febrauary/march, etc

SELECT
(DATENAME(d, GETDATE())+
DATENAME(m, GETDATE())+
DATENAME(yyyy, GETDATE())+
DATENAME(hh, GETDATE())+
DATENAME(mi, GETDATE())+
DATENAME(ss, GETDATE()))
AS "Month Name"
(ms sqlserver)
The above query gives output as "6November2004174837"

what i need as result is "06112004174837"

Thanks,
Gopi.
Follow your DREAMS...

View 3 Replies View Related

Error: Cannot Open Database Requested In Login 'projectAllocations'. Login Fails. Login Failed For User 'sa'.

Oct 27, 2004

Hi,
Im getting this error when attempting to retrieve data from an sql database.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:


Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:finalyearproject2sample.aspx Line: 15



Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks

View 3 Replies View Related

Cannot Open Database Requested In Login 'dbName'. Login Fails. Login Failed For User 'machineNameASPNET'

Jul 27, 2005

Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.

View 9 Replies View Related

SELECT Last 5 Days User Login Report

Oct 28, 2013

I have to select last 5 days login data from UserLog Table, Based on the LogMessage, Please find below example for clarity

Table : UserLog
Sample Data :
LogId | UserID | IP | DateTime | LogMessage
1 | 1012 | 102.34.23.xx | 2013-10-22 08:42:00 | User ID 1012 (Soft Token)[] - Primary authentication successful from RDS
2 | 1012 | 102.34.23.xx | 2013-10-22 08:43:00 | User ID 1012 (Soft Token)[] - Network Connect: Session started from RDS Location
3 | 1012 | 102.34.23.xx | 2013-10-22 08:45:00 | User ID 1012 (Soft Token)[] - Network Session Initiated: Success Session from RDS Location
4 | 1015 | 102.xx.203.xx | 2013-10-22 09:42:00 | User ID 1015 (Soft Token)[] - Primary authentication successful from RDS

[Code] ...

Expected Result:

I would like to select the user loged data by UserID for last 5 days, I will pass the UserID as a parameter, Time taken should be calculated based on LogMessage ( Time Between "Primary authentication successful" message and "Network Connect: Session started " Message), If multiple login for the same day We have to take the most recent one for the day.

Input : @UserID = 1012
UserID | Date | IP Address | TimeTaken (Min)
1012 | 2013-10-22 | 102.34.23.xx | 1
1012 | 2013-10-23 | 102.34.25.xx | 2

View 3 Replies View Related

Cannot Open Database Requested In Login 'sql'. Login Fails. Login Failed For User 'ASPNET'.

Dec 19, 2003

I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?

Thanks for any help,

Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.

View 5 Replies View Related

Class Method Is Smoking Fast When Executed Outside Of SQLServer, Dog Slow As A CLR Function Is SQLServer - Anyone?

May 10, 2007

We have a static class that makes an HTTPWebRequest to get XML data from one of our vendors. We use this as input to a stored proc in SQLServer2005. When I compile this class and call it from a console application in visual studio it executes in milliseconds, everytime. When I compile it, create the assembly and clr function and execute it in SQLServer, it takes around 14 seconds to execute the first time, then on subsequent requests it is again really fast, until I wait for 10 seconds and re-execute, once again it is slow the first time and then fast on subsequent requests. We do not see this behavior when executing outside SQLServer. Makes me think that some sort of authentication is perhaps taking place the first time the function is run in SQLServer? I have no idea how to debug this further. Anyone seen this before or have any ideas?



Here is the class:






Code Snippet

using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.IO;

namespace Predict.Services
{
public static class Foo
{
public static string GetIntradayQuote(string symbol)
{
string returnQuote = "";

HttpWebRequest request = (HttpWebRequest)(WebRequest.Create("http://data.predict.com/predictws/detailed_quote.html?syms=" + symbol + "&fields=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28,30"));

request.Timeout = 1000;

HttpWebResponse response = (HttpWebResponse)(request.GetResponse());

StreamReader streamReader = new StreamReader(response.GetResponseStream());

returnQuote = streamReader.ReadToEnd();

streamReader.Close();
response.Close();

return returnQuote;
}
}
}



When I run call it from a console app it is fine.



I compile it into a dll and then create the assembly and function as follows:






Code Snippet

drop function fnTestGetIntradayQuoteXML_SJS

go

drop assembly TestGetIntradayQuoteXML_SJS

go

create ASSEMBLY TestGetIntradayQuoteXML_SJS from 'c:DataBackupsCLRLibrariesTestGetIntradayQuote_SJS.dll' WITH PERMISSION_SET = EXTERNAL_ACCESS

go

CREATE FUNCTION fnTestGetIntradayQuoteXML_SJS(@SymbolList nvarchar(max)) RETURNS nvarchar(max) AS EXTERNAL NAME TestGetIntradayQuoteXML_SJS.[Predict.Services.Foo].GetIntraDayQuote

go



declare @testing nvarchar(max)

set @testing = dbo.fnTestGetIntradayQuoteXML_SJS('goog')

print @testing





When I execute the function as above, again, really slow the first time, then fast on subsequent calls. Could there be something wrong with the code, or some headers that need to be set differently to operate from the CLR in SQLServer?



Regards,



Skipper.

View 1 Replies View Related

Problem Unicode Data 0x2300 In SQLServer 2000 SQLServer 2005 Express

Sep 20, 2006

Hi experts;
I have a problem with unicode character 0x2300
I created this table
create table testunicode (Bez nchar(128))

Insert Data
insert into testunicode (Bez)values('Œ€„¢')
with 2 Unicode characters
Œ€ = 0x2300
„¢ = 0x2122

Selecting the data
select Bez from testunicode
I see
"?„¢"

„¢ = 0x2122 is ok but instead of 0x2300 there is 0x3f

When I modify the insert statement like that ( 8960 = 0x2300 )
insert into testunicode (Bez)values(NCHAR(8960)+'„¢')

and select again voila i see
"Œ€„¢"
Does anyone have an idea?

Thanks

View 1 Replies View Related

Trying To 'load' A Copy Of A SQLServer 2000 Database To SQLServer 2005 Express

Apr 18, 2008



I am trying to 'load' a copy of a SQLServer 2000 database to SQLServer 2005 Express (on another host). The copy was provided by someone else - it came to me as a MDF file only, no LDF file.

I have tried to Attach the database and it fails with a failure to load the LDF. Is there any way to bypass this issue without the LDF or do I have to have that?

The provider of the database says I can create a new database and just point to the MDF as the data source but I can't seem to find a way to do that? I am using SQL Server Management Studio Express.

Thanks!!

View 1 Replies View Related

Cannot Open Database XXXX Requested By Login. The Login Failed. Login Failed For User 'xxx'

Mar 18, 2007

hi,
 so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them:
"Cannot Open Database "XXXX" requested by login.  The login failed.  Login failed for user 'xxx'"
Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error.
I've tried creating new users in SQL Server and giving them appropriate permissions to my database.  I've even tried just using the built in 'sa' account.  Nothing seems to change the error, except when I give it the incorrect password then it just says 'login failed'
This leads me to believe that i'm successfully logging into the SQL Server, but it doesn't want to give me access to the database I'm requesting access too.  But "apparently" the account i'm using should have access to the database.  If nothing else the 'sa' account should, but that didn't work either.
I'm stumped.  Any ideas?
 

View 6 Replies View Related

MIcrosft SQLServer Best Practices Document On Securing SQLServer

Jul 29, 2005

I'm chasing after a documetn that was available on one of the Microsoftwebsites that was titled somethign like "MS SQL Server Best Practices"and detailed a nyumber of best practices about securing the server.Included in this was revoking public access to the system tableobjects.Can someone post the URL where I can pick this up, or drop me a note oncontacting them for a copy of the document?

View 2 Replies View Related

Replacing Sqlserver 2000 With Sqlserver 2005 Express

Jun 14, 2006

I have an app that uses a sqlserver 2000 jdbc driver to connect to a sqlserver 2000.

Is it possible to do a direct replacement of sqlserver 2000 with sqlserver 2005 express just by reconfiguring the app to point to the express? The app would still be using the sqlserver 2000 jdbc driver to try and make the connection.

If that is a possibility, what can be some differences in the configuration? Previously with 2000 the config information I entered is:

server name: "machinename"( or ip). I've also tried "machiname/SQLEXPRESS"

DB name: name of db instance

port: 1433(default)

user and pass.

My attempts so far results in

"java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket."

and

"java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL."

View 1 Replies View Related

Upgrade SQLServer Mobile (.sdf) Database To SQLServer 2005

Feb 9, 2006

Hello,

I have an SQLServer Mobile database, and I would like to know if there is a way to upgrade it to SQLServer 2005 (.mdf) database. My database has no records in it, just the structure (tables etc). What I am actually asking is if I can create automatically a new SQLServer 2005 Database with the same structure as my existin SQLSErver Mobile database

Thanks in advance,

TassosTS

View 1 Replies View Related

SQLSERVER 2005 X64 Linked Server To SQLSERVER 7.0

Jun 20, 2007

Hello people.

I am in the process of planning a server upgrade to sql2005 x64.

I created 2 linked servers: one to a SQL2000 sp4 server and one to a SQL7.0 SP3.

I have the following error when I query the linked servers.
OLE DB provider "SQLNCLI" for linked server "IVDM2K" returned message "Unspecified error".
OLE DB provider "SQLNCLI" for linked server "IVDM2K" returned message "The stored procedure required to complete this operation could not be found on the server. Please contact your system administrator.".
Msg 7311, Level 16, State 2, Line 1
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI" for linked server "IVDM2K". The provider supports the interface, but returns a failure code when it is used.

I am aware of KB 906954.
http://support.microsoft.com/default.aspx?scid=kb;en-us;906954

I applied the instcat.sql on the SQL2000SP4 server and my linked server issues for that one are gone.

However, I ran the instcat.sql script on the SQL7.0 sp3 server and the linked server is still giving me an issue.

Can someone help me find a solution to this?

View 1 Replies View Related

Post Update For SQLServer SP2--is There One For SQLServer Express?

Apr 18, 2007

Regarding KB935356, is there a "post" service pack 2 update for SQLServer Express?



Thanks.

View 7 Replies View Related

How To Import Access To SQLServer With Parameter From SQLServer, Help Pls!

Jul 8, 2006

Hello Expert!

I have 2 Database €“ Access & SQLServer(ver 7)

I need to Import Data TblShift from Access to SQLServer €“ using DTS I€™ve done this successfully!

Now I want to use parameter so I only importing record within range (e.g. ShiftDate BETWEEN 05-24-2006 AND 06-23-2006)

In SQLServer, I have created table to store the date range as following:

TblParameter
DateFrom: 04/24/2006
DateTo: 05/23/2006

How do I use the date range from TblParameter(SQLServer) to import record from TblShift(Access) using DTS?

Is this possible or any better solution for this?

TIA

Regards,

View 4 Replies View Related

Differences Between Sqlserver 2000 And Sqlserver 7.0

Dec 29, 2005

Hi Friends,
 
Can some please let me know the differences between sqlserver 2000 and sqlserver 7.0

View 1 Replies View Related

Difference In SQLSERVER/sqlExpress And SQLSERVER

Jun 6, 2007

Hi,
I am new to SQL Server 2005. I tried connecting to my local machine by using my machine name as Server name and then tried running the following query:
SELECT * FROM SYS.Objects. It gives me following error:
Invalid object name 'sys.objects'.

Whereas, if I connect to my local machine using mahcinenameSQLEXPRESS, then the above mentioned query runs fine.

Why is this difference? What is the difference when I login in these 2 different ways.
Any help would be appreciated.

Thanks in advance.

Any help

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved