Re: how to allow creation of databases

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 11/29/03

  • Next message: Angus Walker: "Stored procedure names"
    Date: Fri, 28 Nov 2003 21:12:38 -0600
    
    

    Is this message returned from the VS Server Explorer? Can you successfully
    execute the CREATE DATABASE statement below from Query Analyzer?

        CREATE DATABASE MyDatabase

    -- 
    Hope this helps.
    Dan Guzman
    SQL Server MVP
    "anthonymelillo" <nospam-tonyvr4@earthlink.net> wrote in message
    news:eMS8SfetDHA.2448@TK2MSFTNGP09.phx.gbl...
    > I created the script as you mentioned and created the logon.
    >
    > But if I try and use it from Visual Studio to create a database, I get the
    > error "Can not create databases on this server"
    >
    > Any idea what is going on ?
    >
    > -- 
    > Tony
    >
    >
    >
    > "Dan Guzman" <danguzman@nospam-earthlink.net> wrote in message
    > news:%23xR6aXXtDHA.2448@TK2MSFTNGP12.phx.gbl...
    > > Since your development server is not a member of a domain, you'll
    probably
    > > find it easier to use standard SQL security rather than Windows
    > > authentication.  You can configure SQL Server to use both authentication
    > > methods by right-clicking on the server in Enterprise Manager and
    > selecting
    > > properties and then the security tab.  Select 'SQL Server and Windows'
    and
    > > restart SQL Server.
    > >
    > > You can setup a standard SQL login with sysadmin rights by running a
    > script
    > > like the one below from Query Analyzer:
    > >
    > > EXEC sp_addlogin 'MyLogin', 'MyPassword'
    > > EXEC sp_addsrvrolemember 'MyLogin', 'sysadmin'
    > > GO
    > >
    > > Use this account to create databases, etc.
    > >
    > > -- 
    > > Hope this helps.
    > >
    > > Dan Guzman
    > > SQL Server MVP
    > >
    > >
    > > "anthonymelillo" <nospam-tonyvr4@earthlink.net> wrote in message
    > > news:eQJvwrWtDHA.3196@TK2MSFTNGP11.phx.gbl...
    > > > You are a little over my head here.  I have never used SQL server
    before
    > > and
    > > > only got it installed yesterday.
    > > >
    > > > But, Visual Studio is not on the Windows 2003 Server. I have Visual
    > Studio
    > > > on my Windows XP PC and the SQL is on my Windows 2003 machine.
    > > >
    > > > The server is not setup as a domain controller.  That would not work
    > with
    > > > the Comcast Cable Internet I have through my Linksys Router.  So I had
    > to
    > > > setup the server as a stand alone.  I do not log into anything.
    > > >
    > > > -- 
    > > > Tony
    > > >
    > > >
    > > >
    > > > "Linchi Shea" <linchi_shea@NOSPAMml.com> wrote in message
    > > > news:uAq2NBWtDHA.1088@tk2msftngp13.phx.gbl...
    > > > > Assuming that your SQL2000 and Visual Studio are on the same server,
    > you
    > > > can
    > > > > simply log yourself in as the local admin of that machine. By
    default,
    > > > > SQL2000 would allow the local admin to get in as a  SQL sysadmin,
    and
    > > > you'll
    > > > > have all the rights in SQL2000 including creating databases.
    > > > >
    > > > > If you have a domain on the home LAN and your Visual Studio is
    running
    > > on
    > > > a
    > > > > different server, you can add the domain account you use to work
    with
    > > > Visual
    > > > > Studio to the local administrators group on the server that runs the
    > SQL
    > > > > 2000 instance. As long as you use this domain account, you can get
    > into
    > > > the
    > > > > SQL2000 instance with all the rights.
    > > > >
    > > > > Of course, you need to make sure that you are using Windows
    > > > authentication.
    > > > >
    > > > > If you want to be minimalist and restrict yourself to creating
    > database
    > > > > only, you can first get into SQL2000 as sysadmin and grant login to
    > the
    > > > > account you'll be using with Visual Studio, grant the login access
    to
    > > the
    > > > > master database, and then grant CREATE DATABASE to the user in the
    > > master
    > > > > database.
    > > > >
    > > > > -- 
    > > > > Linchi Shea
    > > > > linchi_shea@NOSPAMml.com
    > > > >
    > > > >
    > > > > "anthonymelillo" <nospam-tonyvr4@earthlink.net> wrote in message
    > > > > news:OeDHU1VtDHA.2408@tk2msftngp13.phx.gbl...
    > > > > > I am new to SQL server and am trying to learn SQL Server and it's
    > > > > > interaction with Visual Studio 2003.  I have SQL 2000 running on a
    > > > Windows
    > > > > > 2003 server on a home LAN and the server is as a stand alone.
    > > > > >
    > > > > > How can I give myself access to create databases on the server ?
    > Such
    > > > as
    > > > > in
    > > > > > Visual Studio Server Explorer, where you right click on the SQL
    > Server
    > > > > Name
    > > > > > and do "New Database"
    > > > > >
    > > > > > How can I do this ?
    > > > > > Sorry if this is not the right place to ask.
    > > > > >
    > > > > > Thank for any help
    > > > > > -- 
    > > > > > Tony
    > > > > >
    > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >
    > >
    > >
    >
    >
    

  • Next message: Angus Walker: "Stored procedure names"

    Relevant Pages