Procedure That Calculates Factorial Using Value Provided By User?

Nov 12, 2012

Problem 1: Write a procedure with no parameters. The procedure will let you know if the current day is a weekday or a weekend. Execute the procedure.this is what i have so far:

CREATE OR REPLACE PROCEDURE check_day
IS
current_day DATE;
BEGIN

[code][...

Problem 2: Write a procedure that calculates a factorial using a value provided by the user. Write an anonymous program unit that asks the user to enter a value and executes the procedure.

View 1 Replies


ADVERTISEMENT

Forms :: Possible To List PDF File Having User Provided String?

Nov 21, 2012

Is it possible to list pdf file having user provided string using oracle forms? if yes then how? How can I achieve this target?

View 2 Replies View Related

SQL & PL/SQL :: Calculates Value Of Product Sold

Nov 25, 2011

Stored Procedure: Receives the MFR and PRODUCT identifying the product sold as well as the Quantity purchased by the customer.

 Calculates the value of the product sold (looks up the cost of the product in the products table and multiplies by the quantity sold)
 Returns the calculated value.

View 12 Replies View Related

Data To Be Provided Into Excel

Aug 16, 2012

OS:RHEL
DB: 11.2.0.1

My client has asked me to provide production data from a xyz table into excel.The constrain for the same is that he needs the data for a particular month within a specific range of dates.

Is this possible using oracle utilities like SQL developer, plsqldeveloper or toad or any other. If yes i want to know if this is possible without using the same?

View 9 Replies View Related

Ways Provided For Database Migration Except Datapump?

Jul 2, 2013

what are the ways provided by oracle for database migration,except datapump? and which one is recomended

View 1 Replies View Related

JDeveloper, Java & XML :: Generating Document That Include Fields Provided In Table

Nov 27, 2011

I need to generate a document that include fields provided in following.

CREATE TABLE t
(x_customer_po VARCHAR2(20 BYTE),
x_accessory_code VARCHAR2(3 BYTE),
x_install_loc HAR(3 BYTE));
INSERT INTO apps.T
VALUES('N45882','D0C','MFG');
INSERT INTO apps.T

[code]...

How can I get the output as formated XML?

--output:

<OrderAcknowledgments><Sender ID="999999999" Name="Cars"></Sender><DateTime>2011-11-27T22:00:14.3</DateTime><Acknowledgments><Acknowledgment><Vehicle><CustomerPONum>N45882 </CustomerPONum><Options><Option><Code>D0C</Code><InstallLocation>MFG</InstallLocation></Option><Option><Code>R0B</Code> <InstallLocation>MFG</InstallLocation></Option><Option><Code>LK2</Code><InstallLocation>MFG</InstallLocation></Option><Option ><Code>K0B</Code><InstallLocation>MFG</InstallLocation></Option></Options></Vehicle></Acknowledgment><Acknowledgment><Vehicle ><CustomerPONum>N45883</CustomerPONum>

[code]...

View 5 Replies View Related

SQL & PL/SQL :: Procedure To Call User Defined Function?

Apr 12, 2012

I have made a function to add two number create or replace function add_num(a in number, b in number) return number

as
begin
return a+b;
end;
/

i run it via
select add_num(2,5) from dual;

my question is how to call add_num in procedure.

View 9 Replies View Related

SQL & PL/SQL :: How To Change User Password In Stored Procedure

Sep 9, 2010

OBJECTIVE: To allow a user to change their own password after logging into an application.

BACKGROUND: I have a stored procedure where I pass the userid, old password, and new password. The stored procedure contains the following ALTER statement:

EXECUTE IMMEDIATE 'ALTER USER :uid
IDENTIFIED BY :npwd REPLACE :opwd'
USING IN v_user_id, v_new_pwd, v_old_pwd;

where v_user_id, v_new_pwd, and v_old_pwd are the arguments passed to the stored procedure.

FACTS:
(1) The procedure compiles fine;
(2) During execution, SQLCODE returns "0" (i.e. zero);
(3) My userid does have permission to change my password and execute the stored procedure;
(4) At the time I call the stored procedure, I am successfully logged into the application with my userid and old password.

PROBLEM: When I try to login with the new password I get the following error: "ORA-01017 invalid username/password; logon denied".

View 12 Replies View Related

SQL & PL/SQL :: Writing Procedure In User 2 Schema Accessing Table Product - Not Compiled?

Dec 17, 2010

I have got 2 users as user1 and user2.I have used the following statements from user 'user1':

create role GENEVAOBJECTS;
grant select, insert, update, delete on PRODUCT to GENEVAOBJECTS;
grant GENEVAOBJECTS to user2;

In the above statements, product is a table. Now, I could able to access this table from user 'user2'. But however if I write a procedure in user2 schema accessing the table product, then the procedure is not getting compiled.

create or replace procedure test_prc as
v_test number(9);
begin
select product_id into v_test
from PRODUCT where rownum=1;

[code]...

why I cannot access that table from procedure?

View 8 Replies View Related

Create Procedure To Create User In Oracle

Jan 19, 2012

I need to create PROCEDURE to create user in oracle

CREATE OR REPLACE PROCEDURE "CREATE_USER_ORACLE8"
(
USER_ID in VARCHAR2,
PASSWORD in VARCHAR2,
ROLES in VARCHAR2,
nReturnCode OUT NUMBER
)
BEGIN
[code].......

Compilation errors for PROCEDURE NOG.CREATE_USER_ORACLE8

Error: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:

; is with authid deterministic parallel_enable as
Line: 9
Text: BEGIN

i want that the customer execute PROCEDURE (user_id,password,PROCEDURE )

View 5 Replies View Related

Product User Profile - Restrict User From Running Queries On DB From Third Party Tools

Apr 25, 2011

There is a requirement in my database that I want to restrict the user from directly running queries on database from third party tools such as pl/sql developer and toad.

There is a utility in SQL product_user_profile through which this can be done but it is only restricted if you run the query through sql plus. If I want to restrict and (give suppose select,insert) to a user for directly running queries through PL/SQL.

View 1 Replies View Related

Server Administration :: Externally Authenticated User Login Syntax As Proxy User?

Nov 15, 2010

I created an externally authenticated user in database. And can login without password with below syntax.

SQL> connect / @TESTDB
Connected.
SQL> show user;
USER is "SCOTT"

This scott user has a proxy permission to another DBuser PROXY_USER. Previously I used to login using below syntax.

connect scott[proxy_user]/password_for_scott@TESTDB

So now, what syntax should be used for this "ExternallY Authenticated" user to login as a proxy user?

View 10 Replies View Related

Forms :: User Privileges - Assign Permissions To One User To Add / Delete / Edit Data?

May 28, 2011

how can i assign permissions to one user to add,delete,edit data and other user should be able to perform all functions or selected functions

View 12 Replies View Related

Server Utilities :: User Creation Definition In User Mode Export

Mar 31, 2010

I would like to know if 'user creation definition' is exported in user mode export if export is done with DBA role..If it is Not, does it mean we always need to precreate the user before we import the dump created using 'user mode export'?

View 2 Replies View Related

Security :: Authenticating Oracle User Based On Windows User ID?

Mar 11, 2011

We are trying to implement the following security to our database.

As of now, the access rights are same for all the windows users logging into the Oracle application with the same Oracle user Id.

But now, we want to improve our security by granting different levels of rights to the users based on their Network Id even though they use the same Oracle User Id to log into the application.

We are not looking for the users to be identified externally.

(CREATE USER "OPS$ORACLE-BASE.COMTIM_HALL" IDENTIFIED EXTERNALLY;
GRANT CONNECT TO "OPS$ORACLE-BASE.COMTIM_HALL";
)

View 3 Replies View Related

Forms :: Login User From One CANVAS And Access Second As Per-user Rights?

Oct 20, 2012

- we have user id parameter.can we update the parameter(:parameter.p_userid) before firing "WHEN NEW FORM INSTANCE TRIGGER"(when new form instance trigger contain code for tree node), for login another canvas as per user rights?

- i have created a login form in one canvas.

- also tree node Hierarchy form created on another canvas. now we want to login through login screen, after login only those forms should show in tree Hierarchy which users have rights. for this purpose we want to pass the parameter of userid before connecting to tree node form through the following query

SELECT COUNT (*)
INTO v_count
FROM usersinfo
WHERE usersname = :USERBLOCK.usernames AND passwords = :USERBLOCK.passwords ;

[code]...

Every thing is working but when we click on button in login form at that time parameter.p_userid will return null. because above code is define on button click in login screen, i cannot understand where i need to define the above code .

View 1 Replies View Related

PL/SQL :: User Session Has Expired And Enable User Without Changing The Password

Aug 13, 2012

User session has expired. I have to enable user without changing the password of the user.

View 1 Replies View Related

Security :: User Locked / Track User Who Hit Wrong Password

Dec 21, 2010

We have the database user called c88888 and is locked yesterday. I came to this with the following query.

select * from dba_users where username like 'C88888';

Due to invalid password the user was locked. Can we track who hit the database with the wrong password?

View 5 Replies View Related

PL/SQL :: Create Trigger To Insert Data From One User To Another User In Same Database?

Apr 16, 2013

I Created One Trigger as Follows

CREATE OR REPLACE TRIGGER TRIGGER1
BEFORE INSERT
ON table1
FOR EACH ROW

[code]......

Here , I Want To Insert The Data From My User To Test User . In This Situation When I Execute The Above Trigger It Shows The Error PL/SQL: ORA-00942: table or view does not exist

View 3 Replies View Related

Client Tools :: Grant User Schema To Another User

Feb 9, 2011

I have two users say A and B. I have all the tables,views,indexes, types,procedures,packages etc. User B wants to access all the objects from user A.

View 4 Replies View Related

Server Administration :: Creating A View In User From Another User?

Nov 9, 2011

I have a strange problem when creating a view in user from another user

I have a user called "Cash_tst"

its syntax creation is

-- Create the user
create user CASH_TST
identified by ""
default tablespace CASH
temporary tablespace TEMP
profile DEFAULT
quota unlimited on cash;
-- Grant/Revoke object privileges
grant connect to CASH_TST;
grant dba to CASH_TST;
grant resource to CASH_TST;

-- Grant/Revoke system privileges
grant create any view to CASH_TST;
grant unlimited tablespace to CASH_TST;

I want to create a view

CREATE VIEW TAMER
AS SELECT *
FROM [b]AROFL[/b].RA_CUSTOMER_TRX_LINES_ALL_BEFO

"AROFL" is another user on the same database
when try to create the view "tamer" i got message of
"insufficent privilege"
although i granted "create any view" to the user "cash_tst"

View 12 Replies View Related

OS User Occupying Shared Memory As Oracle User

Dec 11, 2012

we are trying ti implement BMC monitoring tool for our oracle 11g2 RAC/solaris10 environment. for the purpose we create a user called bmcuser in OS level, this user connecting database to monitor, this user occupy shared memory as oracle. Explain why this user taking that much shared memory just to connect database using sqlplus.

oracle taking 55% bmcuser taking 44%,

SQL> show parameters memory

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 3232M
memory_target big integer 3232M
shared_memory_address integer 0
SQL> show parameters sga

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
lock_sga boolean FALSE
pre_page_sga boolean FALSE
sga_max_size big integer 3232M
sga_target big integer 0
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
6449 bmcuser 47M 44M sleep 23 10 0:57:31 0.2% PatrolAgent/1
[code]........

pga & uga usage sessionwise

SID     ORA_USR     OS_USR     S_PROG     S.MACHINE     S.PGA_MEM     S.PGA_MEM_MAX     S.UGA_M     S.UGA_M_MAX
252     (null)     oracle     oracle@racdev1.zakathouse.org (ARC3)     racdev1.     31054584     32168696     181056     181056
227     (null)     oracle     oracle@racdev1.zakathouse.org (ARC2)     racdev1.     31054584     32168696     181056     181056
177     (null)     oracle     oracle@racdev1.zakathouse.org (ARC0)     racdev1.     31054584     32168696     181056     181056
576     (null)     oracle     oracle@racdev1.zakathouse.org (LGWR)     racdev1.     16693544     21281064     181056     181056
326     (null)     oracle     oracle@racdev1.zakathouse.org (LMS0)     racdev1.     13753080     13753080     181056     181056
376     (null)     oracle     oracle@racdev1.zakathouse.org (LMS2)     racdev1.     13556472     13556472     181056     181056
[code]........

View 6 Replies View Related

Security :: User Should Be Able To Read All The Objects Of User?

Sep 12, 2011

User A contains tables, views, LOB's, types, procedures, triggers, sequences, indexes, synonyms. User B wants to have read-only privilege on the objects of User A.

I can provide select on privilege on tables and views. How about providing read-only privileges to other objects?

View 1 Replies View Related

SQL & PL/SQL :: How To Grant Permissions To Current User While Using Xyz User

Apr 23, 2011

I want to perform something like -

Conn xyz/passwordxyz
grant create procedure to 'xyz';

I want to give permissions to my current user 'xyz' , I am able to give permissions to user using system user but Is there any way to grant permissions to user 'xyz' while I am using 'xyz' user.

View 2 Replies View Related

PL/SQL :: User Data Selection Between 2 Databases With Same User Name?

Mar 25, 2013

I have two databases (say DATABASE 1 with user USER1 with table A and DATABASE2 with user USER1 with table A). I want to select the table A in USER1 DATABASE2 from DATABASE1 USER1.

View 5 Replies View Related

Security :: To See Any Database For The Operations Of Sys User Or Any Other User

Aug 23, 2011

I have enabled Auditing in my oracle Database but I am not able to see any database for the operations of sys user or any other user in my "SYS.AUD$" and "SYS.FGA_LOG$" tables.

Value for the parameter "AUDIT_TRAIL" is set to "db,extended".

I am working as "SYS" user and I have shutdown and again startup the database but neither there was any information in both the tables nor I can see any files at the destination specified by "AUDIT_FILE_DEST".

View 10 Replies View Related

PL/SQL :: How To Write Procedure To Load Data Into Table Using XML File As Input To Procedure

Sep 20, 2013

how to write procedure to load the data into a table using xml as input parameter to a procedure and xml file is as shown below which is input to me. 

xml version="1.0"?><DiseaseCodes><Entity><dcode>0</dcode><ddesc>(I87)Other disorders of veins - postphlebitic syndrome</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J04)Acute laryngitis and tracheitis</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity><Entity><dcode>0</dcode><ddesc>(J17*)Pneumonia in other diseases - whooping cough</ddesc><claimid>34543></claimid><reauthflag>0</reauthflag></Entity></DiseaseCodes>.

View 3 Replies View Related

SQL & PL/SQL :: Exception In Procedure / Created One Procedure Based On One Table Item Master

Mar 6, 2010

I have created one procedure based on one table item master which has a field called item stock or non stock based on this i will fetch data from one of two tables .If its a stock item data will be retrieved from wip_main_acnt table and if its non stock it will pick from ns_main_acnt.my procedure is working fine but all i need is i just want to put an exception that if data is not found in one of the table based on the item selected.I am confused which one to be used whether no_data_found or notfound%.

CREATE OR REPLACE PROCEDURE dflt_pr_acnt (
l_item_code IN VARCHAR2,
l_main_acnt_code OUT VARCHAR2
)
[code]....

View 8 Replies View Related

SQL & PL/SQL :: DBA User Access To Other User Objects

Dec 6, 2010

when a dba user'AA' try to access other user'BB' object it gives error pls-00201 identifier 'BB.function_name' must be declared. However the procedure of BB user are being accessible.

View 17 Replies View Related

SQL & PL/SQL :: How To Copy Tables From One User To Another User

Sep 22, 2011

how to copy tables from one user to another user using pl/sql

View 18 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved