Can't access the SQL Server engine even from Management Studio -


i installed sql server 2012 express edition on computer (windows 8).

when try create database management studio, i'm getting following error:

create failed database 'testdb'. (microsoft.sqlserver.smo)
create database permission denied in database 'master'.
(microsoft sql server, error: 262)

when try access visual studio, i'm getting following similar error message:

create database permission denied in database 'master'.

is there reason that? can't access engine management studio.

edit

here's connection string

<add name="defaultconnection"       connectionstring="data source=localhost\sqlexpress;initial            catalog=optimumweightdb;integrated security=true;         integrated security=true;         user id=sa;password=mypassword" "       providername="system.data.sqlclient" /> 

this context class

public class owdbcontext : dbcontext {     public owdbcontext()         : base("defaultconnection") { } } 

first of all. try log sql management studio on sql server using windows authentication.

if can create database / manipulate database using windows account there maybe problem on security set on sa login account.

then try re create / create new login account , set permission db admin.

other thing make sure sql server authentication enabled on sql server.

when connected sql server using windows authentication right click sql server > properties > security > sql server , windows authentication mode.

also change connection string

data source=localhost\sqlexpress; initial catalog=optimumweightdb; user=yourloginname; password=yourpassword; 

best regards


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -