Solved

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

Posted on 2016-07-22
3
50 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 77

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 35

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

635 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