我有两个模式MONITORING和MONITORING_CONFIGURATION。
我正在尝试创建一个两个模式都可以访问的表。
我将脚本作为MONITORING_CONFIGURATION运行,但并不完全排除它作为MONITORING运行。我可以简单地忽略我在GRANT上获得的错误并获得权限,因为我创建了表作为MONITORING_CONFIGURATION,同时仍然实现了两个模式都可以访问的表的目标吗?错误为<Page id="tabsPage" class="page" xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:t1="views/tab-test/partial-views">
tab1.xml
----------
<GridLayout columns="80,*,80" rows="100" style="background:#fff;opacity:0.95;padding:10 10;margin-bottom:20" loaded="onLoad">
<Button class="btn btn-primary" text="test button"/>
<Button tap="GoToTab2" text="Go To Tab 2"/>
</GridLayout>
SQL-Fehler: ORA-01749: you may not GRANT/REVOKE privileges to/from yourself
01749. 00000 - "you may not GRANT/REVOKE privileges to/from yourself"
当我执行 CREATE TABLE "MONITORING"."WEB_SERVICE_STATUS"
( "WEB_SERVICE_STATUS_ID" NUMBER,
"WEB_SERVICE_ID" NUMBER,
"STATUS" CHAR(1)
);
GRANT ALTER, DELETE, INDEX, INSERT, SELECT, UPDATE, REFERENCES, ON COMMIT REFRESH, QUERY REWRITE, DEBUG, FLASHBACK ON "MONITORING"."WEB_SERVICE_STATUS" TO "MONITORING_CONFIGURATION";
时,我看来已获得select * from "MONITORING"."WEB_SERVICE_STATUS";
权限。
答案 0 :(得分:1)
我会丢弃该表,然后将该确切脚本重新运行为MONITORING。然后你会知道你有两个用户的正确授权。
答案 1 :(得分:1)
以下帮助 - 使用PLSQL围绕当前用户添加逻辑然后使用EXECUTE IMMEDIATE
通过动态SQL采取适当的操作:
DECLARE
vsql VARCHAR2(1000);
BEGIN
IF user = 'MONITORING' THEN
DBMS_OUTPUT.PUT_LINE ( ' Running as ' || USER || ' - creating table' );
vsql := 'CREATE TABLE "MONITORING"."WEB_SERVICE_STATUS"
( "WEB_SERVICE_STATUS_ID" NUMBER,
"WEB_SERVICE_ID" NUMBER,
"STATUS" CHAR(1)
)';
EXECUTE IMMEDIATE vsql;
DBMS_OUTPUT.PUT_LINE ( ' Running as ' || USER || ' - issuing grant' );
vsql := ' GRANT ALTER, DELETE, INDEX, INSERT, SELECT, UPDATE, REFERENCES, ON COMMIT REFRESH, QUERY REWRITE, DEBUG, FLASHBACK ON "MONITORING"."WEB_SERVICE_STATUS" TO "MONITORING_CONFIGURATION"';
EXECUTE IMMEDIATE vsql;
ELSE
DBMS_OUTPUT.PUT_LINE ( ' Running as ' || USER || ' - no action taken' );
END IF;
END;
/
答案 2 :(得分:1)
您是否尝试实现schema-?
之间的连接public partial class Form3 : Form
{
Form2 m_form2;
public Form3(Form2 form2)
{
InitializeComponent();
m_form2 = form2;
//here in this class you can get value of data of listview
List<string> dataOfListView = form2.DataOfListView;
}
}