creating a database in sql

Hi,

Once I have logged in to the SQL server, I am supposed to create my own database. Then this database is to contain tables etc. pertaining to my project. Right.

The problem is that once I log in to my SQL server, I am not able to create my database.

When I try to create my own database using CREATE DATABASE db_name; I get the message that the database is already mounted.

Though I am able to perform my work (by creating tables, writing queries etc.), I am not able to create a database where I can put related tables in one separate space. I am working on two projects simultaneously, and all the tables seem to be there in one location (as I am not able to create separate databases for the two projects).

Replies

  • Vishal Sharma
    Vishal Sharma
    #-Link-Snipped-# Tagging the DB guy
  • Manish Goyal
    Manish Goyal
    ask your db admin if you have rights to create new database
  • Aashish Joshi
    Aashish Joshi
    You may get this error if you're trying to create a new database when you have another one already mounted. The DB in use needs to be unmounted first before you can create a new DB.

    If you're using Oracle try the following steps and see if you're able to create a database:

    1. First log in using Sqlplus. Open command prompt or terminal and enter the following command:

    sqlplus /nolog
    
    2. Sign in as a user that has create database privilege. For example, if you have the sysdba privilege you an use this to sign in:
    connect username as sysdba
    
    3. If the database is already running then you'll need to shut it down first:
    shutdown normal
    
    4. Now start the database without mounting it:
    startup nomount
    
    Now you should be able to create a new database.

    Note: If you use Oracle's free eXpress Edition DB additional steps are required before you can create more than 1 database.

You are reading an archived discussion.

Related Posts

I am studying civil engineering in 7th sem can I apply for IES 2016?
One more opensource mobile OS is in heavy development, Plasma Mobile from KDE team which has delivered us an awesome desktop environment. ​
Hii, I got seat for dac in IACSD Pune,aug 15 batch but now they sent me assignment (20 c programs mainly data structured) which should be submitted at reporting day.....
how is cdac pune for wimc course ? is the eduction is as good as dac? what are the placement records?
Hi, I was recently going through a blog that quoted A man who claims his #1 commitment in life is his relationship partner (or his family) is either too dishonest...