New Login in sql server

Hi,
   When I'm adding new login in SQL server it searches and gives the available AD groups in my domain in the Checknames box. Anyone knows what is the SP called when it searches the Group names from the domain?

If you want to know what commands SSMS are emitting to SQL Server, you can use Profiler to find out.
Erland Sommarskog, SQL Server MVP, [email protected]

Similar Messages

  • I have problem with login in sql Server give me support .pre login handshake

    I have problem with login in sql Server give me support .pre login handshake

    The following threads are on the same topic:
    http://www.sql-server-performance.com/forum/threads/pre-login-handshake-error-when-connecting-to-db.687/
    http://stackoverflow.com/questions/12308340/sql-server-2000-connection-error-pre-login-handshake
    http://dbaspot.com/sqlserver-server/458011-error-occurred-during-pre-login-handshake-microsoft-sql-server-error-10054-a.html
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Install Active Directory Domain Controller on Windows server 2008 enterprise, dont login on Sql Server 2008 R2

    I install Active Directory Domain Controller on Windows server 2008 enterprise and dont login on Sql Server 2008 R2. Before install ADDC, I have logon SQL Server 2008r2 Success, After when i install ADDC is don't logon on SQL Server 2008r2 -->not success.
    I have uninstalled ADDC but i still can't login on SQL server 2008r2.
    please help me. it  is very very disaster!
    I think is loss account SQL server 2008r2!

    Hello,
    I stronly recommend you post the detail error message to us while you try to connect to SQL Server instance, it's useful for us to do further investigation.
    Microsoft recommends that you do not install SQL Server 2008 R2 on a domain controller, there are some limitations:
    You cannot run SQL Server services on a domain controller under a local service account or a network service account.
    After SQL Server is installed on a computer, you cannot change the computer from a domain member to a domain controller. You must uninstall SQL Server before you change the host computer to a domain controller.
    After SQL Server is installed on a computer, you cannot change the computer from a domain controller to a domain member. You must uninstall SQL Server before you change the host computer to a domain member.
    SQL Server failover cluster instances are not supported where cluster nodes are domain controllers.
    SQL Server Setup cannot create security groups or provision SQL Server service accounts on a read-only domain controller. In this scenario, Setup will fail.
    On Windows Server 2003, SQL Server services can run under a domain account or a local system account.
    So, I would suggest you try to open up Windows Services list and changed the account for SQL Server service.
    Regards,
    Elvis Long
    TechNet Community Support

  • SQL Server Radio - A new podcast for SQL Server professionals

    Hi everyone,
    We (Guy Glantser and Matan Yungman) have recently launched a new podcast for SQL Server professionals, called "SQL Server Radio".
    We release two shows a month, and basically talk about everything around SQL Server and the SQL Server community. On one show of each month, we juggle around and talk about interesting blog posts, forum discussions, news, events and other things that happen
    in the SQL Server world. We expand about each of those items and add from our own experience. On the second show of the month, we go more in-depth. Sometimes we bring a guest, and sometimes we talk about a specific topic like SQL Server 2014, conferences or
    professional development.
    So if you love SQL Server and love learning by hearing, whether you're on your way to work, jogging or just chilling and
    want to learn in a fun way, check us out on
    http://www.SQLServerRadio.com
    Two shows are already online..

    Hi everyone,
    We (Guy Glantser and Matan Yungman) have recently launched a new podcast for SQL Server professionals, called "SQL Server Radio".
    We release two shows a month, and basically talk about everything around SQL Server and the SQL Server community. On one show of each month, we juggle around and talk about interesting blog posts, forum discussions, news, events and other things that happen
    in the SQL Server world. We expand about each of those items and add from our own experience. On the second show of the month, we go more in-depth. Sometimes we bring a guest, and sometimes we talk about a specific topic like SQL Server 2014, conferences or
    professional development.
    So if you love SQL Server and love learning by hearing, whether you're on your way to work, jogging or just chilling and
    want to learn in a fun way, check us out on http://www.SQLServerRadio.com
    Two shows are already online..

  • Create a new login in linked server

    Hello,
    I have 2 SQL servers that are linked. I can use this query to select some values from remote DB:
    exec sp_addlinkedserver
    @server=N'WinServer',
    @srvproduct=N'',
    @provider=N'SQLNCLI',
    @datasrc=N'10.3.0.217';
    GO
    exec sp_addlinkedsrvlogin
    @rmtsrvname='WinServer',
    @useself='false',
    @locallogin=NULL,
    @rmtuser='sa',
    @rmtpassword='123456';
    GO
    exec sp_testlinkedserver N'WinServer';
    select * from [WinServer].[MyDB].[dbo].[MyTable];
    But I want to create a new login on remote computer as below but it doesn't work:
    exec sp_testlinkedserver N'WinServer';
    -- use [WinServer].[MyDB].[dbo].[master];
    exec sp_grantlogin 'INTERNET\Domain Admins'
    How can I change authentication (add user) remotely without using "sqlcmd -S ... -U ... -P ... -q ...". Because my DB users will use this link object but they will not have  sa's password of remote computer.
    Thanks.

    Typo: Not AS, it should be AT
    EXEC ('CREATE LOGIN [INTERNET\Domain Admins]') AT Link

  • New Files in SQL Server Log Directory

     Does anyone know which process generates files to C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log.
    I started seeing new files are added from yestoday. The file name pattern is like "ServerName_MSSQLSERVER_SQLDIAG_0_130632533281120000.xel".
    Thanks,

    Can you right click and script the system_health session monitor? Check the corresponding path and name of the file.
    Its enabled by default. The system_health session collects system data that can be used to help troubleshoot performance issues.
    I think someone has created the file.
    --Prashanth

  • Is there any way to add SQL Server 2008 R2 "SQL Authentication" logins to SQL Server Integration Services

    Hi Experts, 
    We have a way to add the Windows Authentication-logins /OS users  in SSIS
    Component Services -> Computers -> My Computer -> DCOM Config -> MSDTSServer
    Right click on MSDTSServer
    Click properties
    Click on the Security tab
    Select Customize and add the users/groups to the Launch/Activation and Access tabs accordingly
    Add the user to the local Distributed COM Users group
    Restart the SSIS service
    +++But do we have a way to add SQL Server Authetication logins to SSIS, Please clarify me 
    Prem Gokull

    Hi PREM,
    If I understand correctly, you want to use SQL Server Authentication log to SQL Server Integration Services.
    Based on my research, only Microsoft Windows Authentication is available for SSIS. So we cannot use SQL Server Authentication log to SQL Server Integration Services. Besides, we can only add OS users in the DCOM Config permission area.
    Reference:
    Connect to Server (Integration Services)
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Check for all the dependencies of a particular SQL Server Login in SQL Server 2008R2.

    I have to alter a SQL Server Login credentials. Before altering it I have to research that where is this login is being used currently. How to determine all the places where it is being used for? Thanks in advance.
    PGupta

    I have to alter a SQL Server Login credentials. Before altering it I have to research that where is this login is being used currently. How to determine all the places where it is being used for? Thanks in advance.
    PGupta
    Find out database to which this login is mapped.If its sysadmin login I guess it won't be used in application unless you dont follow security practices.Shoot a mail to application owners,all application owners.Inform them take permission from them to change
    it.
    This is not a exact solution but will save you from fingers getting pointed at you.because you already informed every body.
    I guess there is no perfect way to find. If somebody can point I will be happy
    Edit:You can configure login auditing from using below link and can check errorlog for details.Make it for both successful and failed login.Failed logins messages in errorlog has IP associated with them as well.So enough for you to guess
    http://msdn.microsoft.com/en-us/library/ms175850.aspx
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • New install of SQL Server 2012 x64 Express on Windows 2008 Server, keep getting error when using Management Studio?

    After installing the x64 with all tools excluding the SDK from the SQL Express Edition, I go to Management Studio, log in and get the error when I click under the Instance name- Databases...Have reinstalled many times, removed all directories and registry
    keys from both HKEYs(regular and Wow6432Node) before rebooting and reinstalling. No VS installed on this computer..put it looks like it installed "MS Visual Studio 2010 Shell (Isolated)-ENU" and "Visual Studio 2010 Prerequisites".....tried working past
    the error, it just hangs the Studio after it tries to add things...HELP..PLEASE!!!
    Object reference not set to an instance of an object. (Microsoft.VisualStudio.Platform.WindowManagement)
    Program Location:
       at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.QueryService(Guid& guidService, Guid& riid, IntPtr& ppvObject)
       at Microsoft.VisualStudio.Shell.ServiceProvider.GetService(Guid guid, Type serviceType)
       at Microsoft.VisualStudio.Shell.ServiceProvider.GetService(Type serviceType)
       at Microsoft.VisualStudio.Shell.WindowPane.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerToolWindow.GetService(Type serviceType)
       at Microsoft.VisualStudio.Shell.WindowPane.System.IServiceProvider.GetService(Type serviceType)
       at System.ComponentModel.Design.ServiceContainer.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ObjectExplorerControl.System.IServiceProvider.GetService(Type serviceType)
       at System.ComponentModel.Design.ServiceContainer.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NodeContext.GetService(Type serviceType)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.<GetColumnsFromNavigationService>d__11.MoveNext()
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.AddFields(List`1 list, IEnumerable`1 fields, IDictionary`2 allValidFields, AddFieldsFlags flags)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.GetParentFields(INodeInformation source, Dictionary`2& allValidColumns)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItemWithQuery(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, String urnQuery, Boolean registerBuilder, Boolean registerBuiltItems)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.BuildDynamicItem(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItemBuilder.Build(IList`1 nodes, INodeInformation source, INavigableItem sourceItem, IFilterProvider filter)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)

    Hi igorteper,
    Any progress?
    "MS Visual Studio 2010 Shell (Isolated)-ENU" and "Visual Studio 2010 Prerequisites" had been installed in your computer, or there is no Visual Studio installed on this computer?
    You log in SQL Server Management Studio and get an error. For further investigation the issue, please post the error messages in detail.
    TechNet Subscriber Support
    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback
    here.
    Thanks,
    Maggie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.

  • Pointers for upgrading to new version of SQL Server?

    We're running SAP Business One 2007 A (8.00.181) SP:00 PL:49
    At the moment we have a dedicated server computer to host the SQL databases for this product. The server computer is 32-bit Windows Server 2003. The database server is SQL Server 2005 32-bit. This server was purchased in fall 2006 and had a fast disk subsystem for its day: 5x 15K UltraSCSI hard drives in RAID5.
    We have several company databases, some of which are in the 12 - 13GB range in size. There are occasions where two or more of these large-ish databases may be in use simultaneously. Since SQL Server on the current server limits itself to 2GB RAM usage, I suspect there is a lot of paging to disk when multiple company databases are open, with a major hit on performance.
    Windows Server 2003 goes end-of-life on July 15, 2015. SQL Server 2005 end-of-life is April 14, 2016. As part of a refresh of company IT infrastructure, we're considering replacing various physical servers with virtual servers. Ideally, we'd like to migrate the backend to a current version of SQL Server on a current Windows server OS, and also move to a 64-bit platform so we can allocate more RAM to SQL Server. We may also host virtual hard drive file(s) on SSD if/where that makes sense.
    What I've found so far:
    All the current SAP databases are Compatibility Level 90 (native SQL Server 2005)
    The latest version of SQL Server that supports Compatibility Level 90 is SQL Server 2012. SQL Server 2014 drops support for 90. I assume it's a bad idea to change the database compatibility level?
    If for any reason we have to stick with SQL Server 2005, the latest version of Windows that supports that is Server 2008 R2. That's not ideal, since in a perfect world we would want all virtual machines running Server 2012 R2
    Moving to a 64-bit version of SQL Server requires a so-called "side-by-side" upgrade, it's not possible to use a SQL Server upgrade wizard
    The VAR we used to install and configure the product in 2006 is no longer in business so we'd like (if possible) to do this ourselves. I'm a software developer familiar with client-server development, SSMS etc. so I feel reasonably confident in undertaking a side-by-side upgrade.
    So, assuming we'd like to migrate the backend to 64-bit SQL Server 2012, can anyone offer any pointers, experiences, or things to watch out for?
    There are also some services running on the current server computer, which I'm assuming will also need to be migrated:
    SAP Business One Integration Service
    SAP Business One License Manager 2007
    SAP Business One Messaging Service
    I get the feeling other people may have asked similar questions before, but I couldn't find any relevant posts.
    Thanks in advance for any help.

    You probably need to do an installer file clean up for Apple Software Update with the Microsoft Installer Cleanup Utility.
    Here is a method for removal and clean up of iTunes and related programs. You might get away with just doing the Apple Software Update part rather than the whole thing. I would try just removing and cleaning ASU first.
    Download a fresh copy of iTunes and the stand alone version of Quicktime (the one without iTunes)
    http://www.apple.com/quicktime/download/win.html
    http://www.apple.com/itunes/download/
    Download and install Microsoft Installer cleanup utility, there are instructions on the page as well as the download. Note that what you download is the installer not the program – you have to run it to install the program.
    To run the program – All Programs>>Windows Install Cleanup
    http://support.microsoft.com/kb/290301/
    Now use the following method to remove iTunes and its components:
    XP
    http://support.apple.com/kb/HT1925
    Vista
    http://support.apple.com/kb/HT1923
    *If you hit a problem with one of the uninstalls don't worry*, carry on with the deleting of files and folders as directed in the method.
    When you get to deleting Quicktime files in the system32 folder as advised in the method, you can delete any file or folder with Quicktime in the name.
    Restart your PC.
    Run the Microsoft Installer Cleanup Utility. (Start > All Programs > Windows Install Clean Up)
    Remove any references you find to the programs you removed - strictly speaking you only need to worry about those programs where the uninstall failed.
    If you don’t see an entry for one of the programs that did not uninstall, look out for blank entries or numeric entries that look like version numbers e.g. 7.x for Quicktime or 1.x for Bonjour.
    restart your PC
    Install the stand alone Quicktime and check that it works.
    If it does, install iTunes.

  • Cannot stablish a Database NEW connection with SQL Server Express 2008 R2 and Netbeans 8

    
    Hi I appreciate it if someone could help to this case: I AM TRYING TO MAKE A CONNECTION TO MY SQL SERVER EXPRESS 2008 WITH MY NETBEANS 8 And I get ERROR ... APPARENTLY IS MY USER AND KEY BUT I AM PUTTING THE CORRECT USER AND KEY IN WHICH I CONNECT WITH MY
    SQL SERVER EXPRESS 2008. I HAVE PUT IN PORT THE 1433 TCP / IP PORT. THE HOST, THE NAME OF MY DATABASE.
    NO PASSING OR ERROR WHICH CAN BE ...

    Hi DianaWeb,
    It's glad to hear that your problem is resolved by changing the windows authentication into mixed authentication and use 'sa' user, namely an SQL Server authentication.
    I believe the user name and password in the Netbean are for SQL Server Authentication to connect to SQL Server. The windows authentication you typed is not a valid SQL Server Authentication, that was why the connection failed.
    In any case, if you want your J2EE project connects to SQL Server using Windows authentication(credentials of the user running Tomcat/Jboss where your application is deployed). Just build your JDBC URL like this: 
    jdbc:sqlserver://localhost;integratedSecurity=true;
    See
    Can I connect to SQL Server using Windows Authentication from Java EE webapp?
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Cannot create new connection to SQL Server

    When I try to create a connection from Oracle Sql Developer to SQL Server I get the following message:
    Status: Failure -I/O Error: SSO Failed; Native SSPI Library not loaded. Check the java.library.path system property.

    check if you installed JTDS driver. If not,
    - go to http://sourceforge.net/project/showfiles.php?group_id=33291,
    - extract the jar file,
    - copy it to a convenient location (SQL Developer subfolder would be preferable)
    - start sql developer and go to properties
    - expand Database, go to Third Party JDBC drivers and add the .jar file above.
    - recheck the connection.
    Good luck,
    Andrei

  • Calculate New Column in sql server

    CREATE TABLE [dbo].[Table1](
        [Months] [int] ,
        [AccumSD] [decimal](38, 2)
    GO
    insert into [Table1]([Months],[AccumSD])
    select 1    ,0.00
    Union All
    select 2    ,21574680.03
    Union All
    select 3    ,16706196.47
    Union All
    select 4    ,-7873127.29
    Union All
    select 5    ,-4235468.46
    Union All
    select 6    ,-2201146.63
    Union All
    select 7    ,-2102177.16
    Union All
    select 8    ,-315589.57
    Union All
    select 9    ,1638011.39
    Union All
    select 10    ,1826178.79
    Union All
    select 11    ,1883942.48
    Union All
    select 12    ,1585631.16
    The above is the table structure and data.
    I want to calculate the column from AccumSD + previous value of same column (AccumSD)
    the calculated column should be like the below
    0
    21574680.03 
    16706196.48 
    13701552.75 
    12470728.02 
    11500406.13 
    10368550.87 
    11184816.56 
    12006562.26 
    13010995.35 
    13890504.74 
    14596626.51 
    15540690.5 
    16386422.24 
    17231803.58 
    18101710.92 
    18971480.26 
    19910089.6 
    26235684.8 
    32481280 
    How can we achieve it? Thanks in advance

    The formula from your excel screen grab does not match the formula you posted in your description.
    Your example data does not match your screen grab.
    Best of luck getting to an answer that works for you.
    Agreed. While the OP may regard his maths to be good and his sample data spot on, it leaves their eyes as I fail to see how their data matches what they appear to be asking for.
    OP, your first three rows are
    select 1   
    ,0.00
    select 2   
    ,21574680.03
    select 3   
    ,16706196.47
    How does that lead to
    Select @A= 0 + 0
    Select @A
     Select  @A=21574680 +@A
    Select @A
     Select  @A= -4868484 + @A
    Select @A
    Where did "-4868484" come from?
    Unless you give accurate requirements, how can anyone help you? Looking at your excel screenshot, you are negating, not summing.

  • How to Configure Remote Connections To SQL Server 2008 R2 Express

    Post written June 10, 2010 and pertains to:
    SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
    SQLX_LOC
    SQL Server 2008 R2 Management Studio on both my server and local machines:
    MS_SRV, MS_LOC
    Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
    SQL Server Configuration Manager on both my server and local machines:
    CMGR_SRV, CMGR_LOC
    Server Manager: SMGR
    I am connecting to my hosting server via Remote Desktop Connection: RDC
    I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine.  I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV.  However I am not able to use MS_LOC to connect
    with SQLX_SRV.  Here's what I have done so far:
    SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles.  Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
    CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
    CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue.  On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No.  I've tried it both
    ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP.  On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field. 
    For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field.  For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
    fields.
    CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart.  This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
    On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
    The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS".  My server machine name is "SERVER1" on the EnglishBrains.com domain.  So the proper local name (local within the context of my remote server as connected via RDC) for
    my instance of SQLX_SRV would be:
    SERVER1\SQLEXPRESS 
    Note the use of a backslash NOT a forward slash. 
    Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
    SERVER1.EnglishBrains.com\SQLEXPRESS
    I must also use SQL Server Authentication.  Before I can use such a remote connection, however, there are still several configuration steps required.  So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
    for the server name and Windows Authentication.  Once connected I performed the following steps:
    MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode".  This will enable connections using either type
    of authentication.
    Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
    Click OK to save these changes and close the Server Properties dialogue.
    MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
    On the General page Enter a name for your new login
    Select SQL Server Authorization
    Enter and confirm a password
    Uncheck Enforce password expiration
    Select the default Database and Language
    On the ServerRoles page Public will be checked, also check SysAdmin.  This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
    On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
    At the bottom of the User Mapping page you'll see the Database Roles table.  Public will be selected by default.  Also select db_Owner.  Again this is probably not a good idea, and I'll refine this once I can connect.
    On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
    Click OK to save all changes and close the Login - New dialogue.
    With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login.  I tried this and it worked fine.  Next I tried to use this same login
    remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
    SERVER1.EnglishBrains.com\SQLEXPRESS
    and opting for SQL Server Authentication and supplying the name and password of my new login.
    THIS DID NOT WORK??  Instead I get the following error message:
    Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
    For help, click:
    http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
    If you follow the suggested help link, you are told:
    The SQL Server client cannot connect to the server.  This error could be caused by one of the following reasons:
    A specified SQL Server instance name is not valid.
    The TCP, or named pipes protocols are not enabled.
    The firewall on the server has refused the connection.
    The SQL Server Browser service (sqlbrowser) is not started.
    WRONG on all 4 counts!  The instance name IS valid.  Both TCP/IP and Named Pipes protocols are enabled.  The firewall has been shut down, so it is not relevant.  Finally the SQL Server Browser IS started.
    The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
    tcp:68.71.134.186,1433
    Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running. 
    However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work??  I get the following error message:
    Cannot connect to tcp:68.71.134.186,1433.
    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
    TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
    For help, click:
    http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
    If you follow the help link you are told:
    "The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
    However, the firewall has been shut down and the server HAS been configured to accept remote connections! 
    I confirmed that i could indeed Ping to 68.71.134.186  and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
    tcp:68.71.134.186,1433 .
    IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine! 
    If anyone can help me figure out why I would be very, very grateful!

    My two cents to help you out on c# code example to configure the remote sql server express.
    Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Data.SqlClient;
    namespace sqlremoteconnection
    class Program
    static void Main(string[] args)
    // this is the local sql server connection
    // 192.168.1.101\SQLEXPRESS
    // now, the configuration for remote access:
    // activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
    // SQL Server Configuration Manager
    // --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
    // --> Log On -> Start -> Ok
                // netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
                // netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
    // VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
    // on the router!!!
    // TCP: 1433
    // UDP: 1434
    // or just a personal port like TCP 31433/UDP 31434
    // read carefully the netsh commands above
    // server name: 123.132.24.177\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
    // server name: anyurl.myftp.org\SQLEXPRESS
    // server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
    SqlConnection myConnection = new SqlConnection(
    "user id=sa;" +
    "password=password_goes_here!;" +
    "server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
    //"Trusted_Connection=no;" +
    "database=database_name_here; " +
    "connection timeout=30");
    try
    myConnection.Open();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    SqlDataReader myReader = null;
    SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
    myReader = myCommand.ExecuteReader();
    while (myReader.Read())
    Console.WriteLine(myReader["tab01_name"].ToString());
    Console.WriteLine(myReader["tab01_age"].ToString());
    catch (Exception e)
    Console.WriteLine(e.ToString());
    try
    myConnection.Close();
    catch (Exception e)
    Console.WriteLine(e.ToString());
    Adelino Araujo

  • Is it possible to assign an AD User to SQL Server Login with a defined set of SQL Server Roles?

    A customer asked me if its possible to define in the Active Directory, the SQL Server Roles that should be automatically assigned to a sql server Login that is mapped to a Windows Account.
    In short, his idea is:
    - he creates in the Active Directory a User Group that "knows" about the SQL Server "SecutityAdmin" role
    - some Windows Windows Accounts are Member of this AD Group
    - if one of this Windows Domain Account is mapped to a SQL Server Login "CREATE LOGIN [<domainName>\<login_name>] FROM WINDOWS;" the created SQL Server Login will automatically be a Member of the SQL Server SecurityAdmin.
    Do you know if its possible to configure the AD / SQL Server in this manner?
    I invested some time searching through SQL Server Onlinehelp and AD Documentation. Found nothing. Dont even know if its fiction or a realistic wish.
    Any help, hint, adivce is really appreciated.
    Best Regards
    Paolo

    Yes, you can create an AD Group named "SQLSecurityAdmins", assign a login in SQL Server to this group and grant SecurityAdmin role to it (exec sp_addsrvrolemember).
    Bodo Michael Danitz - MCT, MCITP - free consultant - performance specialist - www.sql-server.de
    Hi Bodo
    Thank you very much for your reply. Dont know if i got it right.
    I create the AD Group "SQLSecurityAdmin", assign it to SQL Server Login and manually add the SQL Server Login as a Member of the SQL Server "SecurityAdmin" Role.
    Now i have a new AD User "NewUser", make him a member of the AD Group "SQLSecurityAdmin". Then i execute "CREATE LOGIN [DomainName\NewUser] FROM WINDOWS;". Is now the new SQL Login Mapped to the Windows Account "DomainName\NewUser" automatically member of
    the SQL Server SecurityAdmin Group?
    Best Regards
    Paolo

Maybe you are looking for