Create a SQL Server authentication login

I am trying to create an SQL Server authentication login. using the documentation given http://azure.microsoft.com/en-gb/documentation/articles/sql-database-get-started/#QueryDBSysData
with the below sql statement 
CREATE LOGIN login1 WITH password='Password1';
but gives an error 
Msg 5001, Level 16, State 1, Line 1
User must be in the master database.
how do i get around this problem?

Hi roma_victa,
Please make sure that you issue the command in the master database of your logical server, otherwise it will fail.
Thanks,
Jan

Similar Messages

  • How to Create a SQL Agent Job For A SSIS Package with Sql Server Authentication

    Hi ALl,
    I have a SSIS package which basically has a data flow task in which i pull the data from one server and copy it into another server and my source server is the one where i dont have windows authentication and i have to only use a sql server authentication
    . This package runs fine if i click the server connection properties type the password and save it.
    Now, my task is to set up a sql agent job which basically uses a proxy account and takes this package from the file system and runs it.But when i try to run this package, its failing with an error saying 
    "Login Failed For rpt5user" where rpt5user is the username for my sql server authentication of the source connection.
    Can someone please help me with any suggestions on how to do this?
    I have heard that we can achieve it by using xml config file which i have never used and i am trying to google around but for no luck.
    So, If someone can please throw any suggestions or ideas on this it would be great.
    Thanks

    You need to add password as a config item and set it from the file source or sql table
    see this as an example
    http://blogs.msdn.com/b/runeetv/archive/2009/12/22/ssis-package-using-sql-authentication-and-dontsavesensitive-as-protectionlevel.aspx
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • SAP Crystal Report using SQL Server Authentication and Windows Authenticati

    I'm a SAP Crystal Report, version for Visual Studio 2010 Beginner
    my ingredients are
    1.windows 7 ultimate service pack1
    2.sql server 2008 standard edition
    3.visual studio 2010 pro
    4.SAP Crystal Report, version for visual studio.net
    I was created a report named customersByCity.rpt using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> I'm supply Server, User ID, Password and Database. I assume me using SQL Server Authentication for my report
    Then, my ASP.NET files as following
    //ASP.NET
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewCustomersByCity.aspx.cs" Inherits="viewCustomersByCity" %>
    <%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
        Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div><asp:Label ID="lblMsg" runat="server" BackColor="Yellow" ForeColor="Black"></asp:Label>
     <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"></CR:CrystalReportViewer>
        </div>
        </form>
    </body>
    </html>
    //code-behind
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Collections;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    public partial class viewCustomersByCity : System.Web.UI.Page
        private const string PARAMETER_FIELD_NAME = "city";   
        private ReportDocument customersByCityReport;
        private void ConfigureCrystalReports()
            ConnectionInfo connectionInfo = new ConnectionInfo();
            connectionInfo.ServerName = @"WKM1925-PCWKM1925";
            connectionInfo.DatabaseName = "Northwind";
            connectionInfo.UserID = "sa";
            connectionInfo.Password = "sysadmin25";
            SetDBLogonForReport(connectionInfo);
        private void SetDBLogonForReport(ConnectionInfo connectionInfo)
            TableLogOnInfos tableLogOnInfos = CrystalReportViewer1.LogOnInfo;
            foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
                tableLogOnInfo.ConnectionInfo = connectionInfo;
        private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
            ParameterValues currentParameterValues = new ParameterValues();
            foreach (object submittedValue in arrayList)
                ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
                parameterDiscreteValue.Value = submittedValue.ToString();
                currentParameterValues.Add(parameterDiscreteValue);
            ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
            ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions[PARAMETER_FIELD_NAME];
            parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
        protected void Page_Load(object sender, EventArgs e)
            customersByCityReport = new ReportDocument();
            string reportPath = Server.MapPath("customersByCity.rpt");
            customersByCityReport.Load(reportPath);
            ConfigureCrystalReports();
            ArrayList arrayList = new ArrayList();
            arrayList.Add("paris");
            arrayList.Add("Madrid");
            arrayList.Add("Marseille");
            arrayList.Add("Buenos Aires");
            arrayList.Add("Sao Paulo");
            ParameterFields parameterFields = CrystalReportViewer1.ParameterFieldInfo;
            SetCurrentValuesForParameterField(customersByCityReport, arrayList);
            CrystalReportViewer1.ReportSource = customersByCityReport;
    1st scenario
    When in a runtime, it's keep appear a dialog box. This dialog box ask me to suppy Server, User ID, Password and Database. Once all information is supplied, my report display the data as expected
    2nd scenario
    I change my report using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> checked on Integrated Security. I just choose Server, and Database. I assume me using Windows Authentication
    When in a runtime, there's no dialog box as above. My report display the data as expected. really cool
    Look's like, when report using SQL Server Authentication there's some problem. but, when report using Windows Authentication, it's fine.
    I'm looking for comment. Please help me

    Hello,
    MS SQL Server 2008 requires you to install the MS Client Tools for 2008.
    Once install then update all of your reports to use the SQL Native 10 as the OLE DB driver.
    The try again, if it still fails search, lots of sample log on code in this forum.
    Don

  • Users using SQL Server Authentication

    What tables/views would I use to create a list of users using SQL Server Authentication? I want the name, whether password (complexity) policy is set and whether password expiration is set. I only want current/active users.

    You can query query sys.sql_logins to get this information.
    http://msdn.microsoft.com/en-GB/library/ms174355.aspx
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • How to create a sql server database in SQL DEVELOPER.

    I installed the SQL DEVELOPER 1.5.5, but i can't found where to create the sql server database in it. please kindly tell me if you feel free.
    Thanks so much in advance.

    Hi,
    Take a look at the main [ SQL Developer page on OTN|http://www.oracle.com/technology/products/database/sql_developer/index.html]. There is a link you should find useful, it's the Getting Started link under the Migration section. This explains how to download and setup the drivers you need to correct to non-Oracle databases. There are also links to online demonstrations on how to create connections to these databases. See how you go with that material.
    It should help.
    Sue

  • About SCCM 2012 Primary sites sql server security logins

    Hi, guys!
    I've got some issue or some misunderstanding....In primary site's sql security logins there were same accounts as on CAS sql.....(We've got about ten primary servers)....two days ago someone (i'm going to find out that guy....damned...) from branch administrators
    cleared up security list logins on one of primary server and left only two accounts....one of them it is primary site server installation account, second account - there is SCCM all hierarchy administrators group....
    Most of that....that somebody got lower site server installation account role from sysadmin to public....
    Am I right thinking in that way - all sql server security logins on all primary sites in one hierarchy must be identical....it explains by SQL replication.......?????
    How can i get back sql security logins list on that sccm server to normal way....became after installing primary site server....??? need help......  

    Hi,
    Primary sites do not always have the same security logins.
    You need to add NT... accounts, sa etc into security logins. These accounts were added during SQL installation.
    All site system computer accounts (such as MP, DP) and primary site computer account also need to be added.
    Best Regards,
    Joyce
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Why can't I log into my "Local" sql server (sql server 2014) with my Sql Server Authentication UID ?

    I just got a new work station (win7 Pro) which has the following sql server
    SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
    returns
    12.0.2254.0     RTM     Developer Edition (64-bit)
    Select @@version
    returns
    Microsoft SQL Server 2014 - 12.0.2254.0 (X64)
     Jul 25 2014 18:52:51
     Copyright (c) Microsoft Corporation
     Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    I added/created a new (random) user account to this server [joe123] and made him sa and mapped him to everything, the password never expires, ...
    when I try to login to this local server the login fails, but I can log into this server with my windows integrated account (also sa).  What do I need to do so that the joe123 account can login to the server
    Rich P

    Check if both "SQL Server and Windows Authentication mode" is set (not just Windows Authentication mode). Server-->right click and select properties -->  Security
    Satish Kartan http://www.sqlfood.com/

  • Database is not created in SQL server for Persistant Chat

    Hi All,
    We were deploying the Persistant Chat Lync 2013 Role. We have created the topology and published it. Then the Lync 2013 deployment is done on the Persistant Chat servers, while upgrading the cumulative servers soon after the deployment we are getting the
    error as :
    Test-CsDatabase : Cannot open database "mgc" requested by the login. The login
    failed.
    Login failed for user 'domain\username'.
    At line:1 char:1
    + Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn
    SQL Server ...
    Get-MirrorState also was not giving the proper result. Then when I checked in the SQL server, we found that both mgc and mgccomp databases itself not created.
    Could someone assist how we can install the database now?? I googled but confused a bit. Servers are already LYNC deployed, so which command and procedure we need to follow to install the DB on SQL servers and also in mirror server.
    Never giveup till you get what to want.

    Please share Test-CsDatabase -verbose 
    And Get-MirrorState
    in details
    PLEASE REMEMBER, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answered"

  • Creating MS SQL Server 2005 Analysis Services OLAP connection

    Hello,
    I am trying to add an OLAP data source in BI Publisher (which is part of the OBIEE 11.1.1.5.0 suite I have installed). However, the connection never seems to create - I don't get an error or a success message when I test the connection. However, if I cancel out of the create connection screen, I get this error: "Your request was denied as you have no permission to access the data.". This is odd since the credentials I am using have admin rights to the OLAP cube I am attempting to connect to.
    SETUP
    OBIEE 11.1.1.5.0 x86_64 bit Linux
    MS SQL Server 2005 Analysis Services running on Windows Server Enterprise (32 bit) 2007 SP2
    Windows users are able to connect to the Windows/SQL server via Excel 2007 and its built-in Analysis Services "Other Data Sources" option. Authentication is done via Windows Active Directory LDAP
    QUESTIONS
    1) In the BI Publisher connection screen, can I enter my AD username/password, or because I am connecting from a Linux Server, do I need to authenticate via a different method?
    2) In the connection string, the initial catalog I am attempting to connect to has spaces in its name. Could this be an issue?
    3) Given the "no permission to access data" message I am getting, is it possible I am reaching the SQL Server but need to set up a local database, non-AD account to access the OLAP catalog?
    4) Are there any logs in the OBIEE server that I can check for more details?
    Thanks!

    Post Author: Sam Naghshineh
    CA Forum: Olap
    With the new productivity pack for Business Objects Enterprise XI R2 (Service Pack 2) you can access SSAS 2005 through the new OLAP tool called Voyager.  The productivity pack is due out sometime in the next few weeks.
    Hope this helps.

  • SQL Server Log: Login failed for user ''

    We've found in SQL Server Log many records:
    Date
    3/22/2013 11:13:03 AM
    Log
    Windows NT (Application)
    Source
    MSSQLSERVER
    Category
    Logon
    Event
    3221243928
    Computer
    SBO05
    Message
    Login failed for user ''. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only. [CLIENT: <local machine>]
    The server autentification is set to "SQL Server and Windows Autentification mode". But when we open SAP, before entering login/password, we see this message in log. But we still could work in SAP.
    How could we solve this?
    Kind regards,
    Anna Shevchenko

    Hi Joseph,
    It doesn't help. The same things i've already done.
    But when I change Mixed Autentification to Windows, i see another error:
    Date
    3/22/2013 11:04:26 AM
    Log
    SQL Server (Current - 3/22/2013 12:33:00 PM)
    Source
    Logon
    Message
    Login failed for user 'sa'. Reason: Failed to open the explicitly specified database. [CLIENT: 192.168.0.145]
    Do you know why?
    Kind regards,
    Anna Shevchenko

  • Create MS SQL Server 2014 instance for TSQL2012 sample database Training kit (70-461)

    Hi,
    I just bought the Training kit (70-461) Querying Microsoft SQL server 2012. I downloaded Microsoft SQL Server 2014. I have also downloaded the script for the sample database -
    TSQL2012.sql.
    Basically I want to set up the sample database and practice my SQL queries. How do I log into
    Microsoft SQL Server 2014? Basically I am doing this on my home computer. It is asking me for Server type, Server name, and Authentication. Do I have to set up a server instance to run and create the sample database? How?
    Thanks.
    Peter

    Do you see anything in the Server Name at all?
    So, in the first drop down you need to select Database Engine.
    In the second (for Server Name) if you see anything, then try selecting it.
    If there is nothing, try methods described in this article
    http://sqlserver-help.com/2011/06/19/help-whats-my-sql-server-name/
    to find the actual name.
    Then, try choosing Windows Authentication and try connecting. If this would not work, then you do need to try using sa and sa's password. If there is no way to find that sa password, then perhaps it's better to clearly uninstall and re-install. If you want,
    I'll move your thread into either 'Getting Started' or Data Access forum as it doesn't seem to be related with Transact SQL.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • How can I create a portal server authentication user with a batch

    hi,
    I am trying to import users into the portal server emulating the create user procedure as plumtree. What I cannot understand at the moment is which classes are involved in the sequence of creating a user.
    the problem starts from the fact that I have used a synch WS and it works but, being the table a dummy one and the users to be authenticated by the portal server, I couldn't use that synch as a definitive.
    I tryed using plumtree.server.CIPTUser class with no success. could not understand how to actually create the user after setting the parameters to the object.
    Is there any documentation explaining how to create the portal server emulation of create user. this could be usefull for all those cases when there is no central repository of user and passwords.
    thanks
    Mario

    This should get you started.
    IPTUser=IPTSession.GetUsers.Create(iAdminFolderID)
    IPTServerContext=IPTUser.GetInterFaces("IPTServerContext")
    IPTServercontext.Store
    This is a high level implementation. It should get you very close.
    thanks,
    Craig

  • Sql Server 2012 Login Failed for user "NT Authority\System"

    I have installed SQL Server on a new server. I have been getting the following error on each of the database in it.
    Login failed for user 'NT AUTHORITY\SYSTEM'. Reason: Failed to open the explicitly specified database 'ABC'. [CLIENT: xxx.xxx.xxx.xxx]
    Here is some information on the instance:
    1) Default instance
    2) SQL Server, Sql Server Agent, Sql Server Reporting services are running / log on using a domain service account.
    3) Sql Server Browser is disabled.
    4) SQL Server VSS Writer is running / log on as Local Service.
    5) NT AUTHORITY\SYSTEM does exists in Login with just public server roles.
    I ran a trace on login failed and I get:
    ApplicationName: Microsoft Windows Script Host
    and it runs every 15 minutes.
    Help please?

    Hi,
    The error was thrown when the SCOM components connected to the backend SCOM databases.
     You can specify a domain account, grant it the sysadmin role and the error should be gone.
    Also, see the replies in your previous thread:
    http://social.technet.microsoft.com/Forums/en-US/23f6b6cb-ec41-4117-8613-26d24c948827/login-failed-for-user-username-reason-failed-to-open-the-explicitly-specified-database
    Thanks.
    Tracy Cai
    TechNet Community Support

  • Connection Failed SQL State: 'HYT00' SQL Server Error: 0 [Microsoft] [ODBC SQL Server Driver] Login Timeout expired

    I backed up  my database   on old Notebook    SQLSTRINGCONNECT worked all day  for any database in SQL SERVR I created
    have brand new computer  Notebook
    installed SQL SERVER 2008 THE EXACT SAME WAY
    I RESTORED THE DATABASE
    However, I cannot connect to it via Visual  FoxPro 9.0  with   SQLSTRINGCONNECT
    or even Windows 7    ODBC Data Source ADministrator

    Hi,
    We need more information as Olaf asked, but my first guess is that you have permissions problem since the users are not the same users in different machines (local users, or SQL Server users),
    even if they have the same name :-)
    [Personal Site] [Blog] [Facebook]

  • How to create a SQL SERVER MODULE IN OWB

    Hello. Any body can help me with this. I need to access a SQL Server DataBase from OWB.
    Need your help.
    Thanks.

    Hi,
    Take a look at the main [ SQL Developer page on OTN|http://www.oracle.com/technology/products/database/sql_developer/index.html]. There is a link you should find useful, it's the Getting Started link under the Migration section. This explains how to download and setup the drivers you need to correct to non-Oracle databases. There are also links to online demonstrations on how to create connections to these databases. See how you go with that material.
    It should help.
    Sue

Maybe you are looking for

  • I have created a family recipe book in iBooks - can I print it using iPhoto's print service?

    I have created a family recipe book in iBooks - can I print it using iPhoto's print service? I don't want to print it on our home printer - I want to print multiple copies for family members through the Apple iPhoto book printing service.  Can anyone

  • Time Capsule satelite

    I have a family and therefore a family of macbooks. Our timecapsule is in the front of the house, my home office, used sparely is in the back. I have just discovered that we have a concrete shelter masquerading as a bathroom in between (storm shelter

  • Private/etc/cups Permission

    Almost every time I Repair Permission, it finds and repairs "Group differs on "private/etc/cups", should be 0, group is 26." What is that? Why does it happen? Thanks

  • File to file transfer

    hai   i need the steps to be done for the scenerio file to file transfer,   as if i am transfering a file from one R/3 to another R/3 system. what are the configuarion that is to be done for it? plz send me the detail steps. thx in advance. its urgen

  • Styling items in Site Studio Contributor

    Hello, Similar to the way that contributors can style text by assigning predefined CSS classes through the style drop-down menu in a Site Studio Contributor form, I would also like to give them the ability to style ordered lists and tables (border-ty