0

Hi,
Am created a login and an user to access sql server instance and the database.

Creating Login: create login xxx with password='secret';
                
 Creating User:  use testdb;
                 create user yyy for login loginname;

And then i login with this login name(xxx) and also i can able to access the database(testdb).

ERROR:
I can't able to create a schema and also one more thing to ask, how can i give admin role to the users(yyy). Thanks in advance.

4
Contributors
10
Replies
11
Views
5 Years
Discussion Span
Last Post by adam_k
0

Every user logs in into its own schema.

Did you log in through an admin account and tried to grant admin role to the user ?

0

hi jacksantho

search for the sql configuration file in the c drive(i hope this is the drive where os is installed )and there update your password with username and save it..
then u can login with disered name and passowrd..

0

Did you log in through an admin account and tried to grant admin role to the user ?

How to grant admin role to the user?

0

Any standard (non admin)user can't grant admin role to another user, only an admin can do that.

So you need to log in through any user which is an admin account to grant admin role.

0

login as root(admin)from mysql console and then u can create a new user. as root is the admin you can create other user.

0

This will add a user to the sysadmin role:

EXEC master..sp_addsrvrolemember @loginame = 'username', @rolename = N'sysadmin'

Hint: If you have MS management studio you can create a user with all the roles (db or server) and instead of hitting OK you select Script from the top of the window and get a script that will do the same job as hitting the OK button.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.