How To Bounce Database Automatically

Aug 11, 2011

I want to write a script and schedule it in crontab, if it is ebs I have scripts addbctl.sh and addlnctl.sh to stop database and listner. But in another application (not ebs) these scripts are not available and I have to manually bounce database, giving commands SHUTDOWN IMMEDIATE and STARTUP after logging in into sqlplus, Is there any way to do this.

I tried a script to test whether it is connecting to database or not, but it is not working. This is the script I have written in invalids.sh

sqlplus apps/pwd
select count(*) from dba_objects where status='INVALID';
exit
echo "test ran at $(date)"

When I run this script in crontab , it is not working

04 12 * * * SCRIPT_PATH/invalids.sh >> SCRIPT_PATH/logs/test.txt

Also I tried whether crontab is working or not with this line

08 12 * * * echo "crontab tested at $(date)" >> SOME_PATH/tested.txt

In tested.txt, it is printing that output properly like this

crontab tested at Thu Aug 11 12:08:01 IST 2011

View 5 Replies


ADVERTISEMENT

Automatic Storage Management :: Database Not Coming Up After Bounce

Jun 4, 2013

We have standalone database running on ASM. Its 11Gr2 linux version5 server. After the Database bounce, the DB isnt coming up and is showing the below error.

SQL> startup nomount
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/test/spfiletest.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/test/spfiletest.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA/test/spfiletest.ora
ORA-15001: diskgroup "DATA" does not exist or is not mounted
ORA-00450: background process 'ASMB' did not start
ORA-00443: background process "ASMB" did not start
ORA-06512: at line 4

Also i checked the ASM disk groups. I can see all those are MOUNTED properly. In fact i could also see the spfile present in ASM disk physically. It looks like it couldn't identify the spfile to start up the db. however i could see it physically present in ASM disk group.
Find below snapshot.

State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576    358400   329103                0          329103              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  4194304    358368   358288                0          358288              0             N  FRA/
MOUNTED  EXTERN  N         512   4096  4194304     20480    18780                0           18780              0             N  REDO/

View 3 Replies View Related

Server Administration :: Database Is Not Getting Started Automatically?

Sep 3, 2010

I have oracle 8i installed on a Windows XP with SP2 PC. Everytime i start the pc the database is not getting started automatically however i need to start it manually using the svrmgrl command. How to autostart the database.

View 1 Replies View Related

SQL & PL/SQL :: Get End Date Automatically?

Mar 24, 2012

I have these table :

create table mvt
(
id number(1) ,
dat date
)
/
insert into mvt values (1, '2.10.1999');
insert into mvt values (1, '1.08.2005');
insert into mvt values (1, '24.09.2008');
commit;

I want to build a query for id = 1 that retrieves this :

START END
-------- --------
02/10/99 31/07/05
01/08/05 23/09/08
24/09/08 {sysdate}

{sysdate} represents the current date.

I've tried with these query :

select
old.dat
, next.dat - 1
from mvt old, mvt next
where 1 = 1
and old.id = 1
and old.id = next.id
and next.dat in (select min(dat) from mvt where id = old.id and dat > old.dat)
/

But it delivers only this :

DAT NEXT.DAT
-------- --------
02/10/99 31/07/05
01/08/05 23/09/08

Is there a way to retrieve all what I want in one query (without unions or functions that gives the last date for id) ?

View 3 Replies View Related

Dbms Job Is Not Executing Automatically

Aug 11, 2011

Database 1(sm01):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.Daily jobs are running fine. But hourly job is not executing automatically. If forced (exec dbms_job.run(<enter here job number>), this execute fine.

job_queue_processes=5
total jobs in schema=2503
total jobs in db = 2614

Even there are many jobs scheduled, next_date for 2234 jobs are lesser than the sysdate. Again in 269(2503-2234) jobs, 2265 are having NULL in the interval column.

Database 2(sm02):
=============
oracle, 9.2.0.6

there are 4 jobs scheduled in oracle dbms_job. 3 jobs will run everyday at 4.00AM. 1 job will run at every hour.All the jobs are not running automatically. If forced (exec dbms_job.run(<enter here job number>), these execute fine.

job_queue_processes=5
total jobs in schema=7
total jobs in db = 7

I planning to follow the below steps to avoid the above issue.

1.) Restart the job queue process by executing alter system set job_queue_processes=0

2.) Increase the value for the job_queue_processes.

3.) Restart the database

But I got stuck in the 2nd step. what value I need to put for this job_queue_processes parameter?

View 2 Replies View Related

Automatically Create Many Tables From 1 Big Table?

Aug 30, 2007

I have a table with over 100000 records.

The format and data is something like this:

Region Code,Name,Surname,ID_Number
1,John,Doe,67
1,Sarah,Jason,45
2,Bob,Marley,69
3,Steven,Johnson,900
2,Harry,Potter,890
3,Sandy,Bay,567
3,Else,Taylor,789 .....

I have about over 100 region codes and each region would like to get their own data. I can manually do the extraction and create a new table for every region, but it's going to take too long.

View 7 Replies View Related

Send CLOB Data Automatically Using CDC?

Jan 5, 2012

I want to know whether is it possible to send CLOB data automatically using CDC...i usually have to run a procedure manually to send such data to remote locations.

View 1 Replies View Related

How To Kill Inactive Connections Automatically

Apr 26, 2011

i was gone through the below link

[URL]

so when i changed my idle_time value in profile and the when the user exceeds the idle_time value the user still i can see in-active state in v$session.

and when i was tried to execute any query on inactive session that time i got an ORA- error and then session was not visible from v$session.

in my environment inactive session was not getting used afterwards so is there any way to kill that sessions automatically once reached idle_timeout value.

lets say i have 50 max sessions, out of which 10 are inactive state and 40 in active state .what if i created one more sessions will that give me ORA- error stating max sessions reached or it will kill the one session which are in-active state.

View 5 Replies View Related

TNSListener Service Stops Automatically?

Apr 7, 2011

In our production server, TNSListener Service stops automatically, atleast (once in a day). No alert in alert log file.

View 1 Replies View Related

Forms :: Commit Record Automatically?

Mar 15, 2010

I have a master detail form based on two tables and i want to save the record automatically when the user exits the last field.how i can do it.which trigger is appropriate and what is the code.

View 8 Replies View Related

SQL & PL/SQL :: To Run Procedure In Oracle Automatically At 5 Daily

Sep 17, 2011

i want to run the salary posting procedure automatically at mid night every day. i have created a job in toad and defined the required information but it is not working.

View 13 Replies View Related

Forms :: How To Change Tab Page Automatically

Jul 23, 2011

How to change tab page automatically?I have two tabs.in first tab i have placed one button if i press this button first tab should be changed into second tab?

View 1 Replies View Related

Forms :: How To Remove Message That Come Automatically

Mar 2, 2010

How can I remove (record asved) message that come automatically after commit??

View 5 Replies View Related

Oracle 10G Listener Stops Automatically

Mar 8, 2011

We have installed Oracle 10G in windows 2003 server. Oracle is working fine when oracle services are running in local system account, when we change the option �Log On As� from local system account to an domain id the oracle listener stops automatically.

I tried the below mentioned options, We created a new listener it did not worked . we are able to connect the db through command prompt but not through SQL plus or TOADWhen we add the domain id to the local administrator group the oracle is working fine. But we cannot have the domain id in local administrator group since GPO will automatically remove the domain id from local administrator group.

View 2 Replies View Related

Forms :: Oracle 6i Exiting Automatically?

Mar 31, 2013

After compiling in few minutes My Oracle Forms 6i Form is exiting automatically ... How to solve this problem.

View 1 Replies View Related

SQL & PL/SQL :: View - How Grants Are Revoking Automatically

Nov 5, 2010

We have two schemas(sdt & sdm) in one database.

We have base tables in "sdt" ,
Views are created in "sdm" schema based on the "sdt" schema tables We have granted privileges on the base tables of "sdt" schema to "sdm" schema.

Sometimes views are not able to access by sdm schema.Again we are granted privileges on the base tables of "sdt" schemathen views are able to access.How grants are revoking automatically.

View 15 Replies View Related

Tools That Erases The Logs Automatically?

Nov 19, 2006

I have Sap r/3 system which runs on Oracle 9 database. The problem is that the sql queries produces an awful lot of logs thus my disk is full after very short time.

I do not need the logs since its development environment. Are there any tools that erases the logs automatically?

View 2 Replies View Related

How To Kill Invalid Sessions Automatically

Jul 3, 2013

On the oracle 11g, we see too many invalid sessions. Because of which, login is getting restricted. What do i need to do to kill those invalid session periodically, which will avoid of restarting of system.

View 4 Replies View Related

Run Three Scripts One After Another Automatically For Daily Basis?

Mar 22, 2013

How do i run three scripts one after another automatically for daily basis. Say i have three scripts A,B,C and i want to run the three scripts A followed by B followed by C.

View 7 Replies View Related

SQL & PL/SQL :: DBMS Job Commit Other Sessions Automatically

Apr 14, 2011

I am calling one procedure through job and after submitting the job i am using commit. problem is when job close the session it commit the code which is inside procedure and as per my understanding in another session also, which i want to avoid .

my procedure is

Create My_proc is
Begin
Insert into my_table values(1,2,3);
End;

And my job proc is

Create my_job_proc is
Begin
dbms_job.submit(jobno,'my_proc;',sysdate,null,null,false);
commit;
End;

now i am calling my job proc is

Declare
Begin
my_job_proc;
End;

Now problem is once it finish, it will insert the data into my_table which i don't want until I call Commit.I already try 'Set autocommit off'

View 9 Replies View Related

Enterprise Manage Console Closing Automatically?

Jul 25, 2013

I have successfully installed the Oracle 10g standerd version with a sample database on Windows server 2008 standard server. Then I installed the client so that I could use the Enterprise manage console that comes with it. Once installed, I was able to successfully configured the Net service. Now when I use either Enterprise manage console or SQL plus to login to the service that I created, once I enter the user id and password and click ok, system automatically closes both applications. I am not sure what is missing. I installed the same client on a windows XP pc and the enterprise manage console is working perfect.

View 1 Replies View Related

Script To Add Range Partition Automatically - Every Month

Mar 3, 2012

Script to add range partition automatically. This script should be running every month and add the partitions for next 3 months

View 3 Replies View Related

Data Guard :: Recovery Is Not Running Automatically

Sep 5, 2013

in a RAC multi-node environment with single instance dataguard..Recovery is not running automatically I have to re-run the recovery command to make them sync and this command works for already archived log files no upcoming archive log file applied I have to re-run the recovery command again for newly archived log files.

View 2 Replies View Related

Reports & Discoverer :: How To Call Report Automatically

Sep 3, 2012

Is it possible to automate the execution of some reports build with Oracle report builder? Like I want to run such and such report to run daily at 2:00pm or at the end of every month/year.

View 5 Replies View Related

Replication :: Materialized View Not Refreshing Automatically

Jan 25, 2011

I am confused to see one materialized view is not refreshing automatically, whereas the same thing I can do manually.

View 2 Replies View Related

Reports & Discoverer :: Execute RDF File Automatically

Jan 17, 2012

I have an rdf file of version 6i. I need to execute this rdf daily midnight , generate the output as a pdf and send as Mail attachment.

View 1 Replies View Related

Replication :: Oracle 9i - Does Not Push Transactions Automatically

Jun 7, 2002

I have problem with my Replication using oracle 9i.It does not push transactions automatically when refresh time comes but it works fine when pushed manually.I have two sites:

1- Master
a-Master group
2- Materialized view site
a- Materialized view group (Asynchronous)
b- Materialized view with refresh occur automatically on future date every 5 minutes
c- refresh type FORCE.

View 4 Replies View Related

Server Utilities :: Automatically Generate E-R Diagram

Mar 17, 2011

I would like to generate automatically at a certain interval a E-R diagram with all the tables in a schema and put the file on a certain location. My problem is the word AUTOMATICALLY. Toad Data Modeller does everything I want except this.

View 11 Replies View Related

Forms :: Inserting ID / SYSDATE And USER Automatically?

Aug 5, 2010

I have created a datablock and set up the user interface to allow the users to insert all the data they need, however my table has some fields which should be generated automatically and are not done through user input:

id - which is uniqe to each entry to the table so is gernerate by a sequence (which I created on the database) but when i put seq.nextval into the initial value on the datablock it says i cannot do this, so how do I use the sequence to insert the value into that field in the database. This is my primary key in my database whichobviosuly my users cant input data to, instead it is generated automatically.

User - similarly in the datablock is a user field which states the user that inserted that record, I know on the database i can put DEFAULT user for that field , but how do I make the user insert automatically through forms.

Date - Similarly again how do I set SYSDATE to be automatically input to the date field when the user submits the record?

View 8 Replies View Related

Server Administration :: Session Closed Automatically?

May 22, 2012

One user complained that, his session is closing automatically when his session exceeds exactly 01 hour 1 minute.

default profile is assigned for this user. I checked the idle_time value of this default profile. it is UNLIMITED only. What else I need to check to find out is there any timeout parameter has been set or not?

View 6 Replies View Related







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