Tag Info

New answers tagged

0

I'm not sure how much scope you have to make changes but why not separate the 2 concepts.? Have a field or flag on the user table has_voted. And put the vote in a separate table. App logic checks to see if they have voted, and only allows them to vote if the field is blank. Vote gets inserted in separate table so you can't tell who has voted for what.


0

How about encrypting the vote using a key that only the user and/or the system knows? Adding some more information: Use a symmetric encryption so that you can decrypt it. Encrypt outside the database. Do not use database encryption functions if you want to protect it from DB admin because admin has several ways to snoop into the queries and read the keys. ...


0

Every schema must have an owner, which is a database principal (user or role) within the database. The significance of the schema owner is that the owning principal has full control permissions. Also, objects within the schema inherit the schema owner by default so the owning principal typically has control permissions on all database objects within the ...


0

It is impossible to do this using permissions only . The only way is to create a stored procedure as described here If you want to avoid stored procedures, a workaround is: GRANT ALL PRIVILEGES ONtestuser_%. * TO 'testuser'@'%'; (as suggested here); however, this has the problem that the users must then be very careful in naming their databases. For ...


1

ALTER USER should be enough, see below. SQL> select banner from v$version where rownum = 1; BANNER -------------------------------------------------------------------------------- Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production SQL> create user u1 identified by u1; User created. SQL> create user u2 identified by u2 ...


1

you have not shown the roles TEST_USER is granted. Likely they have been granted the DBA role which allows ALTER USER. see the documentation for details. This query will show the roles a user has SELECT * FROM DBA_ROLE_PRIVS where grantee = 'TEST_USER' of course this requires privileges too, unless you have the CATALOG role, if you select from this ...


0

It seems there was some issue with TOAD. I opened TOAD after they granted me DBA Role, yet it was like it did not take effect. I could query the USER_ROLE_PRIVS table and see I had the role, I could GRANT myself the SELECT_CATALOG_ROLE, but when I called DBMS_METADATA.GET_DDL it did not work. Since I had open TOAD after the access had been granted, I ...


2

I really had to think about this one. Error 1442 affecting GRANT commands ? Note the MySQL Documentation Error: 1442 SQLSTATE: HY000 (ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG) Message: Can't update table '%s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. If you are using managed ...


2

What @Craig already explained. Plus, since GRANT can grant privileges on multiple objects at once, you can use a single statement without looping: DO $$ BEGIN EXECUTE ( SELECT 'GRANT ALL ON TABLE ' || string_agg (format('%I.%I', table_schema, table_name), ',') || ' TO test' FROM information_schema.tables WHERE table_schema = ...


4

GRANT doesn't take wildcards in table identifiers. You can use ON ALL TABLES IN SCHEMA, but that requires a single schema name. If you want to do things with wildcard pattern table names you will need to use PL/PgSQL's EXECUTE format(...) in a DO block to loop over the information_schema.tables view. See many related answers here on DBA.se and Stack ...


-4

First revoke your database REVOKE CONNECT ON DATABASE your_database FROM PUBLIC; then try with your GRANT query.


0

Try permitting TRUNCATE on the table to the user who is not root. https://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html DROP, DELETE, EXECUTE are necessary.



Top 50 recent answers are included