Microsoft Sql Server 2008 Error 15007
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site
Is Not A Valid Login Or You Do Not Have Permission Sql Server 2008 R2
About Us Learn more about Stack Overflow the company Business Learn more about is not a valid login or you don't have permission sql server 2008 r2 hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
Msg 15007, Level 16, State 1
the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Create a user for sql server 2012 create user SQL Server 2008? up vote 7 down vote favorite 2 I'm using this code to create a new user. /****** Object: User [primebox] ******/ IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'primebox') CREATE USER [primebox] FOR LOGIN [primebox] WITH DEFAULT_SCHEMA=[primebox] GO and I got the following error when I try to create this specific user. Msg 15007, Level 16, State 1, Line create login sql server 1 'primebox' is not a valid login or you do not have permission. The part that I don't understand is, I can create others users but this one in particular looks invalid I tried to rename my database and got this error Unable to rename primeboxs. (ObjectExplorer) Rename failed for Database 'primebox'. (Microsoft.SqlServer.Smo) An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) The database could not be exclusively locked to perform the operation. (Microsoft SQL Server, Error: 5030) My guess is that the problem is the database name... but I got the code from another database (I'm creating a 'wanna be' backup) with the same user and database names. So I'm in a corner here... Any help will be a LOT appreciated =) PS: My computer name is box, windows 7. Using SQL Server 2008 sql-server-2008 user share|improve this question edited Oct 29 '12 at 15:02 marc_s 454k938701032 asked Oct 29 '12 at 14:34 Michel Ayres 2,82463760 add a comment| 3 Answers 3 active oldest votes up vote 9 down vote accepted In SQL Server, users are different to logins. To create a user for a database, you first have to cr
Recent PostsRecent Posts Popular TopicsPopular Topics Home Search Members Calendar Who's On Home
Valic Login
» SQL Server 2008 » SQL Server 2008 - General » Can't create users -- permissions issue 24 posts,Page 1 of 3123»»» Can't create users -- permissions issue Rate Topic Display Mode Topic Options Author Message Ray KRay K Posted Wednesday, January 4, 2012 9:05 AM SSCrazy Group: General Forum Members Last Login: Yesterday @ 11:27 AM Points: 2,486, http://stackoverflow.com/questions/13123682/create-a-user-for-sql-server-2008 Visits: 4,429 Hey guys . . .My computer was hit with a virus last week, so I had to wipe the drive and rebuild. I've ben trying to reinstall and rebuild everything that I had before.One of them is SQL 2008. I'm trying to recreate my staging database environment locally on my machine. I went to the database http://www.sqlservercentral.com/Forums/Topic1230029-391-1.aspx server, generated a script, and tried to run it locally on my machine.When I run the script, I get the following when I try to create users (user and schema names changed to protect the innocent):Msg 15007, Level 16, State 1, Line 2'UserName' is not a valid login or you do not have permission.This line is generating the error:CREATE USER [UserName] FOR LOGIN [UserName] WITH DEFAULT_SCHEMA=[SchemaName]This is happening regardless of the user name I'm trying to create.I figure it's a permissions issue somewhere, but I can't figure out where to look. BOL hasn't been very helpful (although I'm still looking).Can one of you point me in the right direction?Thanks, guys! +--------------------------------------------------------------------------------------+Check out my blog at https://pianorayk.wordpress.com/ Post #1230029 DevDev Posted Wednesday, January 4, 2012 9:10 AM SSCommitted Group: General Forum Members Last Login: Saturday, August 8, 2015 4:20 AM Points: 1,932, Visits: 1,598 It’s your own system so I am asking it, Are you not using sa login for running the scripts? Dev*** Open Network for Database Professionals ***http://www.linkedin.com/in/devendrashirbad Post #1230037 GilaMonsterGilaMonster Posted Wednesday
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow http://serverfault.com/questions/119875/is-not-a-valid-login-or-you-do-not-have-permission-on-sql-server-installati the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. http://www.tek-tips.com/viewthread.cfm?qid=1175445 Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top “'' is not a valid sql server login or you do not have permission” on sql server installation up vote 19 down vote favorite 6 I have tried installing SQL Server 2008 multiple times on my machine, and I always receive this error about 3/4 of the way through: '' is not a valid login or you do not have permission. I use SYSTEM user for install, when i try to use my admin login/password installation manager shows other errors. sql server 2008 sql-server-2008 installation permissions share|improve this question asked Mar 6 '10 at 16:23 Alex add a comment| 2 Answers 2 active oldest votes up vote 16 down vote I solved my problem, it occurs when you computer name equals your username. share|improve this answer answered Mar 6 '10 at 19:00 Alex Did you run as an administrator the installator ? –Cédric Boivin Mar 6 '10 at 17:08 Ran into this error, my username was "Fin" and the computer name was "Fin". Changed them to be different and it fixed the problem. –Contango Dec 29 '10 at 0:26 1 I've had this when computer != username... –Yoopergeek Jan 12 '11 at 17:17 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. up vote 6 down vote The problem occurs if a user has the same name as the PC or the domain. You do not need to rename users however, you can simply not add that user to the list of sql server admins. Note that the current user gets added by default so you have to remove it
FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Microsoft SQL Server: Setup and Administration Forum at Tek-Tips HomeForumsProgrammersDBMS PackagesMicrosoft SQL Server: Setup and Administration Forum Create new user 4 thread962-1175445 Forum Search FAQs Links MVPs Create new user Create new user JSMITH242B (Programmer) (OP) 11 Jan 06 14:06 How do I create a new user within a database?When I try saving the new user I'm trying to add I get the following: Error 15007: The login