Link to home
Start Free TrialLog in
Avatar of sunifnb
sunifnb

asked on

How to create SQL database (mdf - file) & log file

I am running Oracle-SQL Server 8 Personal.   I want to create sql database and log file for specified location {drive:/path}. What is the procedure, method of this database creation.

I don't have any Windows based application for that.

The following comment is not working properly {Error at line No. 2 {Invalid procedure call "ON"}

/----------------------------------------------
CREATE DATABASE Sales
ON
(NAME = Sales_dat,
FILENAME = 'c:\mssql7\data\saledat.mdf',
SIZE = 10,
MAXSIZE = 50,
FILEGROWTH = 5 )
LOG ON
( NAME = 'Sales_log',
FILENAME = 'c:\mssql7\data\salelog.ldf',
SIZE = 5MB,
MAXSIZE = 25MB,
FILEGROWTH = 5MB )
/----------------------------------------------

[Note : please give me any e.g. And it's very urgent]
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Are you using M$ SQL Server, or Oracle Server? i ask because of the version 8. SQL Server 2000 indicates is internal version as 8, but the name Personal is rather Oracle. On the other hand, mdf and ldf files is really SQL Server?

I assume that you use SQL server 2000...
Using the Query Analyser, you can simply issue this "query":
CREATE DATABASE YourDatabaseName;

This will create a database, with a mdf file and a ldf file in the default location and with default names.
For more precise indications, you should look up the CREATE DATABASE statement in the Books Online (BOL)

Using the Enterprise Manager, you can simply right-click the Databases folder, and choose "Create New Database".
Finally, in the tools menu, you could use the Create Database Wizard...

Cheers
Avatar of sunifnb
sunifnb

ASKER

Sorry, i don't have any enterprise manager, so i want to know Oracle SQL comment for create database at the spesific location {drive:/path} and also log file.

Please help me.....
ASKER CERTIFIED SOLUTION
Avatar of chigrik
chigrik

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
As i thought: sunifnb, you are speaking of ORACLE, and this is currently the MS SQL Server topic area!

Now in oracle, the creation of a database is not as simply as in SQL Server, and depends furthermore from the OS You are using.

I think you are trying to use a MSSQL Server Syntax on Oracle Server, where the ON clause is invalid...

I suggest that you post your question rather in the Oracle topic area.

Cheers
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note that you should include the sizing paramaters for the log files too in the create database statement.
sunifnb:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Split between chigrik and crsankar
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Dheeraj Jain
EE Cleanup Volunteer