Creating New Users With Dbo Permissions

Aug 17, 2004

I am trying to create a new user for a SQL Server database and use the credentials in an


ASP.NET app.





Problem is dbo permissions are not being applied to the database objects when I set up a


new user (Logins -> New Logins) with SQL Server Authentication, set the default database to


the database I want.





I then get an error message saying that the user has not been granted access to their default


database : DBNAME and therefore will not be able to gain access to their default database.





I'm not sure why this is as I am logged in as sa.





Anyway, when I ignore the error and set-up this new user through the Users section of the


database none of the dbo permissions carry over.





Can anyone help?


Cheers.

View 1 Replies


ADVERTISEMENT

Users, Permissions.. Etc.

May 9, 2002

Hi there!
I'm developing an application and i need to do the next thing:
I need to make a process, but this process just need to be done, when nobody else is modyfing datas in the database.

Is there anyway i could check this? I have read about the sp_who stored procedure but this one return all the activity in all the databases, and i just need to check in one specifically. And there's another issue, we all access with the user dbo to the database...

Any help will be appreciated..

View 2 Replies View Related

SQL 7 Users And Permissions

Jan 19, 2000

I restored a copy of a database onto a new server. I created the proper logins on the new server prior to the restore. The users and permissions should all be identical. They appear to be in the system tables, but none of the users or permissions appear in the appropriate screens on Enterprise Manager.

Also, even though the permissions appear to be intact in the syspermissions table, when I connect as a certain user and try to query a table the user should have permissions on, I'm denied access.

Does anyone have any suggestions?

Thanks in advance!
Lisa Rae

View 4 Replies View Related

SP To Get Users And Their Permissions

Sep 7, 2007

Is there an SP that can tell the database, the users with access to the database, and their permissions? Meaning the result would be something like...
<database> <username> db_datawriter
<database> <username> db_datareader
<database> <usernameII> db_owner

Thanks in advance
-Kyle

View 3 Replies View Related

New Users And Default Permissions

Nov 26, 2006

Hi,
I want to create a new user for my database and allow them to only select data from the tables...
CREATE LOGIN NEHardcoreWITH PASSWORD = 'abc'USE aiaccontentdb;CREATE USER NEHardcore FOR LOGIN NEHardcore
What permissions will this give to the new user? Do I need to grant any permissions and/or revoke any?
Thanks!

View 1 Replies View Related

Permissions To Users (Urgent Please Help)

Aug 14, 2001

Hi ,
I have a bunch of Users about 150 of them. I think they can't even run a SELECT .

When they try to run a select they get error messages :

"SELECT permission denied on object 'Object name', database 'Db_name', owner 'dbo'."

I have check out every thing !! All these Users are the members of public role on the database !!

They work fine on other Db's with the same settings !!

Not Sure what to do

PLEASE HELPP !!!

View 1 Replies View Related

How To Import Only The Permissions Fo The Users...

Jun 6, 2000

I have used DTS to imports users from one database(a) to another(b)

DTS run fine, but the original permissions don't were filled.
Can someone explain How I can do it?

Luiz Lucasi
Rio de Janeiro - RJ

View 1 Replies View Related

How To Set All Permissions For All Users Simultaneousy

Mar 10, 2000

Hi,

did anybody encounter or write a stored procedure or a tool that sets all permissions on all users on a given database?
It is a major headache to set all permissions again after some changes with a tool like ErWin and then adding some users.

Kind regards,
Andreas Erben

View 3 Replies View Related

Setting Permissions For Users

Feb 6, 2006

hi, please anybody help me with this....

i need to have a user account with the following requirements:

a. can create/alter/drop tables/views that is created by this user;
b. can read/update/delete records from tables created by this user
c. can read/add records to tables created by other user
d. can create/edit/execute stored procedures

is this possible? how can i do this? how can i allow a user to create new objects or alter objects owned by him at the same time prevent him from dropping objects created by other user?
how can i give a user full access to objects that he created and limit his access rights like dropping objects, deleting records or updating records from tables that is not created by him?

can i do these thru enterprise manager or do i have to run some scripts in order for these to happen? if so, can somebody help me with the scripts or links that i can use for references?

thanks a lot! hope you can help me with these...
thanks a lot...

View 1 Replies View Related

What Permissions Do I Need To Manage Users?

May 23, 2006

I have a user that I have granted the server role "securityadministrator" and a database role "db_securityadmin". When logged inas this user I can create new logins but not run sp_adduser to add thenew login to as this says I don't have permission to do this. I canhowever run sp_revokedbaccess to get rid of a user from the database.

View 2 Replies View Related

How To Copy User Permissions To Other Users?

Oct 10, 2001

Hi Everybody,

I am working on SQL 7.0/2000. I have given lot of permissions to the user 'duser1'. The permissions like select,etc..,create... Now I want to give the same permissions(what I have given to 'duser1') to the other user called 'duser2'. Right now I hvn't created any Database Roles or Server Roles.

Do we have any easy method to copy the permissions of one user to the other user?, like script generation or any method. If anybody knows that please guide me.

tks in advance,
Sam

View 1 Replies View Related

Giving Users Specific DDL Permissions

Jul 20, 2005

I have an archival process on a large database that runs once a month.At the beginning of the process the triggers and indexes on thetables whose data is moved are dropped, the data is moved and then thetriggers and indexes are recreated at the end. This produces amassive improvement in performance.The problem is the process is supposed to run on users accounts (thatsthe way the front-end is set up) and they don't have the neccessarypermissions to drop & create triggers & indexes. I can't see any wayto give them permissions only on specific tables or triggers/indexes.Nor does giving them permissions to the stored procedures that do thedropping & re-creating work, DDL permissions don't seem to beinherited the way they are with tables.Is blanket rights to drop & create objects through the db_ddladminrole the only way users can get rights?Thanks,K Finegan

View 2 Replies View Related

Report Effective Permissions For All Users?

Jul 20, 2005

As our customers demand that we tighten our IT security in the company,I've been asked to prepare a report quarterly showing, for each user inActive directory, what his effective permissions are for every table inevery database that he has permission for on our SQL Server 2000 server. Isearched a bit for a tool to do this, but all I found was the PERMISSIONS()function for showing effective permissions of the current user. Is thereany way to do it for an arbitrary user, without logging in as them?

View 5 Replies View Related

Script To Show Users And Permissions

Dec 11, 2007

I have looked and looked and looked and can not find an answer to this simple question. I want a way to script out all the permissions for a given user.

I have a user (User1) and he has the following permissions lets say:

Server
- View Server Activity

Database1
- CREATE AGGREGATE
- CREATE DEFAULT
- CREATE FUNCTION
- CREATE PROCEDURE
- CREATE RULE
- CREATE SYNONYM
- CREATE TABLE
- CREATE TYPE
- CREATE VIEW
- SHOWPLAN
- VIEW DEFINITION

Schema1
- SELECT
- INSERT
- DELETE

Schema2
- SELECT
- EXECUTE

Objects
- SELECT ON schema3.table1
- EXECUTE on schema4.storedproc1

I need a something (script, report, voodoo magic spell) that will show me this. It is hard to believe that this is not a built in report with SQL2005. It was hard to do in 2000 but you could do it if you played around with the scripting options enough. I can not find a clear cut way of doing this in 2005 to save my life. Maybe I am just blind, but my fellow DBA's have the same problem.

How can I do this? Please???

Jim Youmans
St Louis

View 6 Replies View Related

Moving Users And Permissions Between Servers--urgent

Nov 15, 2000

Is there any easy way to move users between SQL Servers for a particular database?
We have tests and development servers I would like to make sure the user lists are in sync for that db.

Thanks

View 1 Replies View Related

How Can I Create A List Of Users Permissions Daily

Aug 16, 2004

I need to be able to set up a table listing users permissions, this needs to be run daily and then notify me of any changes without using the auditing or profiler software.


Any ideas?? :eek: :eek: :confused:

View 3 Replies View Related

Script To Copy Logins And Users With All Permissions

Jan 26, 2007

Hello all,I am looking for the script, which I believe exists already.I need tobe able to populate the script for security of one database andapply it to another database, even if it is located on another server:1. All logins which not exist have to be created and which existsignored including the NT accounts2. Users same as the old database + the existing ones stay in database3. Passwords for the new logins.4. All permissions/grants on all objects for the users that exists(usually it's the case) and ignore those that don't.I have script which does some of it, but it's not perfect, so everytime there are some errors.Please let me know, if you need me to email script that I have. It'spretty long so I cannot just post it in here.Thank you in advance.

View 3 Replies View Related

SQL 2000: Users, Roles, Permissions Management

Jul 20, 2005

I am in need of a utility (stored procedure, third party app, etc)that will help streamline the process of managing and auditing objectpermissions, users and roles on multiple sql server 2000 instanceswith multiple databases on each instance. That's a quick overview ofwhat I need, do I need to be more specific?Thanks.

View 2 Replies View Related

Finding All SQL Users Permissions And Access On Every Server And DB?

Sep 18, 2007



Hello team, I have learned quite a bit from everyone here. I have decided to post a question for you guys and see what the best method is. Our Sr. DBA has asked me to get a list of all of our users permissions on all of our databases. We have about 20 SQL servers some of which have more databases and instances than I have fingers and toes. Can anyone recommend any solution to this problem? Perhaps there is a script I can download/write which will help me on this? Thanks in advance.

View 10 Replies View Related

Permissions To See Server Logins/Create Database Users

Feb 2, 2007

Our company has 2 Database Roles (DBE and DBA). The DBE creates
database schema, performs SQL Server Administration, and manages server
security. The DBA writes data access, ETL, and manages database
security. In 2005, we're struggling with how to allow the DBA to see
all of the logins on the server in order to add them as users of their
database. What permissions does the DBA need to select from any of the
logins on the server to add them to their database?



Michelle

View 1 Replies View Related

Permissions Hierarchy - GRANT On Logins/users/roles

Jun 20, 2005

A question on the permissions hierarchy:
Since logins, database users, and database roles are both principals and securables - what does it mean to GRANT permission on a login/user/role to another principal? Does it mean that for a login - you can GRANT permission to EXECUTE AS that login or modify it, for example?

View 3 Replies View Related

Diffrence Between Roles, Accounts, Login, Users Permissions And Groups?

Dec 20, 2000

I have jsut started using SQL server 7 and am having problems with accounts permissions, users,roles, groups, owners etc what are the differences?

View 1 Replies View Related

Have Transferred Database &&amp; Users From Sql 2000 To 2005 But How Do I Transfer Their Permissions ?

Aug 14, 2007

We are currently running sql 2000 and are moving our database onto sql 2005 running on a different box.

We have managed to move the entire database, with users however the users permissions on specific tables/views/stored procedures have not been transferred, does anyone know a way of transferring user permissions rather then doing them all by hand?

The system is a large (over 500 table/views/stored procedures) and a very active one and therefore downtime is not optional.

any suggestions would be appreciated

Regards

Chris V

View 2 Replies View Related

Permissions In SQL Server 2005 To Allow Users To View The Management Activity Monitor?

Sep 27, 2006

For SQL Server 2000 we have a user login mapped to msdb with database role membership of db_datareader and public checked. This seems to allow the developers to view the Management Activity monitor. For SQL Server 2005 the same mapping is in place but the developers cannot view the Management Activity monitor. Developers are NOT granted the sysadmin role, and should not have that role.

What permissions need to be set for SQL Server 2005 to allow users to view the Management Activity monitor? They should not be allowed to take actions on the activities.

View 13 Replies View Related

Creating Users

May 1, 2007

Hi All

i WANT to create users for database or sever in SQL SERVER 2005

HOW CAN I GO

Thanks in Advance




Malathi Rao

View 6 Replies View Related

Creating New Tables For New Users

Oct 16, 2007

hi all,
 
How can i create a new data table automatically for new users signing into the website.......what i mean here is that i have a predefined database table and i want that users signing in can have that table for them unique , so that they can fill data for themselves and that data will be visible to all just like forums  

View 1 Replies View Related

Problem Creating Users

Jan 13, 2000

I'm not sure why this is not working, a similar process worked in 6.5 I migrated yesterday.

I restore a database backup from another server. I delete all the users in that database under both Users and Roles, as well as under Security/Logins. Then under Security/Logins I recreate three login and try to reassign them to the appropriate Role. I get an error message: "User or Role already exists in current database". I already deleted that user, the only place he exists is in Public role, which is ok. I don't understand I must be doing something wrong?

Thanks,
Paul

View 1 Replies View Related

Creating Database And Users

Apr 12, 2007

Ok I just installed SQl 2005 for the very first time. I used a service account(domain admin)and Windows NT authentication to install SQL.

Now I am setting up Mcafee EPO on a different server. This application can either install MSDE or use a sql database. I want to use my new SQL server.

What are the best practices to :
a)create database on SQL
b)create a user
c)what permissions to give this user

For example during installation of Mcafee EPO it is asking me name of the remote SQL server, authentication method(Windows or SQL)and the user account.

I am starting to read about SQL but need some quick answers. I need to do the same thing for my SMS 2003 installation. Thanks.

View 4 Replies View Related

Creating New Users With MSDE

Jul 20, 2005

I have MSDE installed on my sistem, and I need to add a new user.How do I go about doing this?

View 2 Replies View Related

Creating Users In Sql Eypress

Jun 13, 2006

Hi,

wanted to add a login in via c# to sql server express.

Is this possible?

I treid this:

String connString = "data source=xtrlt027;Initial catalog=master;Integrated Security=true;"; SqlConnection conn= new SqlConnection();; conn.ConnectionString = connString; try { System.Console.WriteLine("Opening Connection..."); conn.Open(); System.Console.WriteLine("Connection opened!!!"); SqlCommand cmd = new SqlCommand("create login tommtk with Password='tomm2tomm'; use master; create user tommtk;", conn); cmd.ExecuteNonQuery(); System.Console.WriteLine("Login created!!!"); } catch (Exception deleteEx) { System.Console.WriteLine("SqlException Handle :{0}", deleteEx.ToString()); } finally { conn.Close(); System.Console.WriteLine("Connection closed!!!"); }

But i get an exception, that there is an error near the keyword login and the keyword user.So wahts wrongcan anybody help me?Greetz

View 9 Replies View Related

Wanting To Move An Entire Database Using Backup? Export? That Takes All Users, All Data, All Permissions

Apr 25, 2008

I've had issues where backup up and restoring data from sqlserver2005 does not reattach the data to the correct users.  Any tips on how to best accomplish full database moves where data is owned by different security users?
thanks,

View 2 Replies View Related

Permissions For Creating Views

Jun 6, 2007

In database permissions I have granted a user rights to create a view. When she tries to save the view (even save as) it automatically wants to save it to the dbo schema and says she does not have rights to save to the dbo schema.

Two questions:

1) Can I set it up to where she can save a view to a schema which she is the owner?

2) If not, then what permissions must be set to allow her to create / save views but not be able to create, etc. other objects such as tables and stored procedures?

View 4 Replies View Related

Creating Database Users With SQLDMO

Feb 4, 2008

Hi, this is a bit of background to what I'm trying to achive:
I have an application that creates a new database in MS 2000. The application will then create a login, with then create a user and add the login to the user, it will then add that user to the folling roles; db_owner, db_datareader, db_datawriter.
A SQL script is then run to add tables, view and stored procedures to the new database.
Most of this works however I'm having a few problems with loging in as the new user. Aslo how do I ensure that if new objects (tables, stored procs etc) are added the new user will have full permissions on them?
This is the code I have so far...I'm going round in circles with it and was hoping that someone with fresh eyes might be able to see where I'm going wrong:
Many thanks
 1 protected string CreateUser(string strDatabaseName)
2 {
3 //database hase alreday been created
4 SQLDMO.SQLServer gSQLServerDMO = new SQLDMO.SQLServer();
5
6 string serverName = ConfigurationManager.AppSettings["DbsServerName"];
7 gSQLServerDMO.Connect(serverName,
8 ConfigurationManager.AppSettings["DbsUserName"],
9 ConfigurationManager.AppSettings["DbsUserPwd"]);
10 //get the database object
11 SQLDMO.Database dbs = (SQLDMO.Database)gSQLServerDMO.Databases.Item(strDatabaseName, "");
12
13 #region create a login object and populate it
14 SQLDMO.Login login = new SQLDMO.Login();
15 string loginName = strDatabaseName + "_WebLogin";
16 login.Name = loginName;
17 string password = "password";
18
19 login.SetPassword("", password);
20 login.Database = strDatabaseName;
21
22 //check if it exists
23 bool found = false;
24 foreach (SQLDMO.Login ologin in gSQLServerDMO.Logins)
25 {
26 if (ologin.Name == loginName)
27 {
28 found = true;
29 break;
30 }
31 }
32 if (!found)
33 gSQLServerDMO.Logins.Add(login);
34 #endregion
35
36 #region create the user
37 SQLDMO.User user = new SQLDMO.User();
38 //assign the login
39 string userName = strDatabaseName+ "_WebUser";
40 user.Name = userName;
41 user.Login = loginName;
42 //dbs.Users.Add(user);
43
44 found = false;
45 foreach (SQLDMO.User oUser in dbs.Users)
46 {
47 if (oUser.Name == loginName)
48 {
49 found = true;
50 break;
51 }
52 }
53 if (!found)//add the user to the dbs
54 {
55 dbs.Users.Add(user);
56
57 //add user to role
58 //db_owner
59 //SQLDMO.DatabaseRole oRole = new SQLDMO.DatabaseRole();
60 //oRole =
61 //oRole.AddMember(loginName);
62 dbs.DatabaseRoles.Item("db_owner").AddMember(userName);
63 dbs.DatabaseRoles.Item("db_datareader").AddMember(userName);
64 dbs.DatabaseRoles.Item("db_datawriter").AddMember(userName);
65 }
66 #endregion
67
68 string connString = "server=" + serverName + ";database=" + strDatabaseName + ";uid=" + userName
69 + ";pwd=" + password + ";";
 

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved