[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Granting access to SYSTEM_MAKE_BACKUP() function



Looking at the Database.java code could I modify the method below to 
check if the user has SELECT permission ?

  /**
   * Returns true if the user is allowed to execute the given stored procedure.
   */
  public boolean canUserExecuteStoredProcedure(DatabaseQueryContext context,
                  User user, String procedure_name) throws DatabaseException {
    // Currently you can only execute a procedure if you are a member of the
    // secure access priv group.
    return userHasSecureAccess(context, user);
  }


  /**
   * Returns true if the user is allowed to execute the given stored procedure.
   */
  public boolean canUserExecuteStoredProcedure(DatabaseQueryContext context,
                  User user, String procedure_name) throws DatabaseException {
    if (userHasSchemaGrant(context, user,
                  table.getSchema(), 
                    Privileges.PROCEDURE_EXECUTE_PRIVS)) {
      return true;
    }
    // Currently you can only execute a procedure if you are a member of the
    // secure access priv group.
    return userHasSecureAccess(context, user);
  }



On 30/06/2007, at 10:25 AM, Tobias Downer wrote:

I apologize.  I just checked the code and the user must belong to the "secure access" group to be able to call the backup procedure, so you need to add the user to this group if you wish for them to use the backup function.  The simplest way to do this is by using the following command;

  insert into SYS_INFO.sUSRUserPriv ( UserName, PrivGroupName ) values ( '[username]', 'secure access' );

Toby.

Duncan Groenewald wrote:
I don't get grantee @PUBLIC.  How would I manage to get this ?
On 27/06/2007, at 1:48 PM, Tobias Downer wrote:
Hi,

The following query may help you,

  SELECT * FROM SYS_INFO.sUSRGrant;

Look for "SYS_INFO.SYSTEM_MAKE_BACKUP" under the param column, the  grantee should be "@PUBLIC".  You may need to restart the database  after grants are altered.

Toby.

Duncan Groenewald wrote:

I just tried this but get the following error:
Backup Database
"Exception executing query"
"User not permitted to call: SYSTEM_MAKE_BACKUP"
is there any way I can check whether permissions have been created ?
On 23/06/2007, at 4:16 AM, Tobias Downer wrote:

 grant all on SYS_INFO.SYSTEM_MAKE_BACKUP to [username]



---------------------------------------------------------------
Mckoi SQL Database mailing list  http://www.mckoi.com/database/
To unsubscribe, send a message to mckoidb-unsubscribe@mckoi.com