Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2016-07-22
3
Medium Priority
?
57 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 1000 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 1000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

721 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