Sample database schema for Oracle - oracle

Are there any sample databases for Oracle like AdventureWorks for MS SQL? I've searched Oracle site but didn't find any sample database.

The Oracle database installation includes scripts to install sample schemas. Find out more.
Many online examples use the extremely simple EMP and DEPT tables. These tables are not part of the documented schemas listed above. Finding the script for the beloved SCOTT/TIGER schema is harder than you might think. The demobld.sql used to be under the sqlplus sub-directory. Then in 10g (I think) they moved the schema to $ORACLE_HOME/admin/rdbms/scott.sql. In 11gR2 it's moved again, to $ORACLE_HOME/admin/rdbms/utlsampl.sql.

This question can be of some help(?).
Good Databases with sample data

You can run Oracle Live SQL online without Oracle installed. Menu contains:
SQL Worksheet
My Session
Schema. Includes SCOTT, HR, Order Entry (OE) and others.
Quick SQL
My Scripts
Code Library
Contains a search function, scripts, and tutorials.

Related

How to migrate(convert) database(or just tables) from PostgreSQL to Oracle using only Oracle tools?

Data was sent to our company with PostgreSQL, but we are prohibited to use the tools of PostgreSQL , permitted the use of only Oracle.
How to migrate data from PostgreSQL to Oracle without using a third party application(they are also prohibited)? You can only use the tools of Oracle.
I found this article https://support.oracle.com/knowledge/Oracle%20Database%20Products/2220826_1.html but we don't have Support Identifier
We have one .sql file. It weighs 8 Gigabytes.
It looks like you have so many impediments in your company. Regarding Oracle's SQL Developer Migration Workbench, unfortunately it does not support the migration of PostgreSQL databases. However, the following 3rd-party software tools are available and may assist in migration, but I am afraid you cannot use them as you said that those products are forbidden:
http://www.easyfrom.net/download/?gclid=CNPntY36vsQCFUoqjgodHnsA0w#.VRBHKGPVuRQ
http://www.sqlines.com/postgresql-to-oracle
Other options will only move the data from your Postgresql database to Oracle database, it means that you must have the DDLs of the tables before to run the import:
To move data only, you can generate a flat file of the the
PostgreSQL data and use Oracle SQL*Loader.
Another option to migrate data only is to use Oracle Database
Gateway for ODBC which requires an ODBC driver to connect to the
PostreSQL database, and copy each table over the network using
sqlplus "COPY" or "CREATE TABLE AS SELECT" commands via oracle
database link.
Also, Oracle has discussion forum for migrating non-oracle databases to Oracle.
http://www.oracle.com/technetwork/database/migration/third-party-093040.html
But, if you have only a sql file, you should look at it to see whether you have both DDLs ( create tables and indexes, etc ) and the data itself as insert statements. If so, you need to split it and treat the DDLs to convert the original data types to Oracle datatypes.

How to download table from Oracle with little server load

I have a Oracle server which is very highly loaded. I want to Select big table with several millions rows of data and download the data using SQL Developer. How I can do this with little performance impact of the production database?
use oracle's export tool for most efficient dump of data from a table.
example
exp user/password tables=mytable query="optional where clause here"
Note you have to have oracle client installed to use it.

Import and Export Data plus schema using SQLDeveloper 3.0.04

i am newbie to oracle and i like to export database from remote database and import it on local machine. eOn both machines i have oracle 10.2.
I need to know how to export/import schema and data from oracle 10.2 using SQLDeveloper 3.0.0.4.
To export from remote database, i have used export Tool-> Database Export -> export wizard.
and at the end i have got only sql file with DDL and DML statements but somewhere in file it is written
"Cannot render Table DDL for object XXX.TABLE_NAME with DBMS_METADATA attempting internal generator error.
I have ignored previously mentioned message and tried to run those DDL and DML statements but all this ended up with errors.
Is it possible that all this tied with read-only database user? More over, i dont find any table under tables but also tables under other users in SqlDeveloper.
Thanks in advance
As a test, can you select one object in the tree, and navigate to the script panel? SQLDEV also uses DBMS_METADATA to generate those scripts.
Also, as a work-around, try using DataPump to export and import your data. It will be much more efficient for moving around larger schemas.
Your note about not seeing tables under indicates your schema doesn't actually own any tables. You may be working with synonyms that allow you to query objects as if they are in your account. You could be running into a privilege issue, but your error message doesn't indicate that. Error messages often come in bunches, and the very first one is usually the most important.
If you could try using the EXPORT feature say against a very simple schema like SCOTT as a test, this should indicate whether there is a problem with your account settings or with the software.
I'm not sure with SQL Developer 3.0 but with version 3.1 you can follow this:
SQL Developer 3.1 Data Pump Wizards (expdp, impdp)

Exporting rows in Oracle

I need to export a number of rows (from different tables- ie, all the related information about an entity - for eg: a Customer) to another DB in Oracle. How do we do this? I am using a windows OS. Please help.
Thank you all,
Pradeep
While connected to database 1 you could also create a database link to database 2 (if you have rights to do so - there were no assumptions on this) and insert to your tables by selecting from your link e.g. like this
CREATE DATABASE LINK foo
CONNECT TO <user> IDENTIFIED BY <password>
USING '<connect string>';
select * from table1#foo;
Further information:
A database link is a connection
between two physical database servers
that allows a client to access them as
one logical database.
See Dabtabase links at Oracle Database Administrator's Guide.
You can use Oracle's export and import utilities
You might want to give Data Pump a try as well (depending on your version). Many options for moving around data from Oracle -> Oracle dbs
Another option is the SQL*Plus copy command. It's not very fast, but it can be very convenient in certain contexts.
Oracle's SQL developer tool has the option to export data as insert statements.

oracle express detatach

Hi I am new and I am used to MS SQL Manager's Attach/Detatch functionality to drop a database into a single file so I can move it to other computers/SQL instances. In a nut shell, this is what I want to do.
I have a large Oracle Express database (instance name Zeus) that I need to move onto other Oracle Express instances (brand new installs) and then later I need to keep them updated with Zeus' database.
How do I do this?
I am not understanding how to export the database/schema - user definition/permission, table definitions, and table data.
Thanks guys
I don't believe you can easily do that with Oracle (especially XE edition).
You would usually do an Import/Export. This would give something like :
expdp system/password#XE DUMPFILE=expfull.dmp FULL=y
impdp system/password#XE DUMPFILE=expfull.dmp FULL=y
The expfull.dmp files would be located in a folder named oradata/dpdump in the Oracle XE
installation.
You could also use Transportable Tablespaces as described here and summarized here.
Another method involves 10 steps and would have to be adapted to Oracle XE. I mention it here for reference.

Resources