How to create a user and grant permissions in Oracle

As always, begin by connecting to your server where Oracle is hosted, then connect to Oracle itself as the SYSTEM account. The SYSTEM account is one of a handful of predefined administrative accounts generated automatically when Oracle is installed. SYSTEM is capable of most administrative tasks, but the task we’re particularly interested in is account management. Creating a user Once connected as SYSTEM, simply issue the CREATE USER command to generate a new account. Here we’re simply creating a books_admin account that is IDENTIFIED or authenticated by the specified password. The Grant statement…

Read More

How to copy and paste between your computer and VirtualBox

1- Install additional software After you install VirtualBox and a virtual machine, you want to Copy & Paste between your computer and the virtual machine, you need to install an additional piece of software, which is ” Guest Additions“.On the  VirtualBox window, enter the  Devices/Insert Guest Additions CD Image..function to insert a virtual  CD disc to install this software. After finishing installation, restart your virtual machine  2- Shared Clipboard + Drag & Drop Shut down your virtual machine and go back to the  VirtualBox Manager ​​​​​​​screen. On “General -> Advanced” Tab, select: Shared Clipboard:…

Read More

VirtualBox Keyboard Shortcuts

VirtualBox Manager (41 shortcuts) Ctrl + ↑   Shift + A Cloud Profile Manager: Add Profile… Ctrl + ↑   Shift + A Media Manager: Add… Ctrl + A Add machine… Ctrl + ↑   Shift + D Log Viewer: Bookmark Ctrl + ↑   Shift + C Snapshot Pane: Clone… Ctrl + O Clone… Ctrl + P Cloud Profile Manager… F1 Help contents Ctrl + ↑   Shift + C Media Manager: Copy… Ctrl + ↑   Shift + C Network Manager: Create… Ctrl + ↑   Shift + D Snapshot Pane: Delete… Ctrl + Q Exit Ctrl + E Export Appliance… Ctrl + ↑   Shift + T Log Viewer: Filter Ctrl + ↑   Shift + F Log Viewer: Find Ctrl + H Host Network Manager… Ctrl + I Import Appliance… Ctrl + ↑   Shift + I Cloud Profile Manager: Import Profiles… Ctrl + ↑   Shift + M Media Manager: Move… Ctrl + N New machine……

Read More

Oracle PL/SQL – SQL Plus Startup Script with glogin.sql or login.sql

This article shows about how to configure the environment variable when SqlPlus – SqlPlus Command start up in order to have always a good behavior in the formatting of the result. You have to setup the Windows – Environment Variable (SQL Plus|SQL Developer)- SQLPATH with a directory. Copy then the file login.sql described below in it. This file is execute each time that you connect to a database with SQLPlus. SQLPATH in Windows environment (Windows Oracle server):  HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\ SQLPATH in…

Read More

Oracle – Create Table – Using Select Statement With Data or No Data

Here is a sample script: WITH data   CREATE TABLE test3 AS SELECT table_name, tablespace_name FROM all_tables;   ———————————   Without data   CREATE TABLE ctas AS SELECT table_name, tablespace_name FROM all_tables WHERE 1=2;     — For example, create a table named EMPLOYEE3 that includes all — of the column definitions from EMPLOYEE where the DEPTNO = D11.   CREATE TABLE EMPLOYEE3 AS (SELECT PROJNO, PROJNAME, DEPTNO FROM EMPLOYEE WHERE DEPTNO = ‘D11’) WITH NO DATA —

Read More

Posted in Oracle Tagged , Comments Off on Oracle – Create Table – Using Select Statement With Data or No Data
SQL SELECT TOP Clause

The SQL SELECT TOP Clause The SELECT TOP clause is used to specify the number of records to return. The SELECT TOP clause can be very useful on large tables with thousands of records. Returning a large number of records can impact on performance. Note: Not all database systems support the SELECT TOP clause. SQL Server / MS Access Syntax SELECT TOP number|percent column_name(s) FROM table_name;   SQL SELECT TOP Equivalent in MySQL and Oracle MySQL Syntax SELECT column_name(s) FROM table_name LIMIT number; Example SELECT *…

Read More