Error after executing dbowner.sql file
I'm installing People Soft and I'm on the step for executing sql files
I'm trying to execute dbowner.sql that is content of it
set echo on
spool dbowner.log
GRANT DBA TO PS IDENTIFIED BY PS;
CONNECT PS/PS;
CREATE TABLE PSDBOWNER (DBNAME VARCHAR2(8) NOT NULL, OWNERID VARCHAR2(8) NOT NULL ) TABLESPACE PSDEFAULT;
CREATE UNIQUE INDEX PS_PSDBOWNER ON PSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
CREATE PUBLIC SYNONYM PSDBOWNER FOR PSDBOWNER;
CONNECT system/manager;
REVOKE DBA FROM PS;
ALTER USER PS QUOTA UNLIMITED ON PSDEFAULT;
spool off
after execution i received this
SQL>
SQL> GRANT DBA TO PS IDENTIFIED BY PS;
Grant succeeded.
SQL> CONNECT PS/PS;
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
Connected.
SQL> CREATE TABLE PSDBOWNER (DBNAME VARCHAR2(8) NOT NULL, OWNERID VARCHAR2(8) NOT NULL ) TABLESPACE PSDEFAULT;
Table created.
SQL> CREATE UNIQUE INDEX PS_PSDBOWNER ON PSDBOWNER (DBNAME) TABLESPACE PSDEFAULT;
Index created.
SQL> CREATE PUBLIC SYNONYM PSDBOWNER FOR PSDBOWNER;
Synonym created.
SQL> CONNECT system/manager;
Connected.
SQL> REVOKE DBA FROM PS;
Revoke succeeded.
SQL> ALTER USER PS QUOTA UNLIMITED ON PSDEFAULT;
User altered.
SQL>
SQL> spool off
could you help me?
If you need more info write me
>
SQL> CONNECT PS/PS;
Error accessing PRODUCT_USER_PROFILE
Warning: Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
>
script PUPBLD.SQL runs from psadmin.sql, but this is run after the dbowner.sql
+@%ORACLE_HOME%\sqlplus\admin\pupbld+
You can try running this script (PUPBLD.SQL) manually, but I never saw this going wrong. Something has gone wrong, which will most likely give more errors later on.
Did you run the scripts in the correct order with the correct user:
createdb10.sql - as sysdba
utlspace.sql - as sysdba
dbowner.sql - as sysdba
XXddl.sql - as sysdba
psroles.sql - as system
psadmin.sql - as system
connect.sql - as system
Regards,
Hakan
Added psroles.sql thanks to bandar
Edited by: Hakan Biroglu on Aug 21, 2012 8:26 AM
Similar Messages
-
Error while executing the .sql file
Hello,
Every time when i execute the below plsql it's keep throwing the error message as show in below output, this happens even when i manually create the trigger before executing the .sql file of all the below statements, can you please correct me what i am doing wrong here. Thank you.
DROP TABLE FCSDWH.REF_DATA_MASTER;
CREATE TABLE FCSDWH.REF_DATA_MASTER
REF_DATA_MASTER_ID NUMBER PRIMARY KEY,
DESCRIPTION VARCHAR2(255 CHAR),
CREATE_ID VARCHAR2(10 CHAR),
CREATE_DT DATE,
LST_UPD_ID VARCHAR2(10 CHAR),
LST_UPD_DT DATE,
ACT_STRT_DT DATE,
ACT_END_DT DATE
TABLESPACE FCSDWH
STORAGE(INITIAL 50K);
DROP SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ;
CREATE SEQUENCE FCSDWH.REF_DATA_MASTER_SEQ START WITH 1 INCREMENT BY 1;
DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG";
CREATE OR REPLACE TRIGGER FCSDWH.REF_DATA_MASTER_TRG
BEFORE INSERT ON FCSDWH.REF_DATA_MASTER
FOR EACH ROW
BEGIN
SELECT FCSDWH.REF_DATA_MASTER_SEQ.NEXTVAL INTO :NEW.REF_DATA_MASTER_ID FROM DUAL;
END;
/Output:
SQL> @/home/smadala/REF_DATA_MASTER.SQL
Table dropped.
Table created.
Sequence dropped.
Sequence created.
DROP TRIGGER "FCSDWH.REF_DATA_MASTER_TRG"
ERROR at line 1:
ORA-04080: trigger 'FCSDWH.REF_DATA_MASTER_TRG' does not exist
Trigger created.
SQL>The trigger is "attached" to the table so when you drop the table the trigger goes as well.
John -
Oracle 9i export error after running catexp.sql file
After running catexp.sql file in oracle 9i 9.2.0.7.0 as system user,it gives the following error while logging
ORA-04020: deadlock detected while trying to lock object SYS.DBMS_STANDARD
please help me.............."catexp.sql" is to be run by SYS AS SYSDBA.
You'd have to cleanup any extra objects that you created in the SYSTEM account.
Why did you think that you needed to run "catexp.sql" ? Are you exporting using 9i exp against a 10g database or against a 9i database ? -
Error in executing dynamic SQL
i am getting error in executing dynamic SQL
declare
vr_RenewService NUMBER(10,0);
vr_sql VARCHAR2(50);
begin
vr_sql:='Select Case
when 5 <= 365 Then 1
When 1= 0 Then 1
else 0 end into' || TO_CHAR(vr_RenewService) || 'from dual;';
execute immediate vr_sql;
--dbms_output.put_line(vr_RenewService);
end;
ERROR
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at line 6
06502. 00000 - "PL/SQL: numeric or value error%s"
*Cause:
*Action:i too have tried this before you posted this solution but getting error message
declare
vr_RenewService NUMBER(10,0);
vr_sql VARCHAR2(100);
begin
vr_sql:='Select Case
when 5 <= 365 Then 1
When 1= 0 Then 1
else 0 end from dual;';
execute immediate vr_sql into vr_RenewService;
--dbms_output.put_line(vr_RenewService);
end;
ORA-06512: at line 11
00911. 00000 - "invalid character"
*Cause: identifiers may not start with any ASCII character other than
letters and numbers. $#_ are also allowed after the first
character. Identifiers enclosed by doublequotes may contain
any character other than a doublequote. Alternative quotes
(q'#...#') cannot use spaces, tabs, or carriage returns as
delimiters. For all other contexts, consult the SQL Language
Reference Manual.
*Action: -
How to execute a .sql file from a batch file
Hi all
I've to take backup of a database weekly twice on every wednesday & Friday @ 5pm IST. I've written a hot backup script, which works every well.
now i want to automate the script. ie i want this script to run on wednesday & friday @ 5pm without any human interfearance ie with out actually any1 executing this script.
i created a batch file prod.bak with the following lines
@echo off
set oracle_sid=testdb
set oracle_home=d:\oracle\ora92
sqlplus /nolog
connect sys as sysdba/oracletest@testdb
this batch file when eexecuted connects me to sql prompt.
Now i want to execute my backup script bkp.sql automatically when it is connected to sql prompt.
(i tried with these lines in the above batch file...
call bkp.sql---it just opens the bkp.sql file in notepad & displays the script
start bkp.sql---same as call
connect / as sysdba/pwd@[email protected] --- does not work simply remains a the sql prompt.
At 17:00 /Every:w,f "d:\bkp.sql"---does not work simply remains at the sql promt.)
Can any1 let me know what should i write in the batch file that will execute the bkp.sql file automatically after it gets connected to sql prompt. M using oracle 9i.
I'll manage he time through windows utility of scheduling task.. Let me know how to execute the .sql file from a batch file.
Thanks
TriptiTry
sqlplus "sys/oracletest as sysdba" @bpk.sql
Working locally, and having set the ORACLE_SID, you don't need to specify the SqlNet alias (@testdb).
Remember to put an exit at the end of the bpk.sql script. -
Executing multipule .sql files in Sequence
Hi ,
I am new to oracle world . I need to execute 150 .sql files from my local machine . I am trying do something like this ...
but facing many errors ... I am using oracle 10 g
Please advice me .
CREATE OR REPLACE PROCEDURE MYPROC AS
BEGIN
DECLARE
CNT NUMBER :=0;
@c:\sql\1.sql;
CNT:=CNT+1;
@c:\sql\2.sql;
CNT:=CNT+1;
commit;
EXCEPTION
BEGIN
ROLLBACK;
DBMS_OUTPUT.PUT_LINE('TRANSACTION ROLLEDBACK')
DBMS_OUTPUT.PUT_LINE('Failed at Executing' CNT-1)
CNT:=0;
END;
END;
END MYPROCuser11791474 wrote:
i need to create pl sql because if any of these files are errored then i need to terminate my execution . I guess just executing 15o sql files in one wrapper sql will keep executing next sql files.
do you have any idea about how to call sql files in pl sql then ?No you can't call an sql*plus file in Pl/sql.
What you can do in SQl*plus is someting like this:
untested
-- set an exit condition
WHENEVER SQLERROR EXIT ROLLBACK
spool logscripts.log
prompt "running script 1"
@script1.sql
prompt "running script 2"
@script2.sql
prompt "running script 3"
@script3.sql
prompt "running script 5"
@script4.sql
prompt "running script 6"
@script5.sql
spool off -
How to execute a sql file inside a plsql file?
It's easy to exec a plsql inside a sql. Simply
start my_proc.plsql
exec my_proc;
But how to execute a sql file inside a plsql file?
declare ...
begin
start my_sql.sql?
end;
Thanks.
- ZacDoesn't work. Even though @ is different from start in this case but it just doesn't like the way sql and plsql are mixed. For example:
DECLARE n NUMBER := 0;
BEGIN
select COUNT(*) INTO n from user_tab_partitions;
DBMS_OUTPUT.put_line('Number of partitioned tables = ' || to_char(n));
if n = 0 then
DBMS_OUTPUT.put_line('createViewsProcs.sql');
@createViewsProcs.sql
else
DBMS_OUTPUT.put_line('createPartitionViewsProcs.sql');
@createPartitionViewsProcs.sql
end of;
END;
SQL> @postimp.sql
SQL> DECLARE n NUMBER := 0;
2 BEGIN
3 select COUNT(*) INTO n from user_tab_partitions;
4
5 DBMS_OUTPUT.put_line('Number of partitioned tables = ' || to_char(n));
6
7 if n = 0 then
8 DBMS_OUTPUT.put_line('createViewsProcs.sql');
9 @createViewsProcs.sql
9 SET SERVEROUTPUT ON SIZE UNLIMITED;
10 SET TERM ON;
11 SET ECHO ON;
12 EXEC DBMS_OUTPUT.put_line('STARTING VIEWS, PROCS, ETC, THIS MAY TAKE A FEW MINUTES');
13 EXEC DBMS_OUTPUT.put_line(SYSTIMESTAMP());
14
15
16 CREATE OR REPLACE PACKAGE db_convert AS
17 FUNCTION ......
32 END;
33 /
SET SERVEROUTPUT ON SIZE UNLIMITED;
ERROR at line 9:
ORA-06550: line 9, column 5:
PL/SQL: ORA-00922: missing or invalid option
... -
Importing and executing a .sql file into Oracle 10g
Hi
I am looking to import and execute a .sql file(create scripts created of a databse designed in MS SQL Server 2005). The file was imported into Oracle APEX 3.10 but we are unable to execute the script. Please suggest alternatives as to how we can import these files.
Thanks in advance.You likely need to migrate the database (objects and data). This is not so easy and you should have a look to migration tools: http://www.oracle.com/technology/oramag/oracle/07-sep/o57sql.html.
-
Bat file execute all *.sql files in a folder
Hi all,
How to write a *.bat file to execute all *.sql files in a folder?
Because have about 20 *.sql file in a folder. There are used to fix data in my database. The number of *.sql file increases day by day. So I want to write a *.bat file to execute all *.sql file in the folder. Since I just run this *.bat file.
Mai Thanh Hải.user545846 wrote:
Hi
I have done this many times. can guide you. :)And did it fail to work all the times you tried it?
c:\>type test1.sql
select 1 from dual;
exit
c:\>type test2.sql
select 2 from dual;
exit
c:\>sqlplus scott/tiger@testdb @c:\test*.sql
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:37:04 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SP2-0556: Invalid file name.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining optionsWildcards in SQL*Plus filenames don't work. So why do you suggest that?
Better is to use the DOS command FOR...
c:\>for %i in (test*.sql) do sqlplus scott/tiger@testdb @%i
c:\>sqlplus scott/tiger@testdb @test1.sql
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:38:06 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
1
1
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\>sqlplus scott/tiger@testdb @test2.sql
SQL*Plus: Release 10.2.0.3.0 - Production on Thu Aug 6 12:38:06 2009
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
2
2
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
c:\>... although even better would be to proceduralise the SQL into packages/procedures on the database and have just a single procedure call do all the work. -
What is dbowner.sql file?
what is dbowner.sql file?
I saw your another question too...What is your db? There is some slight difference between oracle and sql server installations. based on that your database rights have to be granted. dbowner creates the db only.
-
Need help, executing a SQL file from Forms
Hi everyone,
I don't know if this can be done. I want to execute a SQL file from a When-Button-Pressed trigger. I checked a couple of place but havent found anything yet on how to do this. If someone know of a way, please help.
Thanks
Ericprocedure p_call_sqlplus is
l_filename varchar2 (1000) := 'C:\abc\def\test.sql' ;
begin
host ('sqlplus /NOLOG @' || l_filename ) ;
end ;
rem ======== test.sql ========
connect scott/tiger
spool 'C:\abc\def\test'
select * from emp ;
spool off
exit
rem ======================working on the machine where forms is running -
hi all
i want to execute a sql file from Pl/sql block.
plz help me...
thanx
AshishThis is one way
-- Program Name: EXTcmd.sql
-- This sql will create a java class.
-- Parameters: &1 = OS command string
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "EXTcmd" AS
import java.lang.Runtime;
public class EXTcmd
public static void execute (String command)
try
Runtime rt = java.lang.Runtime.getRuntime();
rt.exec(command);
catch(Exception e)
System.out.println(e.getMessage());
return;
-- Program Name: EXT_execute_cmd.sql
-- This sql will create a stored procedure to using java class to execute the command.
-- Parameters: &1 = OS command string
create or replace procedure EXT_execute_cmd (cmd IN VARCHAR2) as
language java name 'EXTcmd.execute( java.lang.String)';
-- Program Name: EXT_job_execute.sql
-- Called by: Oracle job
-- Call : EXT_execute_cmd
create or replace procedure EXT_job_execute
(P_EXEC_CMD IN VARCHAR2) is
cmd_string varchar2(200);
begin
cmd_string := 'PUT YOUR SCRIPT HERE';
EXT_execute_cmd(cmd_string);
end EXT_job_execute;
null -
Several errors after running catalog.sql
I did a fresh installation of oracle apps EBS 11.5.10.2 on Linux OEL and was trying to do an import/export and it was not working as expected. So after i looked at Oracle's documentation it said catalog.sql has to be run before using the import/export. So i ran catalog.sql first but i did not run it with SYSDBA but ran it as SYSTEM and i saw several errors like access denied etcv. after i ran the catalog.sql i was not able to login via apps or any other user except SYSTEM and was giving me erros like ORA-04065:not executed,altered or dropped stored procedure "SYS.DBMS_SESSION"
After this to fix the issue i ran @?/rdbms/admin/catpatch.sql and @?/rdbms/admin/utlrp as SYSDBA but both executed a lot of grants etc but are haging at some point and not finishing.
The current state of the database is that im not able to login via any user except SYSTEM and i think i corrupted the db dictionary as everywhere i see they say running catalog.sql on an existing database is a bad idea. Can anyone help?Hi Dheeraj,
My db version is 9.2.0.5.0 and OS is OEL 5.7.
The doc where it was mentioned to run catalog.sql before using import/export is below:
http://docs.oracle.com/cd/B10501_01/server.920/a96652/ch01.htm
Please do not follow the steps in this link and instead follow the steps in (9i Export/Import Process for Oracle Applications Release 11i [ID 230627.1]).
Currently when im trying to login using apps or any other user below are errors i get.
ERROR:
ORA-00604: error occurred at recursive SQL level1
ORA-04068: existing state of packages has been discarded
ORA-04065: not executed, altered or dropped stored procedure "SYS.DBMS_SESSION"
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512:at "SYS.OWA_VPD_CTX", line 5
ORA-06512:at "SYS.PORTAL_LOGIN", line 3
ORA-06512:at line 2
Can you pls help me to fix this.The status of the package is invalid and you need to validate it. Connect as sysdba and issue:
SQL> select owner, object_type, status
from dba_objects
where object_name = 'DBMS_SESSION';
SQL> alter package DBMS_SESSION compile body;
SQL> show error
SQL> alter package DBMS_SESSION compile;
SQL> show errorPlease also see:
Data Dictionary Objects Invalid after Running catalog.sql, catproc.sql, utlrp.sql or catpatch.sql [ID 752783.1]
Debug and Validate Invalid Objects [ID 300056.1]
How to Diagnose Invalid or Missing Data Dictionary (SYS) Objects [ID 554520.1]
Thanks,
Hussein -
System Copy Error @ CreateDB using control.sql file
Hi Experts,
I am doing A Homogeneous System Copy. I have installed DB and patched 10.2.0.2 as source is of the same level.
After DB Installation, restored DB , run the control.sql file and opened it. Recovered DB using this way: "Recover Database using backup controlfile until cancel;" and opened reset logs
Once DB is open, i continued other steps from the point Backup/Restore DB in sapinst. It said CONTROL.SQL file is missing, so i have placed the same in installation directory. In this step "CREATE DATABASE with control.sql file" it has been throwing me error: Ora-00265 instance recovery required, cannot set ARCHIVE log mode DB altered. DB Closed. DB Dismounted and DB Closed.
Could you please explain why it is asking for Archive logs and shutting down the DB.
Thanks,
SubbuHi,
well the copy guide says you have to do an OFFLINE backup.
So sapinst expects a restored database (from offline backup) with non existing controlfiles
and the need to do a CREATE CONTROLFILE ...
You already did that manually. You already opened the db...
So there is no way to run a CREATE CONTROLFILE with "SET database" (not sure
about the RESETLOGS in this case for a second time...).
I do not know what state your DB is in right now. If it is completely operational
and fully recovered and can be opened and shutdown normal, try to substitute
your control.sql with simply (copy the original content somewhere else)
alter database mount;
alter database open;
Repeat the sapinst step.
Depending on how far it put in the progress bars in the xml file, you might need
only one of those two statements in control.sql.
If the restored DB is not operational now, then the controlfiles might be garbled due to the
second try top create them from sapinst. Not sure what the situation is then.
Volker -
Error After Execute Info Package
Experts,
I got the below errors after i executed the info package.
I tried RSA3 on the Data Source in ECC, it got extracted successfully.
Do you have any idea why this happens?
Thanks.
Tee
Error message from the source system
Diagnosis
An error occurred in the source system.
System Response
Caller 09 contains an error message.
Further analysis:
The error occurred in Service API .
Refer to the error message.
Procedure
How you remove the error depends on the error message.
Note
If the source system is a Client Workstation, then it is possible that the file that you wanted to load was being edited at the time of the data request. Make sure that the file is in the specified directory, that it is not being processed at the moment, and restart the request.hi,
your message has got answers for your question.
1.what source sytem you are getting data from?
if it is flat file --->please make sure you have specified file in specified format at specified location and make sure the file is not open at the time of loading.
2.If it is another source system make sure...the interface is proper to extract data from.
if everything looks fine..just logoff from the system once and login again and try to repeat the load which will be successful in majority of the cases.
Regards
Ramsunder.
Maybe you are looking for
-
Initial View issues with PDF portfolio
I am creating a pdf portfolio in Acrobat 10.1.1. The layout is Freeform, when I save it and email it to clients, it never opens to the same size, depending on their screen size or window size, it either stretches or squeezes the file folders and the
-
Unable to see system process request page, process monitor page
Hi all, We refreshed our test instance with prod recently. sysaudit and ddd audits were clean except for the following entries in sysaudit which i thought wasnt of much significance here. SEC-30) Role User table (ROLEXLATOPR) should be populated when
-
Ever since I upgraded to XP Pro my I get extra noise when playing from any sound source, .WAV, MIDI file, mp3 or even a CD when is playing in the background. Noise usually happens on say moving a window or scolling i.e. just about all the time, proce
-
How can i add page number?
how can i add page number in pages...???
-
Server 2012 New Network Assistance
Hi, I hope someone can point me in the right direction. It has been a number of years since I had anything to do with networking and I am obviously way out of practice, also I have never used Server 2012 so I am getting confused. I have been asked if