SQL equivalent of GRTOBJAUT using Authorization List

15 pts.
Tags:
AS/400 DB2
Object authority
SQL Server
USRPRF
Using SQL script, how does one grant object authority to a table using an authorization list?
 
This fails because MyAutList is not a *USRPRF: 
grant all on table mylib.mytable to MyAutList
This works, but is not what I need:
grant all on table mylib.mytable to Public 


Software/Hardware used:
AS/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hello,
Please write to my email address box: (khalifamorin@yahoo.com)
My name is Morin, a good looking girl.
I
became interested in you after going through your profile today and i wish to
continue relationship with you which if nature will permit we have a
long way to go.
I
have a special reason of contacting you which i will make known to you,
tell you more about myself and also send my pictures to you. I will
like you to get back to me through my email address:
(khalifamorin@yahoo.com)
Morin

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    SQL has no such concept. However, normal system commands work for SQL tables, so the GRTOBJAUT command can assign an *AUTL to a table. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Note that if this must be done in a SQL script, you can run the GRTOBJAUT command through QCMDEXC by calling QCMDEXC as a stored procedure. The GRTOBJAUT command would be passed in as a parm to a stored proc. Tom
    125,585 pointsBadges:
    report
  • DavidGar
    Tom - thanks for your answers, I will pursue the QCMDEXC stored procedure route. This has long been a puzzler to me.
    15 pointsBadges:
    report
  • TomLiotta
    Because you can call QCMDEXC without requiring any return parameter values, it can called as a stored procedure without needing to register it first as a stored procedure. In the SQL CALL, remember that the 'Length' will need to be supplied as a DEC(15 5) value, e.g., 0000000123.0000 would be a 123-byte long command string. That's probably the single biggest detail that trips these things up. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following