database-permissions

Limit Database List to Ones With Permission SQL Server

帅比萌擦擦* 提交于 2019-12-07 10:28:01
问题 By default if you connect to a remote SQL Server via an account that has access to say 1 of the 10 databases. You will still see in the Object Explorer all other databases, obviously due to permissions you cannot actually query them, but you can see their names. I have heard that there is a method that disable this behavior, but I've been unable to find the answer, does anyone know how to do this? To give an example I have a SQL Server called MyDbServer, it has 4 databases, MyDatabase

Ms Access: Record(s) cannot be read; no read permission on [table]

纵饮孤独 提交于 2019-12-07 00:14:59
问题 i wrote script for downloading mdb files and reading them due OLEDB provider. All works fine, but if i try to read from table, it throws an exception: Ms Access: Record(s) cannot be read; no read permission on tblMytable var cmd = new OleDbCommand("SELECT * FROM tblMytable", conn); var reader = cmd.ExecuteReader(); I changed permissions directly in Ms Access for user "administrator" and it works. But the problem is, that this script musst run twice a day and it downloads about 20 files. So

How to give access to SQL Server database mail procedures for a Login in a different database?

早过忘川 提交于 2019-12-06 22:34:03
问题 I'd like to know how to set up permissions within SQL Server to allow my application Login/Role to be able to send email using msdb.dbo.sp_send_dbmail . I have a database MyDb, a user MyUser who is a member of role AppRole . I have a stored procedure myProc that calls msdb.dbo.sp_send_dbmail . If I execute myProc while logged in as sa it all works fine, but if I execute while logged in as MyUser I get an error: Msg 229, Level 14, State 5, Procedure sp_send_dbmail, Line 1 The EXECUTE

Granting mysql access rights to all machines on subnet

假装没事ソ 提交于 2019-12-06 08:41:38
问题 I have a mysql instance (and schema) running on windows that I can access via a connection string based on localhost as the server. now I want to be able to access this db from another machine on the same subnet. If possible I would like to use a single user but allow it to access from any machine on the same subnet. how do I setup security for this? (I already opened the relevant firewall port) Thanks, Eyal 回答1: You can do it like this: GRANT ALL PRIVILEGES ON mydb TO 'username'@'192.168.1.0

Django REST Framework: restrict data records access to the users created them

蹲街弑〆低调 提交于 2019-12-06 08:11:16
问题 I'm trying to figure out, what is the best way to manage model access permissions with Django. I have a table of items which belong to the users created them. All the items a managed via a RESTful API. When using this API I want to limit access to the items created by a given user. Do I have to create several tables or is it possible to achieve the same with just one table? If I have to use multiple tables, how do I correlate API requests with a particular table? 回答1: Ok, I found a way to do

Execute dynamic DDL in PL/SQL procedure through definer role permissions

与世无争的帅哥 提交于 2019-12-06 06:20:33
问题 I want to perform some dynamic DDL in a procedure owned by an admin user. I'd like to execute this procedure with a technical operational user with definer rights (operational user doesn't have the create table role). The problem is the 'create table' permission is granted to the admin user through use of a role, which doesn't allow me to execute the DDL as it seems that roles don't count in named pl/sql blocks. create or replace PROCEDURE test_permissions AUTHID DEFINER AS v_query_string

Limit Database List to Ones With Permission SQL Server

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 17:47:05
By default if you connect to a remote SQL Server via an account that has access to say 1 of the 10 databases. You will still see in the Object Explorer all other databases, obviously due to permissions you cannot actually query them, but you can see their names. I have heard that there is a method that disable this behavior, but I've been unable to find the answer, does anyone know how to do this? To give an example I have a SQL Server called MyDbServer, it has 4 databases, MyDatabase YourDatabse PrivateDatabase ReallyPrivateDb If you connect via an account that only has permissions to

CouchDB read/write restrictions on _users database

[亡魂溺海] 提交于 2019-12-05 14:38:44
I would like to restrict the user permissions so that a normal user is only able to read/write its own user document. I managed to set the write permissions such that a user can only edit their own document (via the validate_doc_update function in the design document). Now I only have to limit a user from viewing the user list or other user documents. If I set the database read permissions to the '_admin' role, then the user will not be able to view their own document, which it's not what I intend. Can this be done in a more general way? I.e. to set read permissions such that a user is able to

TSQL - Executing CLR Permission

孤人 提交于 2019-12-05 01:40:32
问题 I got a sql procedure from a CLR (.net Assembly) that when executed returns an error Msg 6522, Level 16, State 1, Procedure sp_HelloWorld, Line 0 A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_HelloWorld': System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. System.Security.SecurityException: at System

SQL Permissions to Add data and how to verify?

扶醉桌前 提交于 2019-12-04 19:31:44
I'm looking for a good way to maintain permissions on who can add data to a database in a C# app and SQL Server 2005. I need to explain though to make this clear. So let's take an example of this: I have two users Bob and Jim , both have been added to the SQL permissions so they have write access to the database. Now all access is based on Domain User Accounts. All other users only have read access. Now I have a couple tables such as: Users UserPermissions Books BookPublishers So UserPermissions contains a list of Users and BookPublishers. So for example: Bob has permission to add books for MS