ProgrammingB52
Technical User
I have 2 long script files the first starts with:
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'empExpense')
DROP DATABASE [empExpense]
GO
CREATE DATABASE [empExpense] ON (NAME = N'empExpense_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\empExpense_Data.MDF' , SIZE = 1, FILEGROWTH = 10%) LOG ON (NAME = N'empExpense_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\empExpense_Log.LDF' , SIZE = 1, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
GO
use [empExpense]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_ApprovalWorkflow_ApprovalLevel]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[ApprovalWorkflow] DROP CONSTRAINT FK_ApprovalWorkflow_ApprovalLevel
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_EmployeeApprovalLevels_ApprovalLevel]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeApprovalLevels] DROP CONSTRAINT FK_EmployeeApprovalLevels_ApprovalLevel
GO
....and the file goes on etc.........
HOW DO I IMPORT THESE SCRIPT FILES OR RUN THEM IN SQL SERVER 2000?
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'empExpense')
DROP DATABASE [empExpense]
GO
CREATE DATABASE [empExpense] ON (NAME = N'empExpense_Data', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\empExpense_Data.MDF' , SIZE = 1, FILEGROWTH = 10%) LOG ON (NAME = N'empExpense_Log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL\data\empExpense_Log.LDF' , SIZE = 1, FILEGROWTH = 10%)
COLLATE SQL_Latin1_General_CP1_CI_AS
GO
use [empExpense]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_ApprovalWorkflow_ApprovalLevel]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[ApprovalWorkflow] DROP CONSTRAINT FK_ApprovalWorkflow_ApprovalLevel
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FK_EmployeeApprovalLevels_ApprovalLevel]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [dbo].[EmployeeApprovalLevels] DROP CONSTRAINT FK_EmployeeApprovalLevels_ApprovalLevel
GO
....and the file goes on etc.........
HOW DO I IMPORT THESE SCRIPT FILES OR RUN THEM IN SQL SERVER 2000?