Reuse old/configured server for new purpose problems.


 
Thread Tools Search this Thread
Operating Systems Solaris Reuse old/configured server for new purpose problems.
# 8  
Old 02-13-2013
Quote:
Originally Posted by RedSpyder
Can you explain me this? I thought these were separate databases but not. There's only one database in there. Verified with (select * from v$databaseSmilie

Code:
 app/oradata_smart_ora1   1.09G  11.9G  1.09G  /oradata/SMART/ora1
app/oradata_smart_ora2   7.07G  10.9G  7.07G  /oradata/SMART/ora2
app/oradata_smart_ora3   19.8G  16.2G  19.8G  /oradata/SMART/ora3
app/oradata_smart_ora4    136G  30.1G   136G  /oradata/SMART/ora4
app/oradata_smart_ora5   11.8G  43.2G  11.8G  /oradata/SMART/ora5
app/oradata_smart_ora6   47.0G  28.0G  47.0G  /oradata/SMART/ora6
app/oradata_smart_ora7    122G  24.9G   122G  /oradata/SMART/ora7
app/oradata_smart_redo1   601M  2.41G   601M  /oradata/SMART/redo1
app/oradata_smart_redo2   601M  2.41G   601M  /oradata/SMART/redo2
app/oradata_smart_redo3   601M  2.41G   601M  /oradata/SMART/redo3

This is only one database instance (probably called "SMART"). What you see here are are just different filesystems, holding tablespaces, redo-logs and controlfiles.

A little explanation about what an Oracle database comprises. Sorry in advance if some parts are only vague. I am a Sysadmin, not a DBA, and have only a passing knowledge of databases:

An Oracle database (more correctly: database instance) first has space to store data and index them. This is the DB equivalent of a filesystem. It is called "tablespaces" and from an OS POV it is one or several file(s). Usually one creates - one or more - filesystem(s) for these files because if I/O issues arise one wants to be able to balance the I/O-operations across the involved hardware (disks, adapters, ...).

Where (in the filesystem) all these tablespaces are to be found, how big they are and several other information - name of the instance, used codepage, .... - is stored in a set of "controlfiles". In fact these files are created first when the instance is initially created. These control files are relatively small (just a few MB), but are vital to the operation of the database. Without a fitting set of control files backups of the tablespaces are unusable.

This all is completed by a third class of files: redo-logs. As the database is under load, data get stored in it. Every such transaction is written to the redo log as it happens. Once such a redo-log is full it is moved to a certain location and called "archive-log" and a new redo-log is started. It is possible to have several redo-logs and use them round-robin (seems to be the case here), but the principle is always the same. With these logs it is possible to either reverse already done transactions (="roll back") or, using a previous version of the tablespaces and reapplying the transactions to duplicate them (="roll forward"). The redo-log in principle consists of 4 informations for every transaction:

1) What was the data before the operation;
2) What was the data after the operation;
3) a timestamp;
4) a transaction-ID so that the succession of the transactions is distinct.

OK, so far a (very incomplete) introduction to Oracle workings.

What you can do to free space:

1) check the tablespaces. It might be that they are not full at all. It is possible to resize them, just like filesystems, thereby freeing space. By moving them around you can maybe empty one of the filesystems in use so that you can scratch it. Ask a DBA about how you do that inside Oracle, i just know this is possible but not how it is done.

2) check the archive logs. Archive-logs are not necessary for the running database. Backup them and remove them afterwards, freeing space. If this is not a productive DB instance you might not need them altogether. It is possible to switch off the loging completely, which is done typically in test instances and for initial loads of new database instances, so that archive-logs and redologs are not created at all.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 9  
Old 02-13-2013
bakunin thanks for your response!

At the moment I dont care for anything inside this database. Dropping it will automatically free all the space used?
# 10  
Old 02-13-2013
If you don't care for the database then just scratch the filesystems it takes. This way you create space for your new application, no?

Shutdown th database first, fastest way (if you delete it anyways, afterwards) is with

Code:
lsnrctl stop # stop all listeners, then, "connect / as sysdba" and
shutdown abort;


I hope this helps

bakunin
# 11  
Old 02-15-2013
I'll give some further details for the shutdown, as it may be important (there are some posts on this site that demonstrate what happens when you delete a file at os level with processes still having it open).

1) Check if a database is running by looking if there are database processes. The most important process for a Oracle-database is pmon, and looking at the process owner you find out which user you should use to perform the actions below.
Code:
ps -eaf |grep pmon

If there is no pmon process the database is already shut down. If there is more than one you have to do the steps below for each of them. (select * from v$database does NOT show how many databases are installed)


2) Identify the system-ID
There should be a file /etc/oratab (on solaris maybe /var/opt/oracle/oratab). This file tells you how many databases are installed on your system. The structure of this file is:
Code:
<ORACLE_SID>:<ORACLE_HOME>:<AutomaticStart>

<ORACLE_SID> is the "databasename" and <ORACLE_HOME> is the place where the software is installed. There should be a line in this file for each database the server houses.


3) Set up the environment
Switch user to the software owner and set the environment variables ORACLE_HOME and ORACLE_SID (with the values found in /etc/oratab)
Code:
su - oracle
ORACLE_HOME=/path/shown/in/etc/oratab
ORACLE_SID=most_likely_smart


4) Shut down the database:
Code:
lsnrctl stop
sqlplus /nolog
connect / as sysdba;
shutdown abort;
exit


Last edited by cero; 02-15-2013 at 11:54 AM..
This User Gave Thanks to cero For This Post:
# 12  
Old 04-16-2013
Bakunin thanks for your explanation! You have no idea how it helped me!!

Now... I have another question. The ex-server admin (that I hope he is in a special place in hell for not documenting ANYTHING!Smilie) has DB control files in ora1, ora2 and ora3 and redo files in their respective redo pools. What I would like to do is to destroy ora4-ora7 and create just 1 zfs pool from all to them. I was checking zfs commands and in order to create a new pool I need to know which disks will be used to create it. Problem is I dont know which disks form ora4-7 pools. How can I find that out? How can I find out which disks are available after destroying a zfs pools?

Thanks in advance

Code:
 
app/oradata_smart_ora1   1.09G  11.9G  1.09G  /oradata/SMART/ora1
app/oradata_smart_ora2   7.07G  10.9G  7.07G  /oradata/SMART/ora2
app/oradata_smart_ora3   19.8G  16.2G  19.8G  /oradata/SMART/ora3
app/oradata_smart_ora4    136G  30.1G   136G  /oradata/SMART/ora4
app/oradata_smart_ora5   11.8G  43.2G  11.8G  /oradata/SMART/ora5
app/oradata_smart_ora6   47.0G  28.0G  47.0G  /oradata/SMART/ora6
app/oradata_smart_ora7    122G  24.9G   122G  /oradata/SMART/ora7
app/oradata_smart_redo1   601M  2.41G   601M  /oradata/SMART/redo1
app/oradata_smart_redo2   601M  2.41G   601M  /oradata/SMART/redo2
app/oradata_smart_redo3   601M  2.41G   601M  /oradata/SMART/redo3

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Reuse format strings

I have a collection of format strings for sscanf, such as "%02d%*1s%02d%*1s%02d" to read in certain formatted strings, such as dates, times, etc. I wonder if there is a way to use them in printf without some changes? The example above would not work - at least I can't think of any ways to... (4 Replies)
Discussion started by: migurus
4 Replies

2. Solaris

Unable to boot from mirror disk on x86 server configured under VxVM

Hi, Can you help me on booting x86 server configured under VxVM. Server boots fine normally from both the disks but if I try to boot server from mirror disk without starting veritas, then it does not boot. vxplex -g rootdg dis var-02 vxplex -g rootdg dis swapvol-02 vxplex -g rootdg dis... (2 Replies)
Discussion started by: milindphanse604
2 Replies

3. Emergency UNIX and Linux Support

Reuse a LUN

I have a LUN (From HP-Storage VA7110) that is claimed on 2 servers, but is in used in one of the VG on Server-1 . Now I want to shut Server-1 and re-use that LUN on server-2 . Server-1 Path-1 : /dev/rdsk/c4t0d1 Path-2: /dev/rdsk/c6t0d1 Server-2 Path-1: /dev/rdsk/c5t0d1 Path-2:... (8 Replies)
Discussion started by: Shirishlnx
8 Replies

4. Shell Programming and Scripting

A bad configured logrotate can cause a problems with memory leak ?

I am newbe to unix. I have a very serious problem on my server. I have a java application running, and all day on Monday morning, the process that is associated with this java is locked. Usually I doing a shutdown by the shutdown java command , you have to kill the process with the kill-kill... (1 Reply)
Discussion started by: jjoottaa
1 Replies

5. AIX

restoring mksysb backup of a clustered server configured in HACMP

Hi, I have done NIM restoration via nim_bosinst a lot of times but I have some doubts on restoring a server which is clustered specifically HACMP. Previously, I don't know the trend but after doing a nim_bosinst, I can see the client's hostname is back to "localhost" rather than its original... (0 Replies)
Discussion started by: depam
0 Replies

6. Shell Programming and Scripting

Reuse Variable..

Hi. I have these two variables: My objective here is to reuse that $file_name variable again and again by resetting the $cv value. for example, if i reissue the cv="$(print 'CV01')" command, thus $file_name is now should be "CP99978_CV01.TXT", not "CP99978_CV01.TXT" anymore. How I'm... (7 Replies)
Discussion started by: aimy
7 Replies

7. AIX

What's the purpose of rj45-like connector on front panel of p5 55A server ?

Hi, What is the purpose of this connector ? I attached picture of it. In docs it is called "Ethernet connector". thanks Vilius (1 Reply)
Discussion started by: vilius
1 Replies

8. HP-UX

Reuse disk from other HP-UX

Hello, I have 2 hp-ux both running 11.23, I have move one of a harddisk from "UNIX A" to "UNIX B", so how can I read back the data in "UNIX B"? Thanks (5 Replies)
Discussion started by: zetadhell
5 Replies

9. UNIX for Dummies Questions & Answers

How to reuse same major number

Hi, I am working on device drivers.Once If register a device i'll get one major no. If i unregister and register again i'll get a different major no.What i have to do to get same major no. each time :( (0 Replies)
Discussion started by: Agnello
0 Replies

10. Linux

httpd server problems!

Hello, My apache was working before, but not anymore. When I try to run this service this way: service httpd start I get the following error: Starting httpd: /usr/sbin/httpd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: Permission denied Anyone... (2 Replies)
Discussion started by: HSN
2 Replies
Login or Register to Ask a Question