Oracle 10g Backup & Restore - oracle

Here is the scenario:
Oracle 10g database running Windows Vista Business. This is a production/live db.
Nightly backups (Whole database, online backup, ARCHIVELOG mode) moved to different machine on the network.
Hard disk dies.
Setup OS and Oracle 10g on the new hard drive. Oracle does not have any db instances yet.
Is there an easy (or at least relatively easy) way to restore the database from the backup?
I'm not an Oracle DBA and my Oracle knowledge is very limited. I have seen some "advanced RMAN commands", but I have no clue what the doc is about. Is there a 3rd party utility that simplifies the restore process?
If the RMAN scripts are the only way to go, then do I have to create an empty database in Oracle before proceeding?
thanks

The ability to recover a database is the most fundamental responsibility of a DBA -- All else amounts to nothing if data is lost.
If you have limited knowledge of the recovery process and you are in charge of recovering a production instance, my first suggestion would be to contact support : you don't want to make a mistake. Trust me, you don't want to practice on a production environment.
Once the database is restored, when you have plenty of time, I'd suggest you start by having a thorough look at the documentation. You should be fine with the Backup and Recovery Basics Guide.
Nowadays, you can perform recovery through the Entreprise Manager web interface (this is a nice wrapper of RMAN).

Related

Create the database button is not active in Oracle SQL Developer

I don't know how to describe the problems with the Oracle SQL developer program. I am new at this. The story is here;
I downloaded Oracle SQL Developer 22.2. And I started sqldeveloper.exe. Oracle SQL Developer is started but I am not doing anything in this program. Everything freezes. The Create database button is inactive. Press the... button and press .. but nothing changes.
My computer is a gaming computer and not old. The hardware is above the minimum requirements to install the program.
I tried resetting the windows factory settings...
I tried deleting and installing it.
I tried the old version of sqldevelepor.exe...
How can I solve this problem?
SQL Developer is a GUI tool we use to access (most usually) an Oracle database.
But, to do that, you need a database. According to what you said so far, there's none so - SQL Developer itself can't do much.
I'd suggest you to visit the same site (Oracle Technology Network, OTN) from which you downloaded SQL Developer, and this time download the database. Pick the Express Edition (XE) as it is easy to install and use. Along with the installation process, the setup will create the database for you (so you won't have to create it manually).
Then, once it is done, you should be able to use SQL Developer to connect to it. At first, you'll use SYSTEM or SYS users (pay attention to connect as SYSDBA in that case). Don't use these users for anything but administration purposes - create a new user (you can call it e.g. "berfin"), grant privileges to it (most usual are create session, create table, create view, create procedure) so that you could start working with it. In that schema (i.e. user) create your own tables, insert data, do whatever you planned to do).
I believe you should read some documentation first; OTN has it all. Start with the Concepts book, see short DBA (so that you'd be able to create your own user, etc.), have a look at SQL reference book (if you don't know SQL already). That should get you started. On the other hand, you could take shortcuts and check some YouTube videos/tutorials, ask here and there, Google for problems you meet but - in a long turn, if you really want to work with Oracle - read documentation.
tools --> preferences --> environment --> look and feel: windows (not oracle)

Is there an editor out there that allows me to test PL/SQL scripts without a connection?

I work at a facility that does not allow me access to a Oracle Database offsite. So I can't connect to the server through a Oracle client connection right now, because of COVID I'm forced to work from home.
I'm required right now to write a PL/SQL script that will update records across the entire database, however I don't know anything about setting up a test environment on my home computer so that I can run the script in a controlled environment to test it before I bring it back on site.
At one of my previous jobs, they had a PROD, PREPROD, and so forth copies of Oracle databases that one could run the script on before I sent it up the chain to production. The setup we're using doesn't have that, just the production database and thus we have the problem with our workflow that we have one shot to get it right.
So my question is, is there an editor out there for Oracle that will allow me to create a test database, so that I can run the script on that, see the results, edit it to make it work right, before I bring it back to work and run it on our production server? I'm opposed to installing a full Oracle database implementation on my own computer for licensing reasons and/or honestly I don't know what I'm doing setting up an Oracle server on my own (Tried it, couldn't even find documentation on it).
Oracle Express Edition (XE) is free so - no licensing reasons here.
If you want, you can download pre-configured Virtual Box machine which has the database already installed, along with SQL Developer GUI tool to access it so you're up and running in a matter of minutes.
Alternatively, create an account on https://apex.oracle.com/en/; it is also free, gives you certain quota (was 25MB, don't know how much is it now, possibly somewhat more than that) which is enough to try your queries.
Or, use https://dbfiddle.uk/
As you can see, there are various options; pick the one that suits you best.

Oracle Database 12c Installed, but no SQL developer showed up

I've been trying to use Oracle 12c and SQL Developer on a Virtual Machine running Oracle Linux for weeks now but the process gets worse and worse and this is the fifth time I do the same installation again.
I used oracle-rdbms-server-12cR1-preinstall for the preinstallation process, I also added the groups DBA, OPER, BACKUPDBA, DGDBA, KMDBA, and RACDBA.
I then used the./runInstaller file that comes with the Database and went through the installation process without any issues. But when the installation finished and I closed the installer, there is no trace of SQL Developer anywhere.
I'm not even sure if the Oracle Database was actually installed correctly, I've been running this command to see if it returns me anything in order to check if the database is actually installed but I don't know if i'm correct.
Don't give up. You can do it!
The daunting part of Oracle Database is that you are installing the exact same binaries for your learning environment as the largest bank on this planet has installed in their production environment! Oracle Database is a very sophisticated RDBMS and it takes years to learn it!
Oracle Database and SQL Developer
Oracle Database and SQL Developer are two separate products. You can download both from OTN and install them separately.
Database creation
Did you create a database (datafiles) while installing the binaries? There is a checkbox in the installer for that. You can create a database using the tool dbca (Database Creation Assistant) in the $ORACLE_HOME/bin folder.
Instance not running.
pmon is a vital process for the instance (processes + memory) which indicates it hasn't started. Check /etc/oratab if there is a database added to the file. If yes, fire up!
# set the environment
$. oraenv
ORCLDB
# login as sys and start the database
$sqlplus / as sysdba
SQL>startup
Best of luck!
Bjarte

Export oracle database to another server

How can i migrate oracle database from one server to another along with data?
Database is on Window server and i need to copy it to another window server. Nothing complex :)
The easiest option from an administrative perspective would be to do a full export and import. The Data Pump versions of the export and import utilities will be more efficient than the classic version. The dump file that is generated can be imported into a later version of Oracle on any platform.
The downside of using export and import, however, is that it takes a while. You have to read all the data out of the database to the file system and write it all back into the new database. If you don't want to lose data, that means a potentially hefty downtime.
If you don't have the downtime window to do a full export and import, you could restore your last backup to the new machine if you want to run exactly the same version of Oracle on the same operating system. You can also use cross-platform transportable tablespaces.
dbmantain, liquibase strike to my mind. Also follow this SO posts
What kind of database refactoring tools are there?
Database Migration
There's several aspects to consider.
Do the source and destination machines share the same endianess. If they are both x86 based, then the answer would be yes.
Do they share the same OS ?
Do they share storage ?
Are they on the same network ?
Does the destination machine already have Oracle installed ?
Is it the same version/release of Oracle ?
Is it the same Edition of Oracle ?
What is the data volume ? What downtime are you allowed ?
In the easiest scenario (same OS/endianess/shared storage/Oracle release/Oracle edition) then you should be able to simply shut down the instance on the old machine and start up one on the new machine
In the most complex (different endianess/no shared storage or network/different Oracle release and edition) then an import/export is probably the only practical solution.

Develop on local Oracle instance

I want our team to develop against local instances of an Oracle database. With MS SQL, I can use SQL Express Edition. What are my options?
Oracle has an express edition as well. I believe it is more limited though (IIRC, you can only have one database on an instance)
Oracle XE
I have had a lot of success using Oracle 10g Express Edition. It comes with Oracle Aplication Express which allows the simple admin and creation of software via a web interface. It is limited to 4Gb of Disk Space, 1Gb of Ram and will only use 1 processor.
It's free and in my experience has been 100% reliable. It can easily be hosted within a Virtual machine.
Also Oracle SQL Developer is a cross platform application that can be used with any version of Oracle and is also free. Oracle 10g is superb. Go for it :-)
I'm happy with Oracle XE for development purposes.
I do have this piece of wisdow to share; if you're having problems like ORA-12519: TNS:no appropriate service handler found or ORA-12560: TNS:protocol adapter error from time to time then try to change your PROCESSES parameter, logon to Oracle using sys as sysdba and execute the following:
ALTER SYSTEM SET PROCESSES=150 SCOPE=SPFILE;
After changing the PROCESSES parameter restart your Oracle service.
Oracle allows developers to download and use Oracle for free for the purpose of developing software (at least for the initial prototype, best to read the license terms). Downloads here.
We ended up using Oracle XE. Install client, install express, reboot, it just works.
I don't recommend Oracle XE. My co-workers and I have been doing a project in Oracle and got severely tripped up after trying to use XE for our local development instances. The database worked fine until we started running local stress tests, at which point it started dropping connections.
I don't know whether this is an intentional, documented limitation or if perhaps we each just hit a weird bug, but I strongly recommend that you stay away from XE. When we both switched over to the full version, our problems immediately went away.
Also, Oracle doesn't require any kind of licensing confirmation for the full server; you have to click something to say that you have indeed acquired a license, but it doesn't make you prove it. So if you indeed have a license to use Oracle, there's no reason why you can't just install the full version on your development machines.

Resources