Database creation scripts from a running RAC
Hi all
We have a two node Oracle 10g R2 RAC running on SLES 10 SP2 Itanium systems.
We have 4 database instances running on the two nodes.
I need to create database creation scripts for one of the databases. eg. the script should contain all current configuration of the database (i.e i dont want the script which would have been created at the time of creation of the database)
Is this possible to achieve?
thanks
Hi,
You can follow this steps to create yours scripts using notes below:
Create Database Manually
*How to create a RAC database using DBCA generated scripts from templates [ID 856783.1]*
Create Database Service Manually
*How To Configure Server Side Transparent Application Failover [ID 460982.1]*
*10g & 11g :Configuration of TAF(Transparent Application Failover) and Load Balancing [ID 453293.1]*
Regards,
Levi Pereira
Edited by: Levi Pereira on Mar 18, 2011 11:36 AM
Similar Messages
-
VISION demo database creation scripts
Does anyone have a copy of the VISION demo database creation scripts that they could give me. Have to try and add this into an already installed EBS system.
rgds
AlanThe VISION demo database is a fully populated EBS installation delivered by rapid install. You would just use rapidwiz and select the Vision Demo, and not fresh production. You need the VISION data in order to be able to run through the various process flows. You do not want to import Vision data into a non-VISION EBS.
-
Can we get database creation script using any packages?
Hi Friends,
we will get table creation script using dbms_metadata.get_ddl package. just like that is there any way to get database creation script? i know that we can add some lines to controlfile trace to convert it into database creation script. but i would like to know whether it is possible through packages?
thanks in advance.I think there's no package to use it for getting database creation script. But anyway, you can search it in [Oracle Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/toc.htm]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
Portal database creation script
I am going to install a database for Portal very soon but ant to know if you get a creation script with it or do you have to write your own? If its the latter can anyone out there point me to a suitable script.
Thanks in advanceThe 9i AS installation guide talks about some database requirements (supported database versions, tablespace sizes, init.ora settings, etc.) that you should review prior to beginning your install. After meeting those requirements, you can install the portal into the starter database that is created during the database install.
null -
Failing to start a powershell scripts from Start/Run
So my real goal is to get a script that we've written to run in a scheduled task. Based on one of the early Scripting Guys blogs, I am working with Start/Run to get the syntax down.
Here's what I am trying to do is run the command, capturing any output it produces into a log file for later examination.
So I write
powershell –noexit –command &{ "H:\Temp\user information\Data\Data\User Update.ps1" >> H:\temp\Data\Data\Runlog.txt}
When I try to run this in Start/Run, I get this:
H:\Temp\user : The term 'H:\Temp\user' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:4
+ &{ H:\Temp\user information\Data\Data\User Update.ps1
>>H:\tem ...
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (H:\Temp\user:String) [], Comman
dNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
I tried to quote it as described in another of the scripting guys blog - dragging the file from windows explorer into the start/run command line.
What else am I missing here?Hi,
Use -File instead of -Command in the arguments section.
Don't retire TechNet! -
(Don't give up yet - 13,225+ strong and growing) -
How to general a db creation script from exiting db?
alter database backup controlfile to trace;
the info from the controlfile seems not enough,
any other way to generate scripts like:
create database
create rollback segment
alter rollback segment r0 online;
create tablespace temp datafile
create tablespace tools datafile
create tablespace users datafileYou can use the stored procedure as part of your query.
In fact when you build the report the store procedure
should show up in your query builder alongwith tables and views.
Thanks,
Prasad.
Hi,
I need help to call a db stored procedure below from report
builder, when it is called, I need to pass in proper parameters
like deptno in the sp.
1.Where to call and What the correct command? looks like I have
to have select statement to buile a report, how to use select
statement to call sp or any other way to call?
2. how to pass parameters in the sp, for a simple query I can
use bind variable, is it possible to use bind variable to call
sp and what the syntex?
3. if possible can you show me a example?
create or replace package testpkg AS //working
TYPE sumCur IS REF CURSOR;
procedure test(
dno IN NUMBER,
sum_cv IN OUT NOCOPY sumCur);
END;
CREATE OR REPLACE PACKAGE BODY testpkg AS
procedure test(
dno IN NUMBER,
sum_cv IN OUT NOCOPY sumCur) AS
sql_statement VARCHAR2(100);
BEGIN
sql_statement :='SELECT dname, from dept where
deptno = :d ';
OPEN sum_cv FOR sql_statement using dno;
END test;
END;
Thanks very much -
Database Creation Script Error
When i tried to create a database using the script i am getting the below error
Instance created.
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jun 5 15:58:16 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount pfile="E:\mydatabase\scripts\init.ora";
ORA-09314: sltln: error translating logical name
OSD-04503: text contains no translatable elements
Thanks!{code}
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Cache and I/O
db_block_size=8192
# Cursors and Library Cache
open_cursors=300
# Database Identification
db_domain=""
db_name=MYDATABASE
# File Configuration
control_files=("E:\oradata\MYDATABASE\control01.ctl", "E:\flash_recovery_area\MYDATABASE\control02.ctl")
db_recovery_file_dest=E:\flash_recovery_area
db_recovery_file_dest_size=5218762752
# Miscellaneous
compatible=11.2.0.0.0
diagnostic_dest=E:
memory_target=1287651328
# Processes and Sessions
processes=150
# Security and Auditing
audit_file_dest=E:\admin\MYDATABASE\adump
audit_trail=db
remote_login_passwordfile=EXCLUSIVE
# Shared Server
dispatchers="(PROTOCOL=TCP) (SERVICE=MYDATABASEXDB)"
# System Managed Undo and Rollback Segments
undo_tablespace=UNDOTBS1
{code} -
Confusion over DBCA script generated for manual RAC DB creation
Version:11.2.0.4/RHEL 6.3
We would like to create our 3-node RAC DB manually. DBCA cannot meet our requirement because our redo log files, datafiles, tempfiles and control files are placed in a complicated manner . If we use DBCA , we will have to spend a lot of time configuring to our requirements after the DB creation.
I generated the DB creation scripts from DBCA (DB Name = BRCFPRD )
DBCA placed the db creation scripts in the specified directory in all the 3 nodes !!
They all have almost the same contents . The only difference being the instance name (BRCFPRD12.sql for Node2, ... etc).
Scripts in each node have the createDB.sql statement which has CREATE DATABASE "BRCFPRD" statement. Why is this ? The database need to be created only from one node. Then why did DBCA place createDB.sql in all nodes ?
I just want to run the script from just one node , say Node1 and it should create the 3-Node RAC DB. How can I do this manually?
-- The scripts genereated by DBCA in Node1
apex.sql
BRCFPRD1.sh
BRCFPRD1.sql
context.sql
CreateClustDBViews.sql
CreateDB.sql
CreateDBCatalog.sql
CreateDBFiles.sql
cwmlite.sql
emRepository.sql
init.ora
interMedia.sql
JServer.sql
lockAccount.sql
ordinst.sql
owb.sql
postDBCreation.sql
spatial.sql
xdb_protocol.sql
-- The contents of the main shell script BRCFPRD1.sh
$ cat BRCFPRD1.sh
#!/bin/sh
OLD_UMASK=`umask`
umask 0027
mkdir -p /optware/product/admin/BRCFPRD/adump
mkdir -p /optware/product/admin/BRCFPRD/dpdump
mkdir -p /optware/product/admin/BRCFPRD/hdump
mkdir -p /optware/product/admin/BRCFPRD/pfile
mkdir -p /optware/product/cfgtoollogs/dbca/BRCFPRD
umask ${OLD_UMASK}
ORACLE_SID=BRCFPRD1; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
echo You should Add this entry in the /etc/oratab: BRCFPRD:/optware/product/oracle/11.2.0:Y
/optware/product/oracle/11.2.0/bin/sqlplus /nolog @/optware/product/BRCFPRD1.sql
-- Contents of BRCFSPRD1.sql
$ cat BRCFPRD1.sql
set verify off
ACCEPT sysPassword CHAR PROMPT 'Enter new password for SYS: ' HIDE
ACCEPT systemPassword CHAR PROMPT 'Enter new password for SYSTEM: ' HIDE
ACCEPT sysmanPassword CHAR PROMPT 'Enter new password for SYSMAN: ' HIDE
ACCEPT dbsnmpPassword CHAR PROMPT 'Enter new password for DBSNMP: ' HIDE
host /optware/product/oracle/11.2.0/bin/orapwd file=/optware/product/oracle/11.2.0/dbs/orapwBRCFPRD1 force=y
host /grid/product/11.2.0/bin/setasmgidwrap o=/optware/product/oracle/11.2.0/bin/oracle
host /optware/product/oracle/11.2.0/bin/srvctl add database -d BRCFPRD -o /optware/product/oracle/11.2.0 -p +DATA/BRCFPRD/spfileBRCFPRD.ora -n BRCFPRD -a "DATA,ARCH_DG"
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD1 -n cimprd175
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD3 -n cimprd177
host /optware/product/oracle/11.2.0/bin/srvctl add instance -d BRCFPRD -i BRCFPRD2 -n cimprd176
host /optware/product/oracle/11.2.0/bin/srvctl disable database -d BRCFPRD
@/optware/product/CreateDB.sql
@/optware/product/CreateDBFiles.sql
@/optware/product/CreateDBCatalog.sql
@/optware/product/JServer.sql
@/optware/product/context.sql
@/optware/product/xdb_protocol.sql
@/optware/product/ordinst.sql
@/optware/product/interMedia.sql
@/optware/product/cwmlite.sql
@/optware/product/spatial.sql
@/optware/product/emRepository.sql
@/optware/product/apex.sql
@/optware/product/owb.sql
@/optware/product/CreateClustDBViews.sql
host echo "SPFILE='+DATA/BRCFPRD/spfileBRCFPRD.ora'" > /optware/product/oracle/11.2.0/dbs/initBRCFPRD1.ora
@/optware/product/lockAccount.sql
@/optware/product/postDBCreation.sql
-- Contents of CreateDB.sql in Node1
$ cat /optware/product/CreateDB.sql
SET VERIFY OFF
connect "SYS"/"&&sysPassword" as SYSDBA
set echo on
spool /optware/product/CreateDB.log append
startup nomount pfile="/optware/product/init.ora";
CREATE DATABASE "BRCFPRD"
MAXINSTANCES 32
MAXLOGHISTORY 1
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 3000
DATAFILE SIZE 700M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE SIZE 600M AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE SIZE 200M AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
CHARACTER SET AL32UTF8
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 SIZE 28672M,
GROUP 2 SIZE 28672M
USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword";
set linesize 2048;
column ctl_files NEW_VALUE ctl_files;
select concat('control_files=''', concat(replace(value, ', ', ''','''), '''')) ctl_files from v$parameter where name ='control_files';
host echo &ctl_files >>/optware/product/init.ora;
spool offIf you look at scripts generated in Node2 and Node3 , you can see all scripts except the instance specific ones are commented using REM .
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl add instance -d STOMPER -i STOMPER1 -n ugxtlprd186
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl add instance -d STOMPER -i STOMPER2 -n ugxtlprd187
REM host /u01/product/oracle/11.2.0.3/dbhome_1/bin/srvctl disable database -d STOMPER
REM @/u01/product/CreateDB.sql
REM @/u01/product/CreateDBFiles.sql
REM @/u01/product/CreateDBCatalog.sql
REM @/u01/product/JServer.sql
REM @/u01/product/context.sql
<snipped > -
Problems from oracle designer to database creation
i am getting the following problem when creating a database using oracle designer:
"has no role cannot regenerate"
this is specific to the primary keys of each table
has anyone come across this before? any ideas guys?
AndyI think this belongs in another forum, but could you answer this question: Are you trying to generate database creation scripts by select Create Oracle Database in the DB Admin tab of the Design Editor?
Kind regards,
Russ Cannon -
Does Forefront Endpoint Protection 2010 block powershell scripts from running?
Hi all,
I have a task that runs a Powershell script on a set schedule on a particular machine. It has failed to run and I thought 1 of the potential reasons would be that FEP 2010 blocks the Powershell script from being run. Does FEP 2010 do that? If so, where can I find the setting to allow Powershell scripts (or VB scripts or Java scripts) to be run by my task?
Thanks for your help in advance.
Howard Lee - MicrosoftIf the script detect as malicious , FEP will block it, otherwise it won't block normal and safe PowerShell scripts. You may take a look at event viewer and see whether it being blocked or detect as malicious code by FEP or not.
-
Database creation process hangs
I am manually creating a database on Windows 2k3 server using Oracle 11 r2. Using the Database Configuration Assistant to create a database, the process hangs for hours.
I figured out and triedthe following:
1. I have attempted using the GUI tool more than once to create the database and each time it hangs.
2. Using the scripts have been created using the with configuration tool, I manually attemped to create database. -- I have attempted more than once.
3. The database creation process hangs while running the EXECRM.SQL file that is called by the CATPCNFG.SQL which is called by CATPROC.SQL which is called by CreateDBCatalog.sql
3. The EXECRM.SQL file hangs on the following statement EXECUTE DMBS_RMIN.INSTALL;
I'm not sure why the PL/SQL packag is hanging at this point. Any help is appreciated.
Thanks,
SheilaI was able to create the databases prior to installing Enterprise Manager Grid control. I deleted the databases to re-create so they would be registered with Enterprise manager. Once I install Enterprise manager the creation process hung. I have also installed Essbase and Oracle/Hyperion Enterprise Performance Management Suite on the server. I'm trying to do some research on these BI tools.
I'm tempted to uninstall Essbase and the Hyperion producst along with Enteprise Manager and start from scratch to test to see if I can create a database without these other products. -
Manual Database Creation on win 2000
Oracle 9i(release 1) database server is installed on win2000 server.
i want complete detail steps to create database manually ON WIN 2000 SERVER.
i tried to create database manually but when i runs the
database creation script it generates an error 'INSTANCE TERMINATED : DISCONNECTION FORCED'
I AM STUDENT OF FUNDAMENTAL 1 COURSE.
rohitIt is good to know the steps to create a database manually. If you run the dbca and choose only to create the scripts you realize the steps. Apart from that if you are studying for Fundamentals I exam and you want to it because you think that content is going to appear. Forget it. In that exam there are not questions related to steps to create a database manually and less in windows.
To learn to create a database in Unix makes sense really!
Joel Pérez -
Hi all,
I need to create a small database manually.
What are the mandatory fields for DB creation.
What are the steps to be followed?
If anyone have the script please send me.
Thanks in advance.
regards,
premhi prem..
you have to create script for database creation..
no problem if ur on 9i.
let do below step..
step 1. open ur dbca and create script for ur database.
step 2. create folder
bdump, udump, cdump ---- d:\oracle\ora90\admin\3 folder 1.bdump, 2. udump, 3.cdump
folder name some ur db_name -----d:\oracle\oradata\"folder name must be some ur db_name"
step 3. go cmd prompt
start>run>command [enter]
cmd>set oracle_sid=dbname
cmd> create password file..... ( see mentioned link in previous post)
cmd>create and start services ( see mentioned link in prev. post)
cmd>sqlplus/nolog
sql>conn sys as sysdba
connected
sql> run all database creation scripts.
script generate in
d:\oracle\admin\script\>>>>>>.scritps
Note.>> Drive may be C:,D: whatever according ur setting.
hope this helps
Taj.
Message was edited by:
user52 -
SHMAT( ) call failed during database creation
I am new to Linux, but have installed and administered Oracle on other Unix platforms. After I have completed the installation, and I am about to run the first database creation script, oracle connects internal and then tries to attach itself to the shared memory segments, and then chokes and I get this error:
ORA 27123 unable to attach to shared memory segment
followed by
LINUX ERROR 22 Invalid Argument
oerr yields:
CAUSE: shmat() call failed
ACTION: check permission on segment, contact Oracle support.
I ran ipcs on Linux, and there were no shared memory segments to report on. Is there some other way to see the permissions on shared memory in Linux. Like I said, I am very new to this OS, so any help is appreciated. If you have overcome this problem could you contact me via email at [email protected] I've never had a harder time installing Oracle than on Linux. I though this Linux thing was supposed to be the next big thing. It is about as friendly as a porcupine with hemmorhoids!!
Thanks
JMCI dont know what you can do instead of trying to install it again.
I have installed Oracle Database 10g Express Edition on my XP laptop but seems not to be able to manage the Database in any way...
It would be nice with a simple manual for configuring the installation.
Also in need of some help... -
Hi,
I have a database we've been using on Oracle 806. I am using dbca to create it in Oracle v9.2
In our database creation scripts, we run the following oracle admin sql scripts. We may run more, but these are what I've found so far:
catalog.sql
catproc.sql
dbmspool.sql
prvtpool.plb
utlexcpt.sql
Is there a need for me to run these scripts when creating a database using dbca in v9.2, or does dbca run them?
Thanks much
-BobThanks you guys.
I checked the creation scripts, and it ran these:
connect SYS/change_on_install as SYSDBA
set echo on
spool /occ/cots/oracle9i/assistants/dbca/logs/CreateDBCatalog.log
@/occ/cots/oracle9i/rdbms/admin/catalog.sql;
@/occ/cots/oracle9i/rdbms/admin/catexp7.sql;
@/occ/cots/oracle9i/rdbms/admin/catblock.sql;
@/occ/cots/oracle9i/rdbms/admin/catproc.sql;
@/occ/cots/oracle9i/rdbms/admin/catoctk.sql;
@/occ/cots/oracle9i/rdbms/admin/catobtk.sql;
@/occ/cots/oracle9i/rdbms/admin/caths.sql;
@/occ/cots/oracle9i/rdbms/admin/owminst.plb;
connect SYSTEM/manager
@/occ/cots/oracle9i/sqlplus/admin/pupbld.sql;
connect SYSTEM/manager
set echo on
spool /occ/cots/oracle9i/assistants/dbca/logs/sqlPlusHelp.log
@/occ/cots/oracle9i/sqlplus/admin/help/hlpbld.sql helpus.sql;
spool off
spool off
exit;
So, I only need prvtpool.plb, dbmspool.sql, and utlexcpt.sql for my needs.
I need the exceptions table for sure.
And dmbspool.sql for memory efficiency and keeping an eye on object sizes - dbmspool.sql also calls prvtpool.plb, so it's two birds with one stone. So I'm set.
Thanks again all
-Bob
Maybe you are looking for
-
Why can't I connect to the iTunes Store on my new iPad??
Why can't I connect to the iTunes Store on my new iPad??
-
How using ABAP function in fox formula ?
Hello, I want to launch standard function :"RSW_CURRENCY_TRANSLATION" by Fox formula. I declare this function in SAP Table :rsplf_fdir, and I can call this function by fox, with all parameters. But when I want to use it, I've a problem with the first
-
How do I get additional parameters into a Linux Script / PowerShell Discovery?
Hi all, I'm trying to do a Linux Shell / PowerShell discovery as described in http://operatingquadrant.com/2013/07/30/unixlinux-mp-authoring-discovering-and-monitoring-failover-clusters/ but for the complex logic I need the GUID of the target object
-
Hello, I want to know if it is possible to determine dynamically the user for a task? An example is an approval process (Depending on the user information determine how is the approver and send the task for that user). Thanks & Regards SU
-
Hi experts, I'm having a problem when our project approaching the end. If I assigned the business role in parameter CRM_UI_PROFILE and PFCG role in SU01. It works fine,and the user can logon the web ui. Now I created a new organization model and posi