Re: Set Default Role Question
Posted in 2008
<HEAD> <STYLE>body{font-family: Geneva,Arial,Helvetica,sans-serif;font-size:9pt;background-color: #ffffff;color: black;}</STYLE> <META content="MSHTML 6.00.2800.1605" name=GENERATOR></HEAD> <BODY id=compText> <P>Rajib, Nita, and Everett,</P> <P>Thanks for the quick response. I'll fall back onto a simple grant philosophy until I can push an upgrade through in my company, possibly later this year.</P> <P>-John<BR><BR><BR></P> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 0px; BORDER-LEFT: #0000ff 2px solid">-----Original Message----- <BR>From: Rajib Sarkar <RSARKAR@US.IBM.COM><BR>Sent: Feb 4, 2008 10:15 AM <BR>To: Nita Dembla <NITA@US.IBM.COM><BR>Cc: "informix-list@iiug.org" <INFORMIX-LIST@IIUG.ORG>, informix-list-bounces@iiug.org, John <JOHN_HIBNER@EARTHLINK.NET><BR>Subject: Re: Set Default Role Question <BR><BR><ZZZHTML><ZZZBODY> <P>There's one roundabout way of implementing what u want .. but its application dependent .. <BR><BR>If ur application always checks one table to do access validations before full access to the application is provided then what you can do is to put all your SET ROLE statements etc. in a SELECT trigger on that table. <BR><BR><BR>On XPS there was a common stored procedure called sysdbopen() which is executed for every connection .. maybe that's been implemented in some of the newer releases of IDS .. that can also serve the same purpose as the SELECT trigger but its better in the sense its not application dependent. <BR><BR>Hope that helps.<BR> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR vAlign=top> <TD width=400 bgColor=#ffffff><B><FONT face=Verdana>Rajib Sarkar</FONT></B><FONT face=Verdana><BR>SWG Client Support - Software<BR>Sr. Technical Analyst, DB2 RPD Team <BR>rsarkar@us.ibm.com</FONT></TD> <TD width=451 bgColor=#ffffff><A href="http://www-306.ibm.com/software/support/" target=_blank><IMG height=72 src="cid:1__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=451 border=0></A></TD></TR></TBODY></TABLE><BR><BR><IMG height=16 alt="Inactive hide details for Nita Dembla---02/04/2008 09:03:57 AM---Hi John," src="cid:2__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=16 border=0><FONT color=#424282>Nita Dembla---02/04/2008 09:03:57 AM---Hi John,</FONT><BR><BR> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top> <TD width="1%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=96 border=0><BR><FONT color=#5f5f5f size=2>From:</FONT></TD> <TD width="100%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0><BR><FONT size=2>Nita Dembla/Lenexa/IBM@IBMUS</FONT></TD></TR> <TR vAlign=top> <TD width="1%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=96 border=0><BR><FONT color=#5f5f5f size=2>To:</FONT></TD> <TD width="100%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0><BR><FONT size=2>John <john_hibner@earthlink.net></FONT></TD></TR> <TR vAlign=top> <TD width="1%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=96 border=0><BR><FONT color=#5f5f5f size=2>Cc:</FONT></TD> <TD vAlign=center width="100%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0><BR><FONT size=2>informix-list-bounces@iiug.org, "informix-list@iiug.org" <informix-list@iiug.org></FONT></TD></TR> <TR vAlign=top> <TD width="1%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=96 border=0><BR><FONT color=#5f5f5f size=2>Date:</FONT></TD> <TD width="100%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0><BR><FONT size=2>02/04/2008 09:03 AM</FONT></TD></TR> <TR vAlign=top> <TD width="1%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=96 border=0><BR><FONT color=#5f5f5f size=2>Subject:</FONT></TD> <TD width="100%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0><BR><FONT size=2>Re: Set Default Role Question</FONT></TD></TR></TBODY></TABLE> <HR style="COLOR: #8091a5" align=left width="100%" noShade SIZE=2> <BR><BR><BR><BR>Hi John,<FONT size=4> <BR></FONT><BR>Default Roles feature is only supported from IDS 10.00xC1 onwards.<BR><BR>Regards,<BR>Nita.<FONT size=4> <BR><BR><BR></FONT> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top> <TD width="43%"><B><FONT size=2>John <john_hibner@earthlink.net></FONT></B><FONT size=2> <BR>Sent by: informix-list-bounces@iiug.org</FONT><FONT size=4> </FONT> <P><FONT size=2>02/04/2008 10:50 AM</FONT><FONT size=4> </FONT><BR><BR> <TABLE border=1> <TBODY> <TR vAlign=top> <TD width=165 bgColor=#ffffff> <DIV align=center><FONT size=2>Please respond to<BR>John <john_hibner@earthlink.net></FONT></DIV></TD></TR></TBODY></TABLE></P></TD> <TD width="57%"> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR vAlign=top> <TD width="15%"> <DIV align=right><FONT size=2>To</FONT></DIV></TD> <TD width="85%"><FONT size=2>"informix-list@iiug.org" <informix-list@iiug.org></FONT><FONT size=4> </FONT></TD></TR> <TR vAlign=top> <TD width="15%"> <DIV align=right><FONT size=2>cc</FONT></DIV></TD> <TD width="85%"><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0></TD></TR> <TR vAlign=top> <TD width="15%"> <DIV align=right><FONT size=2>Subject</FONT></DIV></TD> <TD width="85%"><FONT size=2>Set Default Role Question</FONT></TD></TR></TBODY></TABLE><BR> <TABLE cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR vAlign=top> <TD width=5><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0></TD> <TD width=5><IMG height=1 alt="" src="cid:3__=08BBF976DFCB45B18f9e8a93df938@us.ibm.com" width=1 border=0></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><FONT size=4><BR><BR></FONT><TT><BR>Everyone,<BR><BR>I am trying to grant a default role in a IDS 9.40FC3 Database running on AIX 5.2 TL8. I need to have a default set for application ids that can not set it for every iteration of code they run. <BR><BR>I have been able to successfully create the role, and then grant the role to individual users. The user can then set the role and operate as needed. However, the application ids need to be able to run without setting a role.<BR><BR>When I attempted to run (as informix):<BR><BR>GRANT DEFAULT ROLE "role_name" to "user_id";<BR>-- returns with a syntax error, not liking the word default. I tried not using the word ROLE, with and without quotes, and still no success.<BR><BR>GRANT "role_name" to "user_id"; -- works just fine.<BR><BR>I also tried revoking the role and then reissuing it as a grant default..., and it still did not allow me to set the default role.<BR>The set role always does work when issued after a functioning (non-default) gra