Change Oracle Database from Archive log mode to Non-archive log mode - oracle

I have an Oracle databse, it is Oracle 11g Standard Edition, Currently it is working in archive log mode. And I need it to be change to non-archive log mode. Because everyday the logs fill the Hard Disks of the server.
Please let me know the steps to do this..
Thanks in advance
Mahesh

To set the database in NOARCHIVELOG MODE, You need to shutdown the db & start it in in mount state. Follow the below steps.
1. shutdown immediate;
2. startup mount;
3. alter database noarchivelog;
4. alter database open;

Related

Oracle database recovery

I was living in Ukraine, Kharkov. Now moved to another place due to war with Russian. Back there in Kharkov I had HP ProLiant server with Oracle database. Before escape city I did copy of file system to my laptop. Oracle Linux installed on laptop.
Is it possible to restore/run database instance with all my database schemas/users from that copy of filesystem?
I'm Java and PL/SQL developer. But I'm not Oracle administer, Oracle is quite complex system and it hard to run it for me from copy of filesystem.
As well, I managed to get all 4 SAS drives from server and took them with me. But I do not have a server here, I'll try to find someone who has one.
Please guide me or give some ideas what could I do to run database again. Or export and import data to new database.
The following will work if you have the same file paths as on your original Oracle database.
Create new database.
Shutdown immediate;
Change your command window to the same directory that the backups are in.
Launch RMAN with new database as target
The following are the rman commands you will be issuing:
startup nomount;
restore controlfile from '<<file path to control file>>';
shutdown immediate;
startup mount;
restore database;
recover database;
alter database open resetlogs;

Oracle rman simple backup on 11g

This question is almost exaclty like
oracle rman simple backup
but there isn't an acceptable answer there, and this question is about 11g. So I'll ask:
I'd like to do some table initialization DDL tests on an oracle shema, and I'd like to revert the database to the prior-test state between runs. I'm executing the following in RMAN:
shutdown immediate;
startup mount
backup database;
sql 'alter database open';
As I see it works fine, list backup shows backups.
Than I made some modifications (Added some users, added some tables, adding data) and I tried to restore backup:
shutdown immediate;
startup mount
restore database;
recover database;
sql 'alter database open resetlogs';
Expected result: the database should be restored to the exact state as to when the initial backup was taken.
Actual result: all the new tables and users I created in my test DDL continue to exist. I verified this by closing connections, restarting sessions, and then even selecting from the tables! The tables still exist even after the restore!
What is the deal with this? In MSSQL and Postgres, a backup means you save the state of the db, and restoring it means you go back to when the backup was. But in RMAN for oracle 11g, it 'claims' the restore was successful, but the evidence clearly shows otherwise.
How can I get oracle to save the state of the database exactly as it is, and then make changes, and when I restore, i want the database to be exactly as it was when I backed it up?
Is this possible in Oracle?
Yes it is possible - you have several options:
create a cold backup of the database (datafiles, controlfiles, online redo logs) and then to restore them when it is necessary
Perform so called "point in time recovery" (assuming your DB is in archivelog mode). Take DB backup with RMAN note the "time" or "SCN" or "archivelog sequence" after a while you can restore DB and recover until previous noted time/SCN/LOG SEQUENCE
Special designed by Oracle for this purposes and I recommend it in your case "Flashback Database" (brows Oracle docs to see what this is).
Oracle always "try" to restore/recover your database up to last committed transaction if it is possible, that is why you get the result you described above, but if you want to restore up to specific time/SCN/SEQUENCE just tell Oracle about this :)

Oracle daily db backup - without Enterprise Manager

I'm a SQL Server DBA, but we have an Oracle 10g database that I need to start performing daily backups on. We do not have Enterprise Manager. Is there a way to schedule a daily backup in Oracle like in SQL Server?
I apologize if this question is severely elementary for Oracle people, but I've had a very tough time trying to research this and coming up with an answer other than "Use EM".
Easiest in your case is to make a simple Windows Batch script that set ORACLE_HOME and PATH and uses rman to make the backup. Schedule the script in the Windows Task scheduler. Assuming your database is production and because of this runs in archive log mode your script could be something like this:
(I am not a Windows expert so subtle errors might be easy to spot for you)
rman_backup.bat:
ORACLE_SID=your_oracle_sid
ORACLE_HOME=d:/where/your/installation/is
PATH=%ORACLE_HOME%/bin;%PATH%
rman cmdfile=your_rman_actions_script.rman log=your_log_file.log
your_rman_action_script.rman looks like
connect target=/
backup DATABASE PLUS ARCHIVELOG;
For documentation look at Oracle 10g database documentation and start with 2 day dba. After that check out the backup docu found here Administration
I would (but then, my background is more on Unix, less on Windows) do the scheduling from outside the database, using the OS Scheduler to run a backup script. Assuming that no real backup system is available.
In the beginning of backup, you would run a SQL script to place the tablespaces in backup mode (ALTER TABLESPACE x BEGIN BACKUP), then back up the tablespace data files, and after that restore normal mode (ALTER TABLESPACE x END BACKUP). PL/SQL can be used here for looping over all tablespaces.
After that, you'd back up the control file (ALTER SYSTEM BACKUP CONTROLFILE ...), and finally you would rotate the redo logs enough times that all relevant log data has been archived, and back up the archive logs.
And as of doing incremental backups f.ex. throughout the working week, just do the log rotation & archive log copy part.

Issue creating a new user / schema in Oracle 11G instance

I have an Oracle instance with 8 users/schemas already but since late last week I am unable to create any new users on that instance. When I run the create user script it just keeps running....
This is a development box and I have full access to it. I am not a DBA so how do I troubleshoot to find out what the issue could be? and what could the issue be?
Here is the create user script:
create user usr_ARCHIVE identified by usr_ARCHIVEpw
default tablespace USERS
temporary tablespace TEMP
profile DEFAULT
quota UNLIMITED on USERS;
Please have a look at the user tablespace to see whether it has enough free space or not. I have faced similar issues in the past.
It's probably waiting or trying to obtain a lock. To determine what is going on you need to enable tracing. Before executing the create user statement, execute the following command:
alter session set events '10046 trace name context forever, level 12';
This will create a trace file in the trace directory. By default this is the same directory where the alert.log file is stored. Analyze the trace file and especially check for the lines that start with WAIT.
The problem was with another 10G TNSListener that was running. Once the 10G TNSListener was stopped and 11G Listener restarted the issue was resolved.

oracle database cloning

i tried to clone one of my database in one machine to another machine.
the procedure is right i guess its getting mounted but am unable to go to open state.its showing errors as below.
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
would anyone suggest me what the exact pblm is?
Thanks in advance!
perhaps this might help you:
Cause of your problem:
Some datafiles are offline.
ORACLE instance terminated. Disconnection forced so this might cause the datafiles to be offlined
Solution:
Check if you have a good backup from which you can restore any problematic data file.
1) first restore the problematic datafile.
2) mount the database
SQL > recover database;
And then try to open the database
SQL > alter database open ;
3) Try to find if there are any offline files by checking the recover_file.
SQL> select * from v$recover_file;
For example:-
11 OFFLINE OFFLINE
2489793132
30-JAN-09
20 OFFLINE OFFLINE
2489793132
4) Recover the offline datafiles that were appearing from above select statement,
i.e.
SQL> recover datafile 11,20;
Media recovery complete.
5) Bring these datafiles back online,
i.e
SQL> alter database datafile 11,20 online;
Database altered.
6) To ensure no more files just check again the recover_file view, then you can safely open the database
SQL> select * from v$recover_file;
no rows selected
Hope this helps.
Did you also clone your Oracle home?
If yes, make sure your update your pfile/spfile with your new server name.
Also, don't forget listener.ora.
Hope this helps.

Resources