I have the following query written
-- ==================
-- Create Database
-- ==================
CREATE DATABASE CVIEW
ON
( NAME = 'CVIEW_dat',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\CVIEW.mdf',
SIZE = 2000MB,
FILEGROWTH = 10% )
LOG ON
( NAME = 'CVIEW_log',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\CVIEW.ldf',
SIZE = 2000MB,
FILEGROWTH = 10% )
GO
My question is, is there a way to not specify the FILENAME option and have it select a default? I am trying to create a standardized query that will create a Db on any machine. For instance if the SQL directory is set up on the D:\ drive, my sql file will fail. How can I prevent this?
-- ==================
-- Create Database
-- ==================
CREATE DATABASE CVIEW
ON
( NAME = 'CVIEW_dat',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\CVIEW.mdf',
SIZE = 2000MB,
FILEGROWTH = 10% )
LOG ON
( NAME = 'CVIEW_log',
FILENAME = 'c:\program files\microsoft sql server\mssql\data\CVIEW.ldf',
SIZE = 2000MB,
FILEGROWTH = 10% )
GO
My question is, is there a way to not specify the FILENAME option and have it select a default? I am trying to create a standardized query that will create a Db on any machine. For instance if the SQL directory is set up on the D:\ drive, my sql file will fail. How can I prevent this?