Useless DEFINE AUTHID clause of the procedures that contain privs SYSTEM right?
Hello
I'm 11 GR 2. I have a user DB OPER I want to allow the creation of other users, so I did the following:
1 / create a procedure as SYSTEM containing some EXECUTE IMMEDIATE instructions for the creation of a
user etc., procedure I did with the option DEFINE AUTHID.
2 / I granted EXECUTE on this procedure to the OPER
3 / then connected under OPER and tried
SQL > exec crea_user ('name')
and received an "ORA-01031: insufficient privileges".
I tried also directly grant the privilege to CREATE a USER to OPER, but it still doesn't work! -. In any case
It is not my goal, of course - I don't want OPER to be able to create any user, I just want to allow
it run/use my procedure AUTHID DEFINE manufactured CREA_USER...
Obviously for this kind of requirement it not there no solution is?
Thank you very much.
Kind regards
SEB
Yes, there is a solution.
Stop creating things under SYSTEM.
SQL> create user oper identified by oper; User created. SQL> grant create session to oper; Grant succeeded. SQL> create user u1 identified by u1; User created. SQL> grant create session, create procedure, create user to u1; Grant succeeded. SQL> conn u1/u1 Connected. SQL> create procedure t(x in varchar2) as 2 begin 3 execute immediate 'create user ' || x || ' identified by ' || x; 4 end; 5 / Procedure created. SQL> grant execute on t to oper; Grant succeeded. SQL> conn oper/oper Connected. SQL> exec u1.t('FOO'); PL/SQL procedure successfully completed. SQL> conn foo/FOO ERROR: ORA-01045: user FOO lacks CREATE SESSION privilege; logon denied
Yes, foo could not open a session because of any privilege, but the user was created successfully.
Tags: Database
Similar Questions
-
How to fix the error by calling the procedure that contains THE mode variable
Hello
I managed to create a procedure.
create or replace procedure A_three_num2
(n_1 number,
N_2 number: = 2.
n_3 number: = 3)
as
Start
n_1: = n_2 + n_3;
dbms_output.put_line (n_1);
end;
So I called procedure expects number 8 to display.
Start
A_three_num2 (n_2 = > 4, n_3 = > 4);
end;
But I got an error. Would you please help me understand the problem?
ORA-06550: line 2, column 1:
PLS-00306: wrong number or types of arguments in the call to 'A_THREE_NUM2 '.
ORA-06550: line 2, column 1:
PL/SQL: Statement ignored
1. start
2 A_three_num2(n_2=>4, n_3=>4);
3. end;
Thank you
GuyTry this->
set serveroutput on declare c_out number; begin A_three_num2(c_out,4,4); dbms_output.put_line('result is: '||c_out); end;
Kind regards.
LOULOU.
-
Hi, can someone help me make a formula which detects and highlights the value of the cell that contains the items of data that I entered in another cell? Thank you
resolved to myself
-
How to restore the drop down from the menu bar at the top that contains bookmarks?
I tried to remove the Yahoo toolbar, when I turned off accidentally unrolling of the menu bar at the top that contains bookmarks. How to restore the menu drop-down?
Is s.o.
In addition, what happened to the file, edit and view menus? if you want to have the menu bar displayed normally.
-
Where does FireFox get the default value for a preference of. What is the format of the file that contains the default value? I need the actual default value for an individual preference.
Topic: config shows some default values, but I need the source from which everything: config returns to the default value.
Any help in this direction is greatly appreciated.User Agent
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x 64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)
The preferences that are not hidden if they have by default are stored in two JavaScript text files in the Firefox program folder
You can open them in a tab in Firefox through these links:
resource:///defaults/pref/firefox.js
resource:///greprefs/all.js
-
Original title: trayapp
When I open the computer message appears, the component you are trying to use is on a network that is not available. Click OK to try again or enter a different path to the folder that contains the installation packagr 'TrayApp.msi' in the box below.
C:\Users\user\AppData\Local\Temp\7zS5216\setup\TrayApp\
When I click ok the message this way that c:\users\user\appdata\local\temp\7zs5216\setup\trayapp\ is not found. Verfy that you have access to this location and try again or try to find the 'TrayApp.msi' in installing a package file from which you can install the product'TrayApp.
When I try to cancel the warning message, is that an installation package for the TrayApp product is not found. Again the installation again using a valid copy of the 'TrayApp of installation' package. I already uninstalled all HP products, but this message is still bothering me, how to solve this problem?Hey Tama,
-What version of windows is installed on the computer?
-Have there been recent changes to the computer before the show?I recommend you go through the next HP document and check if it helps.Hope this information is useful. -
I use Windows 7 Ultimate x 64. I found that when I review the folder that contains large files (more than 5 GB each, for example the HIDEF mkv files), Explorere.exe stopped working and restart.
However, I can open these files when I open them directly from the program (i.e. KMPlayer). Here are 2 events after restart and Explorer.exe crash. I got them from event viewer
I am facing this problem in Mode safe too!
PLEASE HELP T___T
++++++++++++++++++++++++++++++++++++++++++++++++++++
Log name: Application
Source: Application error
Date: 3/2/2553 06:46:01
Event ID: 1000
Task category: (100)
Level: error
Keywords: Classic
User: n/a
Computer: beersonic-PC
Description:
The failing application name: Explorer.EXE, version: 6.1.7600.16450, time stamp: 0x4aebab8d
Name of the failed module: qedit.dll, version: 6.6.7600.16385, time stamp: 0x4a5be02b
Exception code: 0xc0000005
Offset: 0x000000000006bb73
ID of the process failed: 0x133c
Start time of application vulnerabilities: 0x01caa461b0159e53
The failing application path: C:\Windows\Explorer.EXE
Path of the failing module: C:\Windows\System32\qedit.dll
Report ID: 1dd76da9-1055-11df-a980-00195bd2573a
The event XML:
1000
2
100
0 x 80000000000000
12147
Application
beersonic-PC
Explorer.EXE
6.1.7600.16450
4aebab8d
Qedit.dll
6.6.7600.16385
4a5be02b
c0000005
000000000006bb73
133C
01caa461b0159e53
C:\Windows\Explorer.exe
C:\Windows\System32\qedit.dll
1dd76da9-1055-11df-A980-00195bd2573a
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Log name: Application
Source: Windows Error Reporting
Date: 3/2/2553 06:46:12
Event ID: 1001
Task category: no
Level: Information
Keywords: Classic
User: n/a
Computer: beersonic-PC
Description:
10675835, 4 the fault type bucket
Event name: APPCRASH
Answer: No available
Cabin ID: 0Signature of the problem:
P1: Explorer.EXE
P2: 6.1.7600.16450
P3: 4aebab8d
P4: qedit.dll
P5: 6.6.7600.16385
P6: 4a5be02b
P7: c0000005
P8: 000000000006bb73
P9:
P10:Attached files:
C:\Users\beersonic\AppData\Local\Temp\WER168C.tmp.WERInternalMetadata.XMLThese files are available here:
C:\Users\beersonic\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Explorer.EXE_f03929de6e484ca527e71d77fa7726e518545eb_117b41d0Symbol of the analysis:
Recheck for solution: 0
Report ID: 1dd76da9-1055-11df-a980-00195bd2573a
State: 0
The event XML:
1001
4
0
0 x 80000000000000
12148
Application
beersonic-PC
10675835
4
APPCRASH
Not available
0
Explorer.EXE
6.1.7600.16450
4aebab8d
Qedit.dll
6.6.7600.16385
4a5be02b
c0000005
000000000006bb73
C:\Users\beersonic\AppData\Local\Temp\WER168C.tmp.WERInternalMetadata.XML
C:\Users\beersonic\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Explorer.EXE_f03929de6e484ca527e71d77fa7726e518545eb_117b41d0
0
1dd76da9-1055-11df-A980-00195bd2573a
0
+++ RESOLVED +++
I found the problem...
"Haali splitter" program has a function to display MKV and MP4 as a thumbnail in Windows Explorer. What Windows Explorer crash when I open the folder with MKV huge.
Thank you all,
-
How to display the data, that contains non-numeric characters.
Hello
I have table t1 with column of type varchar2 below
ID
------
11151
11412
1113
1 to 114
11b 15
111 6
Now, I need to display the data, that contains non-numeric characters.
Did you get the result like:
STR
----------
1 to 114
11b 15
111 6
WITH t AS (SELECT '11151' str FROM DUAL UNION ALL SELECT '11412' FROM DUAL UNION ALL SELECT '1113' FROM DUAL UNION ALL SELECT '1a114' FROM DUAL UNION ALL SELECT '11b15' FROM DUAL UNION ALL SELECT '111c6' FROM DUAL) SELECT * FROM t where regexp_like(str,'[^[:digit:]]');
See you soon,.
Manik.
-
Is it possible to get the name of the folder that contains the current document?
Hi all!
I know how to get the name of the active document
app.activeDocument.name;
but I was wondering if you could also get the name of the folder that contains the current document. Not sure if this is possible or not, so I thought I'd ask, if so it save me a lot of time.
Thanks in advance!
Hi djbgraphicdesign,
does this work for you?
if (app.activeDocument.saved){ alert(app.activeDocument.path.name); }
Have fun
-
Why do I get the message that my operating system is not supported?
My computer is running Windows 7-64 bit. I have the latest softwear on my iPhone and my iPad. I installed edge inspect on these devices and have the advantage of Google Chrome to inspect the installed extension. I have enter my password strengthened for both devices in the Chrome extension. Why do I get the message that my operating system is not yet supported?
It's VERY interesting... even if I got this weird message, once I connected my iPhone and my iPad to the extension of Google, it worked! See all what I automatically in Google Chrome displays in the application of edge inspect on small devices. It's clean! The only problem I see is that Adobe needs to replace the error message with information about the use of the application.
-
How to filter the records that contains the Spanish character?
Hello
I had an obligation to always records based on the Spanish character.
Kindly guide me for below.
To filter the records that contains Spanish characters?
For example, I had a value in the column name as 'Sureshn '.
My query should return the above folder that contains the Spanish character "N".
Please do the necessary help / advice on that.
Thank you
OraharI don't know what you want, because if you want a? ¢ Analysys and Sureshn, then my previous query is sufficient. However, maybe something like that.
SQL> ed Wrote file afiedt.buf 1 WITH Sample_Data AS (SELECT 'â?¢ Analysys' str FROM DUAL UNION ALL 2 SELECT 'SureshÑ' str FROM DUAL UNION ALL 3 SELECT 'ABCD' str FROM DUAL UNION ALL 4 SELECT 'WXYZ' str FROM DUAL UNION ALL 5 SELECT 'Saubhik' str FROM DUAL 6 ) 7 SELECT str AS "Contains other than English" from Sample_Data 8* WHERE REGEXP_LIKE(str,'[^[a-z,A-Z,0-9]]*') SQL> / Contains other -------------- â?¢ Analysys SureshÑ SQL> ed Wrote file afiedt.buf 1 WITH Sample_Data AS (SELECT 'â?¢ Analysys' str FROM DUAL UNION ALL 2 SELECT 'SureshÑ' str FROM DUAL UNION ALL 3 SELECT 'ABCD' str FROM DUAL UNION ALL 4 SELECT 'WXYZ' str FROM DUAL UNION ALL 5 SELECT 'Saubhik' str FROM DUAL 6 ) 7 SELECT str AS "Contains English" from Sample_Data 8* WHERE NOT REGEXP_LIKE(str,'[^[a-z,A-Z,0-9]]*') SQL> / Contains Engli -------------- ABCD WXYZ Saubhik
-
I have an external PLSQL procedure that dynamically creates a report out of the HTML tags that I then called an anonymous block APEX PLSQL. I'm making bad images with the following code:
in the external procedure. How do you get around that? (NOTE: the procedure is too big to store directly in the APEX)....
' < style td = "width: auto;" "padding: 0px 5px 0px ' > '. spc_rec. SPC_VIABILITY_STATUS. "< table > ' |
"< style td =" width: auto; " text-align: left; "padding: 0px 5px 0px" > ' | spc_rec. SPC_VIABILITY_REASON. "< table > ' | TD > < img src = "" #IMAGE_PREFIX #check2.gif "alt =" "/ > < table > '"
....
Thanks in advance
PaulP
Hi Paul,.
You can use the global variable of the APEX package below to get the image prefix in pl/sql. Of course, your procedure should be in APEX, schema analysis application.
APEX_APPLICATION. G_IMAGE_PREFIX
Kind regards
Hari
-
Cannot configure DBAdapter to call the procedure that takes no parameters
Hello
I created a test as a package below:
create or replace package Tester
as
Main1 procedure;
procedure (x VARCHAR2) Main2;
end;
create or replace package body Tester
as
procedure Main1
is
Start
insert into ziptest values (' Main', sysdate);
commit;
end;
procedure (x VARCHAR2) Main2
is
Start
insert into ziptest values (' in Main2 :'|| x, sysdate);
commit;
end;
end;
----------------------------------------
When I try to configure a DB adapter to call the Main1 procedure, that I'll meet with the following error:
An error occurred while getting stored procedures. Verify that the database connection is valid.
If I try to configure the DB adapter to call Main2, it works without problem.
In addition, this occurs only when the procedure is in a package. If the procedure is independent, no error is delivered.
Is this a known bug or am I missing something. I use Jdev 10.1.3.4 and SOA Suite 10.1.3.4.
Kind regards
AmitHi Amit,
This is a bug in the wizard of DBAdapter. Try to update BPEL for the latest available patch, and if this does not work here workaround has been tested to work on 10.1.3.1 too!
1. modify "Main1' to"Main1 (dummy IN VARCHAR2)"in your package.
2. use the wizard of DBAdapter as ususal to create a partner link that hits this procedure has changed.
3. change your procedure "Main1" back to the way it was IE without any parameters.
4. in your BPEL process file, find the file .xsd to Main1 generated by the wizard in step 2. Replace... inside thefor the "InputParameters" element with an emty tag. Now, go ahead and invoke this link partner as usual. It would work! ;)
Kind regards
Ravi -
How to compile packge inside the procedure that uses this package
ORACLE 10g, 11g
CREATE OR REPLACE PACKAGE PKG_TEST_COMMIT
PROCEDURE Insert_into_table_T1;
PROCEDURE Update_table_T1;
END PKG_TEST_COMMIT;
CREATE OR REPLACE PROCEDURE PROC_TEST_COMMIT as
Begin
PKG_TEST_COMMIT. Insert_into_table_T1; -Insert data into table T1
EXECUTE IMMEDIATE 'DROP table T1;
IMMEDIATE EXECUTION
"create table T1 as select"1 ","d"," s "from DUAL;" -now PKG_TEST_COMMIT package at the stage not compiled
-compile the package
DBMS_DDL.alter_compile ('PACKAGE', 'OWNER', "PKG_TEST_COMMIT");
PKG_TEST_COMMIT. Update_into_table_T1;
End PROC_TEST_COMMIT;
When I try to run the PKG_TEST_COMMIT I get an error: cannot lock the package.
I tried to create a separate procedure for compiling, but the result is the same.
If I'm done PROC_TEST_COMMIT before compiling, then compile - OK.
It's a way to compile the package inside the procedure?TRUNCATE and INSERT / * + APPEND * / should be more effective than deleting them and recreating a table wouldn't it because you don't have to worry about the invalidation and recompilation of all dependent objects.
Justin
-
SQL query to search for the line that contains the identifier for each consecutive group
Hello
I'm on 11.2.0.3 Enterprise Edition.
I have a strange request here - do not know if this is possible without going to procedure...
Given these data of the sample:
create table test_status ( status varchar2(10), revision_id number, revision_timestamp timestamp); insert into test_status values ('PROPOSED', 1, systimestamp); insert into test_status values ('PROPOSED', 2, systimestamp); insert into test_status values ('PROPOSED', 3, systimestamp); insert into test_status values ('ACTIVE', 4, systimestamp); insert into test_status values ('ACTIVE', 5, systimestamp); insert into test_status values ('PROPOSED', 6, systimestamp); insert into test_status values ('PROPOSED', 7, systimestamp); insert into test_status values ('ACTIVE', 8, systimestamp); insert into test_status values ('ACTIVE', 9, systimestamp); insert into test_status values ('FINISHED', 10, systimestamp); insert into test_status values ('FINISHED', 11, systimestamp); insert into test_status values ('FINISHED', 12, systimestamp);
Gives me:
SQL> select * 2 from test_status 3 order by revision_id; STATUS REVISION_ID REVISION_TIMESTAMP ---------- ----------- ----------------------------- PROPOSED 1 25-SEP-14 04.49.47.954000 PM PROPOSED 2 25-SEP-14 04.49.47.962000 PM PROPOSED 3 25-SEP-14 04.49.47.966000 PM ACTIVE 4 25-SEP-14 04.49.47.969000 PM ACTIVE 5 25-SEP-14 04.49.47.972000 PM PROPOSED 6 25-SEP-14 04.49.47.976000 PM PROPOSED 7 25-SEP-14 04.49.47.979000 PM ACTIVE 8 25-SEP-14 04.49.47.982000 PM ACTIVE 9 25-SEP-14 04.49.47.987000 PM FINISHED 10 25-SEP-14 04.49.47.991000 PM FINISHED 11 25-SEP-14 04.49.47.996000 PM FINISHED 12 25-SEP-14 04.49.48.000000 PM 12 rows selected. ws selected.
I want to get this result:
STATUS REVISION_ID REVISION_TIMESTAMP ---------- ----------- ---------------------------- PROPOSED 3 25-SEP-14 04.49.47.966000 PM ACTIVE 5 25-SEP-14 04.49.47.972000 PM PROPOSED 7 25-SEP-14 04.49.47.979000 PM ACTIVE 9 25-SEP-14 04.49.47.987000 PM FINISHED 12 25-SEP-14 04.49.48.000000 PM
Then query the table ordered by Revision_Id, I would get the line containing the highest revision for each consecutive group of status values. I am able to get the line containing the highest revision for each separate status, value, but I can't deal with the scenario where a state value reappears later. In the case of the real world, it is a workflow and I need to take into account the fact that an element through the workflow may be redirected to the back front she proceeds forward again.
Hope it makes sense.
Thank you
John
Hi, John,.
John OToole (Dublin) wrote:
Hello
I'm on 11.2.0.3 Enterprise Edition.
I have a strange request here - do not know if this is possible without going to procedure...
...
Do not no stinkin' procedure:
WITH got_grp_id AS
(
SELECT the status, revision_id, revision_timestamp
ROW_NUMBER () OVER (ORDER BY revision_id)
-ROW_NUMBER () (PARTITION STATUS
ORDER BY revision_id
) AS grp_id
OF test_status
)
SELECT status
MAX (revision_id) AS revision_id
MAX (revision_timestamp) DUNGEON (DENSE_RANK LAST ORDER BY revision_id)
AS revision_timestamp
OF got_grp_id
GROUP BY status, grp_id
ORDER BY revision_id
;
For an explanation of the technique of Difference sets used here, see
Maybe you are looking for
-
I turned my screen at 180 degrees and can run not because I can't open poster tab.i tried to restart and I have the latest version of the software.
-
I don't have norton antivirus protection
I don't have norton antivirus protectionI have no protectionwhere can I download protection
-
Compaq Mini 110: My HP Compaq Mini 110-
SEHR geehrtes team of HP ICH meinen is small Mini Laptop wieder und see perhaps once wanted da wenn ich anstellen also will be, kommt requested password: keine vote was fur ein password ist das. René ich komme einfach nicht. Could Sie mir bitte diese
-
As said, I recently bought a used iPod from the original owner, they had gotten their child a new iPhone and is more used to the iPod. When asked, they told everything what I need to do is to reset the iPod when I got home. Got home and went about re
-
Avast works no-error 'end point mapper.
I can't reboot or get my Avast antivirus to run, and me being said that there is "no several points endpoints available from the endpoint mapper." What can I do? Help!