Solved

what is the equivalent command for oracle for creating DB and user w.r.t mysql

Posted on 2016-07-22
3
21 Views
Last Modified: 2016-09-23
below commands used for generate DB and user in mysql.what is the equivalent command for oracle.

CREATE DATABASE xyz; CREATE USER 'xyz'@'localhost' IDENTIFIED BY 'xyz'; grant all on xyz.* to 'alfresco5'@'localhost' identified by 'xyz' with grant option; grant all on xyz.* to 'xyz'@'localhost.localdomain' identified by 'xyz' with grant option;
0
Comment
Question by:chaitu chaitu
3 Comments
 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 250 total points
ID: 41725415
Might I refer you to the online documentation?

You can create a database from the command line but using the Database Configuration Assistant (DBCA) is a lot easier.

Create Database:
http://docs.oracle.com/database/121/ADMIN/create.htm#ADMIN11073

Create User:
http://docs.oracle.com/database/121/SQLRF/statements_8003.htm#SQLRF01503
0
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 250 total points
ID: 41733592
Be aware that the "create database..." command in Oracle may not mean exactly the same thing as it does in some other SQL-based systems.  For example, in SQL Server the concept of a "database" is a much more-limited object than in Oracle.  I don't know MySQL, so I don't know if the concept of a "database" in MySQL is more like the Oracle concept, or the SQL Server concept.  In Oracle the term "schema" is more like what is called a "database" in SQL Server.

Also, this concept: "grant all on xyz.* to [some other user]" is usually implemented in Oracle via roles.  Oracle allow you to grant permissions to a role, then the role can be granted to another user.  But, in Oracle, all of these grants are only in the local database.

This syntax in Oracle: "@...host" indicates a remote database, and permissions in Oracle are never granted to a remote database.  In Oracle systems, a remote database user must connect to the local database with a username and password that is valid in the local database.  (I don't know exactly what this syntax means in MySQL: "...@localhost".)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now