TSQL: copy SQL login

Hi ~ are there any way there is a SP I can copy a SQL logins
with all: server roles, users mapping of database, database role......etc...
using TSQL ....

You can script them out
--SQL Logins:
SELECT 'CREATE LOGIN ' + QUOTENAME(name) + ' WITH PASSWORD='
+ sys.fn_varbintohexstr(password_hash) + ' HASHED, SID='
+ sys.fn_varbintohexstr(sid) + ', '
+ 'DEFAULT_DATABASE='+ QUOTENAME(COALESCE(default_database_name, 'master'))
+ ', DEFAULT_LANGUAGE=' + QUOTENAME(COALESCE(default_language_name, 
'us_english'))
+ ', CHECK_EXPIRATION=' + CASE is_expiration_checked WHEN 1 THEN 'ON' ELSE 
'OFF' END
+ ', CHECK_POLICY=' + CASE is_policy_checked WHEN 1 THEN 'ON' ELSE 'OFF' END
FROM sys.sql_logins
WHERE name<>'sa'
UNION ALL
--Windows logins:
SELECT 'CREATE LOGIN ' + QUOTENAME(name) + ' FROM WINDOWS WITH '
+ 'DEFAULT_DATABASE='+ QUOTENAME(COALESCE(default_database_name, 'master'))
+ ', DEFAULT_LANGUAGE=' + QUOTENAME(COALESCE(default_language_name, 
'us_english'))
FROM sys.server_principals
WHERE type IN ('U','G')
AND name NOT LIKE '%\SQLServer2005MSSQLUser$%$%'
AND name NOT LIKE '%\SQLServer2005SQLAgentUser$%$%'
AND name NOT LIKE '%\SQLServer2005MSFTEUser$%$%'
AND name NOT IN ('BUILTIN\Administrators', 'NT AUTHORITY\SYSTEM');
--Problem: when executing CREATE LOGINs generated by the query above,
--it is not possible to assign default database when that database is 
mirrored or unavailable for some other reason.
--Server roles for logins:
SELECT 'EXEC sp_addsrvrolemember ' + QUOTENAME(L.name) + ', ' + 
QUOTENAME(R.name)
FROM sys.server_principals L JOIN sys.server_role_members RM
ON L.principal_id=RM.member_principal_id
JOIN sys.server_principals R
ON RM.role_principal_id=R.principal_id
WHERE L.type IN ('U','G','S')
AND L.name NOT LIKE '%\SQLServer2005MSSQLUser$%$%'
AND L.name NOT LIKE '%\SQLServer2005SQLAgentUser$%$%'
AND L.name NOT LIKE '%\SQLServer2005MSFTEUser$%$%'
AND L.name NOT IN ('BUILTIN\Administrators', 'NT AUTHORITY\SYSTEM', 'sa');
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence

Similar Messages

  • Copy sql server 2008 login password to sql server 2005

    Hello is it possible to copy same login name & password existing on SQL 2008 to a SQL 2005 server?
    Thanks in advance.

    Hello is it possible to copy same login name & password existing on SQL 2008 to a SQL 2005 server?
    Thanks in advance.
    Have a look at below link
    http://support.microsoft.com/kb/918992
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

  • Copy user login

    Dear All,
    I have a problem about user Login in SQL Server 2008.
    because I restore database from another server, user Login for that database already created but not in instance user login. So when user login into instance name they have failed login.
    what that i missed before restore database so when user login into instance they do not failed?
    or how that i can copy user login  from database to instance login? because when i add from add login wizard i have error user already created.
    please help.
    Best regards,
    Surbakti

    When a database is moved from one server to another server the login ids stored in the master database do not align with the login ids
    stored in each user database or there is no login id or password associated with the user and user in the database becomes ORPHAN.
    To fix this problem you need to transfer Logins & password refer below link to Transfer Logins & Passwords.
    How to transfer logins and passwords between instances of SQL Server
    once you transfer logins fix orphan users, refer below link to fix orphan users
    http://blog.sqlauthority.com/2007/02/15/sql-server-fix-error-15023-user-already-exists-in-current-database/
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    Praveen Dsa | MCITP - Database Administrator 2008 |
    My Blog | My Page

  • Error while Assigning database level role (db_datareader) to SQL login (Domain Account)

    Team,
    I got an error while creating a User for Domain Account. Below is the screen shot of the error (error : 15401)
    Database instance is on SQL 2000 SP3. ( I know it is out of support, But the customer is relutanct to upgrade)
    On Google search, i found below article which is best matching for this error
    http://support.microsoft.com/kb/324321
    I have follows each step of troubleshooting. But still the issue persists.
    Step 1. The login does not exist == The login is very much exist in the domain as i am able to add the same domain id to other database instances
    Step 2. Duplicate security identifiers == i have used this query to find duplicate SID
    /*  SELECT name FROM syslogins WHERE sid = SUSER_SID ('YourDomain\YourLogin') */
    But there was only one row returned with create date of today's.
    Error while Assigning database level role (db_datareader) to SQL login (Domain Account) 
    Step 3. Authentication failure == Domain is available. User is able to login on other servers via RDP connection.
    Step 4. Case sensitivity == Database collation is set to Case insensitivity. (CI)
    Other two 5. Local Accounts & 6. Name resolution == is not applicable to me.
    I tried other ways also.
    A. Creating login and providing permission in one go only = User account is not created
    B. Instead of GUI, use query to create login and provide required permission = Same error.
    Does anybody has faced any such situation
    Chetan

    See the below output
    srvid
    sid
    xstatus
    xdate1
    xdate2
    name
    password
    dbid
    language
    isrpcinmap
    ishqoutmap
    selfoutmap
    NULL
    0x010500000000000515000000A1F66E1BFC1DC75D26E72530A2B80400
    14
    20:25.9
    57:33.4
    UKBAA\LHRAPPMuttavarapuS
    NULL
    1
    us_english
    0
    0
    0
    Chetan

  • Copying SQL Script from Oracle SQL Developer into Excel with formatting

    I need to copy a SQL Script into Excel in order to develop some VBA code. Is there any nice way that I can copy SQL Script from Oracle SQL Developer into Excel and retain its formatting? I am a stickler for having legible, readable SQL and like to have all my columns lined up and aliases lined up. When we used to use SQL Navigator, the tab formatting seemed to copy and paste just fine. Now that we have migrated to Oracle SQL Developer, the formatting seems to get all messed up.
    And suggestions are greatly appreciated and Thanks in advance for your review and am hopeful for an answer.
    Thanks.
    PSULionRP

    I suppose you want a real tabulator instead of spaces. You can configure this in the preferences (SQL Formatter - Oracle). You have to apply it then to your existing code (e.g. CTRL-F7), but new code should get it right from the start.
    Hope that helps,
    K.

  • SQL Login "disabled" flag does not work with asymmetric key??

    If I create a normal interactive SQL login, the Disabled flag for the login controls whether that user can log in with the login name and password.  For example,
    ALTER LOGIN MyUser DISABLE
    will prevent anyone from logging in with this MyUser login.
    However if I create a SQL login FROM ASYMMETRIC KEY, the Disabled flag  for the login seems  to have no effect.  For example, assemblies in executable files from which the asymmetric key was created can still be used even if the login is "disabled".
    Is this by design?  If so, why?
    It would seem to me that if a login is disabled, no rights granted to that login should be accessible, including "GRANT EXTERNAL ACCESS ASSEMBLY TO ..." and "GRANT UNSAFE ASSEMBLY TO..."
    (I suspect that disabling a login will also have no effect on execution of stored procedures signed with that login's asymmetric key either, though I have not test this.)
    Can someone please comment on this behavior?

    Disabling a Login has no effect on Permissions.
    The only thing it prevents, is the interactive process of “logging in”.
    That Login can still be impersonated also. – And this is in fact important to know(!).
    That’s also in BOL (ALTER LOGIN):
    http://technet.microsoft.com/en-us/library/ms189828.aspx
    Andreas Wolter | Microsoft Certified Master SQL Server
    Blog: www.insidesql.org/blogs/andreaswolter
    Web: www.andreas-wolter.com

  • SQL LOGIN with weak password

    I need to create a SQL LOGIN with weak password.
    Is there a way to change the password policy or bypass for a specific LOGIN ?
    I've tried this:

    Is there a way to change the password policy or bypass for a specific LOGIN ?
    SQL Azure doesn't allow the CHECK_POLCY clause.  See
    https://msdn.microsoft.com/en-us/library/ms189751.aspx
    Why would you want to create a weak password?  I think the CHECK_POLICY option is intended only for legacy applications.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Critical SMS_Executive SQL Login failed for user 'NT AUTHORITY\SYSTEM'.

    I am getting sql login errors on my sms executive log that i believe is stopping me from pxe booting. I have tried finding where to enter the credentials but i cannot find it.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    Starting SMS_EXECUTIVE... SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Microsoft System Center 2012 Configuration Manager v5.00 (Build 7958)
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    Copyright (C) 2011 Microsoft Corp. SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Running as a Win32 service. SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Process ID: 2368 SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Worker thread ID: 2412 SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Certificate (0x610450) is Exportable SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Initialize COM Security. SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    InitializeCOMSecurity: RegOpenKeyEx for appid key Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity: RegQueryInfoKey for appid key Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity: RegQueryValueEx for AccessPermission Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity: IsValidSecurityDescriptor() Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity: MakeAbsoluteSD() Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity: CoInitializeEx() Succeeded.
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    InitializeCOMSecurity() Succeeded. SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Installation directory: E:\Program Files\Microsoft Configuration Manager
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    This server: E076SCCM SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Site server: sccmserver.org SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Site code: 076 SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    Site type: 1 SMS_EXECUTIVE
    4/10/2014 3:13:12 PM 2412 (0x096C)
    CSMSExecService::RegisterDBConnection: Register a DB connection...
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
    Initializing the status message reporting system...
    SMS_EXECUTIVE 4/10/2014 3:13:12 PM
    2412 (0x096C)
        The path to the "Status Manager" inbox is "E:\Program Files\Microsoft Configuration Manager\inboxes\statmgr.box\statmsgs".
    SMS_EXECUTIVE 4/10/2014 3:13:13 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    *** Failed to connect to the SQL Server, connection type: SMS ACCESS.
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    CSiteControlEx::GetCurrentSiteInfo: Failed to get SQL connection
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    CSiteControlEx::GetMasterSCF:Failed to read site information from database, retry in 5 seconds ...
    SMS_EXECUTIVE 4/10/2014 3:13:14 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    *** Failed to connect to the SQL Server, connection type: SMS ACCESS.
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    CSiteControlEx::GetCurrentSiteInfo: Failed to get SQL connection
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    CSiteControlEx::GetMasterSCF:Failed to read site information from database, retry in 5 seconds ...
    SMS_EXECUTIVE 4/10/2014 3:13:19 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    *** Failed to connect to the SQL Server, connection type: SMS ACCESS.
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    CSiteControlEx::GetCurrentSiteInfo: Failed to get SQL connection
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    CSiteControlEx::GetMasterSCF:Failed to read site information from database, retry in 5 seconds ...
    SMS_EXECUTIVE 4/10/2014 3:13:24 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    *** [28000][18456][Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\SYSTEM'.
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    *** [42000][4060][Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "CM_076" requested by the login. The login failed.
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    *** Failed to connect to the SQL Server, connection type: SMS ACCESS.
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    CSiteControlEx::GetCurrentSiteInfo: Failed to get SQL connection
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
    CSiteControlEx::GetMasterSCF:Failed to read site information from database, retry in 5 seconds ...
    SMS_EXECUTIVE 4/10/2014 3:13:31 PM
    2412 (0x096C)
        SMS_STATUS_MANAGER is not running as part of this process, the SMS_EXECUTIVE to SMS_STATUS_MANAGER in-memory status message queue will not be used.
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    Registered this process as a source of "SMS Server" events.
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    Registered this process as a source of "SMS Client" events.
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    Registered this process as a source of "SMS Provider" events.
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    Status message reporting system initialized successfully.
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    STATMSG: ID=500 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_EXECUTIVE" SYS=sccmserver.org SITE=076 PID=2368 TID=2412 GMTDATE=Thu Apr 10 19:13:47.950 2014 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4=""
    ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXECUTIVE 4/10/2014 3:13:47 PM
    2412 (0x096C)
    Certificate maintenance interval is every 1800 seconds
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AD_FOREST_DISCOVERY_MANAGER initialized, DLL = "\bin\x64\ADForestDisc.dll", startup type = "Scheduled", current state = "Stopped", requested operation = "None", next start time = "Sun Apr 13 00:00:00 2014 Eastern
    Daylight Time". SMS_EXECUTIVE
    4/10/2014 3:13:48 PM 2412 (0x096C)
    STATMSG: ID=1105 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_AD_FOREST_DISCOVERY_MANAGER" SYS=sccmserver.org SITE=076 PID=2368 TID=2412 GMTDATE=Thu Apr 10 19:13:48.119 2014 ISTR0="2014 04 0 13 04 00 00 000" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AD_SECURITY_GROUP_DISCOVERY_AGENT initialized, DLL = "\bin\x64\adsgdis.dll", startup type = "Scheduled", current state = "Stopped", requested operation = "None", next start time = "Thu Apr 10 15:15:00 2014 Eastern
    Daylight Time". SMS_EXECUTIVE
    4/10/2014 3:13:48 PM 2412 (0x096C)
    STATMSG: ID=1105 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_AD_SECURITY_GROUP_DISCOVERY_AGENT" SYS=sccmserver.org SITE=076 PID=2368 TID=2412 GMTDATE=Thu Apr 10 19:13:48.120 2014 ISTR0="2014 04 4 10 19 15 00 000" ISTR1=""
    ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AD_SYSTEM_DISCOVERY_AGENT initialized, DLL = "\bin\x64\adsysdis.dll", startup type = "Scheduled", current state = "Stopped", requested operation = "None", next start time = "Thu Apr 10 15:15:00 2014 Eastern Daylight
    Time". SMS_EXECUTIVE
    4/10/2014 3:13:48 PM 2412 (0x096C)
    STATMSG: ID=1105 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_AD_SYSTEM_DISCOVERY_AGENT" SYS=sccmserver.org SITE=076 PID=2368 TID=2412 GMTDATE=Thu Apr 10 19:13:48.157 2014 ISTR0="2014 04 4 10 19 15 00 000" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AD_USER_DISCOVERY_AGENT initialized, DLL = "\bin\x64\adusrdis.dll", startup type = "Scheduled", current state = "Stopped", requested operation = "None", next start time = "Thu Apr 10 15:15:00 2014 Eastern Daylight
    Time". SMS_EXECUTIVE
    4/10/2014 3:13:48 PM 2412 (0x096C)
    STATMSG: ID=1105 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_AD_USER_DISCOVERY_AGENT" SYS=sccmserver.org SITE=076 PID=2368 TID=2412 GMTDATE=Thu Apr 10 19:13:48.158 2014 ISTR0="2014 04 4 10 19 15 00 000" ISTR1="" ISTR2=""
    ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AI_KB_MANAGER initialized, DLL = "\bin\x64\aikbmgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_ALERT_NOTIFICATION initialized, DLL = "\bin\x64\NotiCtrl.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_AMT_PROXY_COMPONENT initialized, DLL = "\bin\x64\amtproxymgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_CERTIFICATE_MANAGER initialized, DLL = "\bin\x64\CertMgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_CLIENT_CONFIG_MANAGER initialized, DLL = "\bin\x64\ccm.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_CLIENT_HEALTH initialized, DLL = "\bin\x64\chmgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_CLOUD_SERVICES_MANAGER initialized, DLL = "\bin\x64\CloudMgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_COLLECTION_EVALUATOR initialized, DLL = "\bin\x64\colleval.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_COMPONENT_MONITOR initialized, DLL = "\bin\x64\compmon.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_COMPONENT_STATUS_SUMMARIZER initialized, DLL = "\bin\x64\compsumm.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_DATABASE_NOTIFICATION_MONITOR initialized, DLL = "\bin\x64\smsdbmon.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_DESPOOLER initialized, DLL = "\bin\x64\despool.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_DISCOVERY_DATA_MANAGER initialized, DLL = "\bin\x64\ddm.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_DISTRIBUTION_MANAGER initialized, DLL = "\bin\x64\distmgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_ENDPOINT_PROTECTION_CONTROL_MANAGER initialized, DLL = "\bin\x64\EPCtrlMgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_ENDPOINT_PROTECTION_MANAGER initialized, DLL = "\bin\x64\EPMgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_EN_ADSERVICE_MONITOR initialized, DLL = "\bin\x64\adctrl.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_FALLBACK_STATUS_POINT initialized, DLL = "\bin\x64\fspmgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_HIERARCHY_MANAGER initialized, DLL = "\bin\x64\hman.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_INBOX_MANAGER initialized, DLL = "\bin\x64\inboxmgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_INBOX_MONITOR initialized, DLL = "\bin\x64\inboxmon.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_INVENTORY_DATA_LOADER initialized, DLL = "\bin\x64\dataldr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_INVENTORY_PROCESSOR initialized, DLL = "\bin\x64\invproc.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_LAN_SENDER initialized, DLL = "\bin\x64\sender.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_LICENSE_MANAGER initialized, DLL = "\bin\x64\licensemgr.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_MIGRATION_MANAGER initialized, DLL = "\bin\x64\migmctrl.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_MP_CONTROL_MANAGER initialized, DLL = "\bin\x64\mpcontrol.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_MP_FILE_DISPATCH_MANAGER initialized, DLL = "\bin\x64\mpfdm.dll", startup type = "Automatic", current state = "Starting", requested operation = "Start".
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    SMS_NETWORK_DISCOVERY initialized, DLL = "\bin\x64\netdisc.dll", startup type = "Scheduled", current state = "Stopped", requested operation = "None", not scheduled to start again.
    SMS_EXECUTIVE 4/10/2014 3:13:48 PM
    2412 (0x096C)
    STATMSG: ID=1106 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_NETWORK_DISCOVERY" SYS=sccmserver.org SITE=076 P

    First, if your site server is having problems logging into the DB, which it clearly is, you've got bigger issues than just PXE.
    Have you verified the permissions in your SQL Server instance for the local System account (I'm assuming at this point that it is local to the site server)?
    Jason | http://blog.configmgrftw.com

  • Copying SQL Server Agent - Jobs in SSMS - 2012

    Hi,
    I am using SQL 2012 version.
    when i try to copy the existing sql agent job (job "X") (using, Script Job As--> Create To--> New query window) and paste it into different database it is giving me some errors as below. (this method is working fine with SQL 2005, but not
    with 2012)
    Error :
    @schedule_uid is not a parameter for procedure sp_add_jobschedule.
    Any other way of copying sql agent job in SQL 2012 ???
    Thanks

    See the below article which speaks about behavior changes in sql 2012
    http://technet.microsoft.com/en-us/library/ms143359.aspx
    it has section as below
    Changes to Behavior in Scripting a SQL Server Agent Task
    In SQL Server 2012, if you create a new job by copying the script from an existing job, the new job might inadvertently affect the existing job. To create a new job using the script from an
    existing job, manually delete the parameter @schedule_uid which is usually the last parameter of the section which creates the job schedule in the existing job. This will create a new independent schedule for
    the new job without affecting existing jobs.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Error Msg: SQL login failed for HOSTNAME? Upgrade task?

    Hi everybody,
    Since some weeks we see an error message in all servers our SharePoint 2010 SP1 Farm, regulary every hour:
    SQL database login for 'SharePoint_Config' on instance 'sqlsrv' failed.
    Additional error information from SQL Server is included below.
    Login failed for user 'OURDOMAIN\SERVERNAME$'.
    The interesting part is that the
    server tries to connect to the SharePoint Config database, not a dedicated account, which is normally used for every SharePoint service.
    What circumstances can lead to an access of a server?
    Unfortunately I get no details of the service or application which is trying to access. The event log just states "SharePoint Foundation (Microsoft-SharePoint Products-SharePoint
    Foundation)" , Task Category "Database". The user who raises the error is "SYSTEM".
    In the ULS log I can find the Stack Trace below which indicates to an upgrade task. But why is the SYSTEM user trying an update? Normally we do an upgrade by running the Upgrade Wizard with an dedicated account. And only the SharePoint Administration
    windows service runs as Local System.
    And I never heard or read something like: Give Local System (so the server) access to the SharePoint Config database?!
    Thanks for your ideas :-)
    Benjamin
    System.Data.SqlClient.SqlException: Login failed for user 'DOMAIN\SERVERNAME$'.   
    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   
    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   
    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   
    at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)   
    at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
    at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)   
    at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)   
    at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)   
    at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)   
    at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)   
    at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)   
    at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)   
    at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)   
    at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)   
    at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)   
    at System.Data.SqlClient.SqlConnection.Open()   
    at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()
    at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)   
    at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, Boolean retryForDeadLock)   
    at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command)   
    at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.GetVersion(SPDatabase database, Guid id, Version defaultVersion, SqlSession session, SPDatabaseSequence sequence)   
    at Microsoft.SharePoint.Upgrade.SPDatabaseWssSequence.get_BuildVersion()   
    at Microsoft.SharePoint.Upgrade.SPSequence.get_CanUpgrade()   
    at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CanUpgrade(Object o)   
    at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.get_CanUpgrade()   
    at Microsoft.SharePoint.Upgrade.SPUpgradeSession.ReflexiveCanUpgrade(Object o)   
    at Microsoft.SharePoint.Upgrade.SPUpgradeSession.NeedsUpgrade(Object o, Boolean bRecurse)   
    at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.get_NeedsUpgrade()   
    at Microsoft.SharePoint.Administration.SPPersistedUpgradableObject.ValidateBackwardsCompatibility()   
    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility, Boolean bindRequestGuid)   
    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Initialize(SqlConnectionStringBuilder connectionString, Boolean enableCaching, Boolean checkCompatibility)   
    at Microsoft.SharePoint.Administration.SPConfigurationDatabase.get_Local()   
    at Microsoft.SharePoint.Administration.SPFarm.FindLocal(SPFarm& farm, Boolean& isJoined)   
    at Microsoft.SharePoint.Administration.SPWebService.get_ContentService()   
    at Microsoft.SharePoint.PowerShell.SPCmdletSnapIn.get_Cmdlets()   
    at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.MergeCustomPSSnapIn(PSSnapInInfo mshsnapinInfo, CustomPSSnapIn customPSSnapIn)   
    at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadCustomPSSnapIn(PSSnapInInfo mshsnapinInfo)   
    at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIn(PSSnapInInfo mshsnapinInfo)   
    at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.LoadPSSnapIn(PSSnapInInfo mshsnapinInfo, PSSnapInException& warning)   
    at System.Management.Automation.Runspaces.RunspaceConfigForSingleShell.DoAddPSSnapIn(String name, PSSnapInException& warning)   
    at Microsoft.PowerShell.Commands.AddPSSnapinCommand.AddPSSnapIns(Collection`1 snapInList)   
    at Microsoft.PowerShell.Commands.AddPSSnapinCommand.ProcessRecord()   
    at System.Management.Automation.CommandProcessor.ProcessRecord()   
    at System.Management.Automation.CommandProcessorBase.DoExecute()   
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)   
    at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.ifStatementNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)   
    at System.Management.Automation.ScriptCommandProcessor.ExecuteWithCatch(ParseTreeNode ptn, Array inputToProcess)   
    at System.Management.Automation.ScriptCommandProcessor.RunClause(ParseTreeNode clause, Object dollarUnderbar, Object inputToProcess)   
    at System.Management.Automation.CommandProcessorBase.DoComplete()   
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)   
    at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.StatementListNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)   
    at System.Management.Automation.ParseTreeNode.Execute(Array input, Pipe outputPipe, ExecutionContext context)   
    at System.Management.Automation.ScriptCommandProcessor.ExecuteWithCatch(ParseTreeNode ptn, Array inputToProcess)   
    at System.Management.Automation.ScriptCommandProcessor.RunClause(ParseTreeNode clause, Object dollarUnderbar, Object inputToProcess)   
    at System.Management.Automation.CommandProcessorBase.DoComplete()   
    at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)   
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()   
    at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()   
    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)   
    at System.Threading.ThreadHelper.ThreadStart()

    http://aanuwizard.com/2010/04/30/login-failed-for-user-domainservername/
    It  will  need to add user ‘NT AUTHORITY\NETWORK SERVICE’
    to your database  to get rid of this problem.
    An asp.net application  is running under NT AUTHORITY\NETWORK SERVICE account.
    http://stackoverflow.com/questions/2806438/login-failed-for-user-domain-machinename
    NETWORK SERVICE and LocalSystem will authenticate themselves always as the correpsonding account locally (builtin\network service and builtin\system) but both will authenticate as the machine account remotely.
    If you see a failure like Login failed for user 'DOMAIN\MACHINENAME$' it means that a process running as NETWORK SERVICE or as LocalSystem has accessed a remote resource, has authenticated itself as the machine account and was denied authorization.
    Typical example would be an ASP application running in an app pool set to use NETWORK SERVICE credential and connecting to a remote SQL Server: the app pool will authenticate as the
    machine running the app pool, and is this machine account that needs to be granted access.
    When access is denied to a machine account, then access must be granted to the machine account. If the server refuses to login 'DOMAIN\MACHINE$', then you must grant login rights to 'DOMAIN\MACHINE$' not to NETWORK SERVICE. Granting access to NETWORK SERVICE
    would allow a local process running as NETWORK SERVICE to connect, not a remote one, since the remote one will authenticate as, you guessed, DOMAIN\MACHINE$.
    If you expect the asp application to connect to the remote SQL Server as a SQL login and you get exceptions about DOMAIN\MACHINE$ it means you use Integrated Security in the connection string. If this is unexpected, it means you screwed up the connection
    strings you use.
    If this helped you resolve your issue, please mark it Answered

  • SQL Login failed alert

    Hi,
         In my environment i get alert mail of severity 20 when a Windows Login fails. But I'm not getting the alert when a SQL login fails. Is there anything i have to enable or i have to script a job. Advice me other that trigger.

    To check what database was being used when the login failed, you will need to use default trace as mentioned in the link below:-
    http://www.eraofdata.com/the-sql-server-default-trace/
    Or simply run the below query, if you have default trace enabled:-
    SELECT  TE.name AS [EventName] ,
            v.subclass_name ,
            T.DatabaseName ,
            t.DatabaseID ,
            t.NTDomainName ,
            t.ApplicationName ,
            t.LoginName ,
            t.SPID ,
            t.StartTime ,
            t.SessionLoginName
    FROM    sys.fn_trace_gettable(CONVERT(VARCHAR(150), ( 
                    SELECT TOP 1
                    f.[value]
                    FROM    sys.fn_trace_getinfo(NULL) f
                    WHERE   f.property = 2)), DEFAULT) T
            JOIN sys.trace_events TE 
                    ON T.EaventClass = TE.trace_event_id
            JOIN sys.trace_subclass_values v 
                    ON v.trace_event_id = TE.trace_event_id
                    AND v.subclass_value = t.EventSubClass
    WHERE   te.name IN ( 'Audit Login Failed' )
    order by t.StartTime desc
    Also, you mentioned that 'Alert For Severity 20' is triggered when there is a failed login for windows. However, it's not the case. Alert for Severity 14 is triggered on failed logins as far as i have seen. 
    Severity Level 20: SQL Server Fatal Error in Current Process
    These messages indicate that a statement has encountered a problem. Because the problem has affected only the current process, it is unlikely that the database itself has been damaged.
    Reference:
    http://technet.microsoft.com/en-us/library/aa937483(v=sql.80).aspx
    http://sqlrows.blogspot.in/2011/10/note-to-self.html
    Please mark the answer as helpful if i have answered your query. Thanks and Regards, Kartar Rana

  • How to find last login date of a sql login?

    i want to disable the SQL Logins which are not logged in last 15 days. (I schedule a job every night to check and disable)
    For this 
    i want to find  last login date of all sql logins in an instance if the login didn't log in with in 15 days i want to disable them.
    In SYS.SYSLOGINS table we can see all the logins and 'isntname' tells us if it is SQL login or windows login. 
    but where to find the last login date of SQL log in ?
    Can any one help me?

    Hi HYDBA,
    If you use SQL Server 2005 or later, you can only get the current logon data using
    DMV likes:
    select
    max
    (login_time)as
    last_login_time, login_name
    from
    sys.dm_exec_sessions
    group
    by login_name;
    Related to your question there are two options:
    One is logon trigger,
    which is used to get current login time and login name comparing with the data from
    sys.dm_exec_sessions. If the current login time comparing with last login time is larger than 15 days, then prevent the current login.   
    Another one is to schedule a job, which is used to disable logon who’s current login time
    comparing with last login time is larger than 15 days.
    Hope it’s helpful for you.
    Regards, Amber zhang

  • Is there a way to decrypt the SQL login-only encryption in the netmon trace or disable the SQL login-only encryption?

    We know by default the SQL Server use the self-signed certificate to encrypt the  SQL login information when  building the connection, my question is if
    there is a way to decrypt the SQL login-only encryption in the netmon trace  or disable the SQL login-only encryption?
    Please click the Mark as Answer button if a post solves your problem!

    Not without login as admin.   To avoid using credentials to login to SQL, use Windows Credentials instead.
    jdweng

  • SQL Login Not Found

    I have a SQL Reporting Services instance being used for ConfigMgr 2012 R2. There is a SQL login with the format "DOMAIN-NET\ReportDataSourceUser" that is mapped to the reporting databases and the site database. If I use the account "DOMAIN-NET\ReportDataSourceUser"
    for the data source account, it will fail login.  If I change the account for the data source to "domain.net\ReportDataSourceUser", then it logs in successfully.  However, ConfigMgr complains that it cannot find the login for "domain.net\ReportDataSourceUser". 
    I don't get why that is occurring.  Any thoughts?
    Thanks,
    Michael

    Access in SQL is granted to "DOMAIN-NET\ReportDataSourceUser".  When I pick the windows ID, I am picking from the domain "domain.net" but then SQL transforms the login to say "DOMAIN-NET\ReportDataSourceUser".  That
    is normal as what is used is the Pre-Windows2000 domain format in SQL.
    This is nothing I am familiar with, but I don't have a domain to play with here.
    I'm starting to think that the issue is with the ConfigMgr application.  There may be a problem with the account used there.  I have two versions there - one with the format "DOMAIN-NET\ReportDataSourceUser" (Which doesn't work)
    and one with the format "domain.net\ReportDataSourceUser" (Which does work).  Maybe the non-working one has an incorrect password specified. 
    Password? You don't use password when log in with Windows authentication in SQL Server. But it could be a case of a bad SID.
    Or are these passwords used by ConfigMgr for something? (Again, this is an application I'm completely ignorant of.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • SQL Login

    Hi Guys,
    I'm learning SQL Server security, I have tried to create sql login and checked the local user and groups in the windows server and its not found there, Is SQL Server login a logical user within the SQL Server framework, will the sql logins be available outside
    of sql server ? for example: will it have a login access to the windows server ?  Will SQL Server create logins in the windows server ? I tried to login using the SQL Server login but its not working.
    With regards,
    Gopinath.
    With regards, Gopinath.

    no, sql logins do not exist outside of sql server. it is not like windows login. sql logins - strictly exist in sql server
    select * from master..syslogins
    --find your logins
    select * from master..syslogins
    --authentication mode on the server. restart requiured after the setting is changed
    SELECT CASE SERVERPROPERTY('IsIntegratedSecurityOnly')
    WHEN 1 THEN 'Windows Authentication'
    WHEN 0 THEN 'Windows and SQL Server Authentication'
    END as [Authentication Mode]
    check this link  http://www.mssqltips.com/sqlservertip/2191/how-to-check-sql-server-authentication-mode-using-t-sql-and-ssms/
    make sure you  have mixed authentication enabled on the sql server. if enable it and restart the sql instance.
    if deployed on windows server 2008 and above, sql authentication is safe authentication as it can use kerberos.
    Hope it Helps!!

Maybe you are looking for