Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Sql Server Programming

Creating a database


I am using SQL Mgt. Studio Express (2005). I want to use it to create a
script that will create a database already on one of the servers. I thought
"Script Database As CREATE to" would do this. However, the script created
produces these errors when I run it in SQLCMD.EXE:

Changed database context to 'master'.
Msg 5105, Level 16, State 2, Server LOGGER\SQLEXPRESS, Line 2
A file activation error occurred. The physical file name 'MCSCRE.mdf' may be
incorrect. Diagnose and correct additional errors, and retry the operation.
Msg 1802, Level 16, State 1, Server LOGGER\SQLEXPRESS, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.

The script that produced this is:

/****** Object:  Database [MCSCRE]    Script Date: 05/28/2007 15:01:37
******/
CREATE DATABASE [MCSCRE] ON  PRIMARY
( NAME = N'MCS Logger_Data', FILENAME = N'MCSCRE.mdf' , SIZE = 9024KB ,
MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
 LOG ON
( NAME = N'MCS Logger_Log', FILENAME = N'MCSCRE_log.ldf' , SIZE = 47616KB ,
MAXSIZE = UNLIMITED, FILEGROWTH = 10%)
GO
EXEC dbo.sp_dbcmptlevel @dbname=N'MCSCRE', @new_cmptlevel=80
GO
...(continues)

What am I doing wrong?

Thanks!

On May 30, 11:57 am, "Andrew Chalk" <ach@magnacartasoftware.com>
wrote:

Specify full path name for mdf and ldf  like
D:\N'MCSCRE.mdf ( or  your default path for  mdf in that server )
E:\N'MCSCRE_log.ldf ( or  your default path for ldf in that server )

-----------------------------------------------Reply-----------------------------------------------
Thanks.
 N'D:\MCSCRE.mdf ..
did the trick.

- A
"M A Srinivas" <masri@gmail.com> wrote in message
news:1180511965.039721.280080@o11g2000prd.googlegroups.com...

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc