How to use a script to startup DataBase ?
My os is RedHat 8.0 , has anyboby ever create a script to
run db startup or shutdown ?
peng , thx..
Hi,
You have to use it something like this:
#!/bin/sh
# Set ORA_HOME to be equivalent to the ORACLE_HOME
# from which you wish to execute dbstart and
# dbshut
# set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME
ORA_HOME=/home/oracle/app/oracle/product/8.1.6
ORA_OWNER=oracle
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values
echo -n "Starting Oracle8i Release 2: "
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
touch /var/lock/subsys/oracle8i
echo
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login will not prompt the
# user for any values
echo -n "Shutting down Oracle8i Release 2: "
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
rm -f /var/lock/subsys/oracle8i
echo
'restart')
# Restart the Oracle databases:
echo -n "Retarting Oracle8i Release 2: "
$0 stop
$0 start
echo
echo "Usage: oracle8i { start | stop | restart }"
Long postings are being truncated to ~1 kB at this time.
Similar Messages
-
How to use java script when popups are blocked in browser
How to use java script when popups are blocked in browser
Not. When people install a popup blocker they don't WANT popups, so stop trying to force them down their throats.
-
How to use taglibs in JSP for Database access
Hi
Could any one please tell me how to use taglibs in JSP for Database access
with regrds
JojoThis is a sample how to connect to a MySQL database with JSTL 1.0:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>JSTL MySQL</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
<c:catch var="e">
<sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
user="Your_Username_Here" password="Your_Password_Here"
driver="com.mysql.jdbc.Driver"/>
<c:out value="datasource= ${datasource}, Class = ${driver.class}"/>
<br />
<br />
<sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
<table>
<%-- Get the column names for the header of the table --%>
<c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
<tbody>
<%-- Get the value of each column while iterating over rows --%>
<c:forEach var="row" items="${deejays.rows}">
<tr><c:forEach var="column" items="${row}">
<td><c:out value="${column.value}"/></td>
</c:forEach>
</tr>
</c:forEach>
</tbody>
</table>
</c:catch>
<br />
<br />
<c:if test="${e!=null}"><span class="error">Error</span>�
<c:out value="${e}" />
</c:if>
</body>
</html>And this thread might help you:
http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44 -
How to use Native XA in XE database?
Hi,
I am having problem in using XA datasource in XE. I understand if we are using XE database, jvm is not available. Thus, we have to use Native XA which requires using JDBC Thin Driver.
My JBoss hit below error during initialization.....
=====================================
2006-03-28 16:14:27,645 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:18s:482ms
2006-03-28 16:16:05,887 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=snz-dcs-001//51, BranchQual=] errorCode=XAER_RMERR
oracle.jdbc.xa.OracleXAException
at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:636)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
at
Can anyone help to enlighten?
Or maybe provides me with basic configuration of using XA datasource in XE database so I can check whether my config is correct or not?
Any help will be appreciated!
Thanks before.
JoelHi,
Here's an update regarding my problem with XA transaction using XE.
I don't know exactly how, but it works now.
Here are the steps I did :
===================
1. I decided to try creating JAVA_XA package in XE database. I took the script
from oracle enterprise edition.
This package can't be compiled in XE Production version, but it can be compiled
in XE beta version.
2. After using compiling, the JBoss initialization was still failing.
3. Backup the database (with JAVA_XA) , and upgraded the beta-version to
Production version.
4. Restore the database (with JAVA_XA) into the Production version.
5. it works :))
Hopefully I can get some inputs/comments from the experts here in the forum.
Thanks for those who has responded to my previous posts.
Regards,
Yoel
Good job! A nice extra mile. -
How to find Oracle script in the database
Hi,
I've an Oracle instance with Fine Grained Auditing (FGA).
In this DB was created a series of policies and now I want to find the scripts created for insert it in another database.
for example:
dbms_fga.add_policy (
.....................How can I find this SQL script from this database?
I have also export dmp file
Must I use TOAD for export the objects?
Thanks in advance!you'll need to use datapump export/import for this, see the example below:
Create fga policy TEST_POLICY on table scott.emp
SQL> exec dbms_fga.add_policy(object_schema => 'SCOTT',object_name => 'EMP',policy_name => 'TEST_POLICY');
Show fga policy in the db
SQL> select * from DBA_AUDIT_POLICIES where policy_name = 'TEST_POLICY';
OBJECT_SCHEMA OBJECT_NAME POLICY_OWNER
POLICY_NAME POLICY_TEXT POLICY_COLUMN PF_SCHEMA
PF_PACKAGE PF_FUNCTION ENA SEL INS UPD DEL AUDIT_TRAIL POLICY_COLU
SCOTT EMP OPS$ORACLE
TEST_POLICY
YES YES NO NO NO DB+EXTENDED ANY_COLUMNS
Now export the metadata for the objects
[oracle@mr-blonde 11.2.0]$ expdp / dumpfile=testpolicy.dmp directory=DATA_PUMP_DIR content=METADATA_ONLY SCHEMAS='OPS$ORACLE,SCOTT'
Export: Release 11.2.0.1.0 - Production on Mon Mar 29 11:22:25 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "OPS$ORACLE"."SYS_EXPORT_SCHEMA_01": /******** dumpfile=testpolicy.dmp directory=DATA_PUMP_DIR content=METADATA_ONLY SCHEMAS=OPS$ORACLE,SCOTT
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/FGA_POLICY
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Master table "OPS$ORACLE"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded
Dump file set for OPS$ORACLE.SYS_EXPORT_SCHEMA_01 is:
/app/oracle/admin/CS11G/dpdump/testpolicy.dmp
Job "OPS$ORACLE"."SYS_EXPORT_SCHEMA_01" successfully completed at 11:23:46
Now to drop the policy
SQL> exec dbms_fga.drop_policy (object_schema => 'SCOTT',object_name => 'EMP',policy_name => 'TEST_POLICY');
PL/SQL procedure successfully completed.
Now checking that the policy is really gone
SQL> select * from DBA_AUDIT_POLICIES where policy_name = 'TEST_POLICY';
no rows selected
Now to import the policy back into the db from the data pump export taken earlier
[oracle@mr-blonde 11.2.0]$ impdp / dumpfile=testpolicy.dmp directory=DATA_PUMP_DIR include=FGA_POLICY
Import: Release 11.2.0.1.0 - Production on Mon Mar 29 11:27:16 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
Master table "OPS$ORACLE"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
Starting "OPS$ORACLE"."SYS_IMPORT_FULL_01": /******** dumpfile=testpolicy.dmp directory=DATA_PUMP_DIR include=FGA_POLICY
Processing object type SCHEMA_EXPORT/TABLE/FGA_POLICY
Job "OPS$ORACLE"."SYS_IMPORT_FULL_01" successfully completed at 11:27:21
Checking that the fga policy has been imported successfully
OBJECT_SCHEMA OBJECT_NAME POLICY_OWNER POLICY_NAME POLICY_TEXT
POLICY_COLUMN PF_SCHEMA PF_PACKAGE PF_FUNCTION ENA SEL INS UPD DEL
AUDIT_TRAIL POLICY_COLU
SCOTT EMP OPS$ORACLE TEST_POLICY
YES YES NO NO NO
DB+EXTENDED ANY_COLUMNS -
How to use import script with FDM using adapter ERPI?
Hi,
I use FDM and ERPI 11.1.2 to load data from EBS R12 to Planning 11.1.2
Data loaded from eBS are YTD data.
I have seen that I could use an import script to calculate manually the amount with the periodic_net_cr and periodic_net_dr fields.
But how to use this import script? Because in my import format in FDM, I don't use a file but directly the adapter, so no "Expression" field.
Thanks in advance for your help
FannyHello Fanny,
No you will not need to put anything in the BatchAction. If you review the FDM API Documentation posted it will outline all the scripts that will execute for a particular event ... and the order in which they execute. The BatchAciton only affects the execution of the batch ... it does not control processing of data. Processing of data is controlled by many others.
There is a script that can be written and placed (as Tony mentioned) in the ImportAction that will be able to recaculate the values from ERPi to be YTD values. You can possibly open an SR and a support Engineer can help you .... or you can search the current KM base and use that information there from the v11.1.1.3.00 version to build your own for v11.1.2.x
Thank you, -
How to Use Sequence created in Oracle Database in SQL Ldr Control file
Hi,
I created a sequence in oracle database. How will use the sequence in SQL loader Control file.
Thanks in advanceHi,
You might get a good response to your post in the forum dedicated to data movement , including SQL*Loader . You can find it here Export/Import/SQL Loader & External Tables
Regards, -
How to use stored script from with Grid Control 10gR2
HI
My backup method uses a stored script in the recovery catalog that is separated from Grid Control's repository database.
In Scheduled Backup, there is no way to connect to recovery catalog; let alone use stored script. Is that true?
Thanks,
Kevinit works, here is a test case , I use this functionality a lot
$connected from HOST
rman target / catalog <mycatalog>
connected to target database: TOPAZ (DBID=3348250252)
connected to recovery catalog database
RMAN> create script testbackup
2> {backup current controlfile;
3> }
created script testbackup
RMAN> run {execute script testbackup;}
executing script: testbackup
Starting backup at 12-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=217 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=251 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=200 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=337 devtype=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: sid=182 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 12-JUN-07
channel ORA_DISK_1: finished piece 1 at 12-JUN-07
piece handle=/rman_backup/d_TOPAZ_s_12344_p_1_t_625077001 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 12-JUN-07
Starting Control File and SPFILE Autobackup at 12-JUN-07
piece handle=/rman_backup/c-3348250252-20070612-06 comment=NONE
Finished Control File and SPFILE Autobackup at 12-JUN-07
NOW in grid control I have configured my Recovery catalog settings, check for OS username , that should be owner of oracle home for recover catalog
I schedule a RMAN backup job with these parameters in script
{execute script testbackup;}
Status Running
Step ID 203585
Targets topaz.ucas.ac.uk
Started 12-Jun-2007 16:34:56 (UTC+01:00)
Step Elapsed Time 1 minutes, 37 seconds
Management Service stardb1:4889_Management_Service
TIP Management Service from which the job step was dispatched.
Output Log
Recovery Manager: Release 9.2.0.6.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN>
connected to target database: TOPAZ (DBID=3348250252)
RMAN>
connected to recovery catalog database
RMAN>
echo set on
RMAN> {execute script testbackup;}
2> exit;
executing script: testbackup
Starting backup at 12-JUN-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=164 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=134 devtype=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: sid=22 devtype=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: sid=198 devtype=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: sid=145 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 12-JUN-07
channel ORA_DISK_1: finished piece 1 at 12-JUN-07
piece handle=/rman_backup/d_TOPAZ_s_12346_p_1_t_625077300 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 12-JUN-07
Starting Control File and SPFILE Autobackup at 12-JUN-07
piece handle=/rman_backup/c-3348250252-20070612-07 comment=NONE
Finished Control File and SPFILE Autobackup at 12-JUN-07
null -
How to use Java Script in jspx pages of ADF Faces?
I wanna invoke an Applet in a jspx using Java Script...
How can I do this? :)check my other post..that's to know how to use js in jsf pages...not to invoke applet..
Re: how to Add inline JavaScript to a Page 11G -
How to use --version-script option of gnu ld on SunOS
I use --version-script=gnu-ld-script to build my c++ source on linux successfully.
The file gnu-ld-script has only one line like this: EXPORTED { global: mozembed_main; local: *; };
how can i build the source on SunOS/Solaris, given that there is on --version-script option for ld on SunOS.
help me. thanks.i mean there is no option of --version-script for ld command on SunOS.
then how can i do, if i want this feature. -
How to use Java Script in Oracle Forms 10g
Hello,
Appreciate if anyone could help me using Java Script in Oracle Forms 10g?
Thanks
GMThank you for your reply. I was reading on the metalink that we could use the to call the java script from oracle Forms 10g (Doc ID 265863.1)
Example:
WEB.SHOW_DOCUMENT ('javascript:void(window.open("http://www.oracle.com","","location=no,toolbar=no,menubar=no,status=no,"));self.close()','_blank');
I tried it but it did not open the any window as it claims. Am I missing anything? Is there any IE related setting which I need to modify for the above to work?
Regards
GM -
How to use java script in sun stdio crator jsf
in sun stdio creator
Checkbox cb;
cb=new checkbox();
ch. markforDeletion.setOnChange("submit()");
it is giving identifier excepted .
how to use setOnChange and other functio
with regards
shannu sarmain sun stdio creator
Checkbox cb;
cb=new checkbox();
ch. markforDeletion.setOnChange("submit()");
it is giving identifier excepted .
how to use setOnChange and other functio
with regards
shannu sarma -
How to use a script to kill only forms sessions idle for over 30 minutes?
We want to use a script to kill forms users idle for over 30 minutes, but we don't want to kill background concurrent processes waiting for resources. even though we set up the timeout but it won't work for users who exit forms ungracefully.
thanks!Java runs at the serverside, while you need a clientside solution. Javascript is perfectly suitable. Pass the current maxInactiveInterval() value to a Javascript variable and write a function around it. You can use for example the onkeypress attribute of the body to clear the timeout counter.
-
How to use the script placemultipagePDF with reduction?
In need to use the script placemultipagePDF, but in need this have a reduction 77%
try below code, i modifide sample cone provide adobe as per ur requirement.
main();
function main(){
//var myCounter = 1;
var myDocument = app.documents.item(0);
var myPage = myDocument.pages;
var myPDFFile = new File("E:\\Work\\Scripting InDesign CS3-4 with JavaScript April 2009.pdf");
if((myPDFFile != null)){
for (var p=0; myPage.length>p; p++){
myPlacePDF(myDocument, myPage[p], myPDFFile);
function myPlacePDF(myDocument, myPage, myPDFFile){
var myPDFPage;
app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
var myCounter = 1;
var myBreak = false;
while(myBreak == false){
if(myCounter > 1){
myPage = myDocument.pages.add(LocationOptions.after, myPage);
app.pdfPlacePreferences.pageNumber = myCounter;
myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
myPDFPage.verticalScale =77;
myPDFPage.horizontalScale = 77;
if(myCounter == 1){
var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
else{
if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
myPage.remove();
myBreak = true;
myCounter = myCounter + 1; -
I must allow users to use Firefox or Internet explorer while I can easliy contorl the homepage using a GPO for IE I cannot do the same for firefox. I found great information on a way that I can create a config file and then promulgate it to the users but trhe script information is incomplete I need to know exactly where to enter the desired name for the default browser
Was it really necessary to post the whole API description?!?
Locale[] locales = Locale.ENGLISH();ENGLISH is not a method in class Locale, so do not add the braces "( );".
Also, the constant ENGLISH is not an array, but just a single Locale object.
You didn't say what your problem was. What do you want to achieve with your program and what is it that you don't understand?
Maybe you are looking for
-
How Best To Install Snow Leopard For A Non-Techy?
What is the best route to go down to install Snow Leopard please? I received my copy on Saturday but I'm apprehensive at installing it! When I installed Leopard I ended up with a lot of problems, some of which are still not resolved, such as the non-
-
New nano and the broken shuffle that won't go away in iTunes
Situation: Had a 512 Shuffle for less than a year before it fizzled out. Bought a new 1G nano just this week. Love it but some problems with iTunes. (Running Windows XP) The ONLY time that iTunes will recognize the new nano and let me update it is if
-
Horizontal menu with horizontal sub menu using image rollovers or similar
Hello, I am brand new to web design and working on my first site. What I lack in skills, I have in free time to learn right now : ) Please let me know if there is a tutorial or other resource that describes what I am trying to do...I've been searchi
-
Use of const keyword in java ?
Hi All,, I want to know the use of const keyword with proper example. Many many thx in advance Cheers Souvik
-
Upgrading FCE 3.0 to 3.5
G'Day, Have recently installed FCE 3.0 onto my imac, and have purchased the upgrade to 3.5. installed the upgrade disc's and when i start up FCE it still say's it is V3.0, have i installed it correctly or is there something im missing...Im just putti