TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mike Jonson
NA
239
193.5k
Error in Sql scrypt
Nov 23 2011 11:06 AM
Hello
I call sql sqrypt in sql server 2008 for
to create the tables in the database
.
On a single computer run, the second all time is showing errors
I cant undestand why errors?
Its sql sqrypt:
USE [master]
GO
/****** Object: Database [InterDes] Script Date: 11/20/2011 20:17:58 ******/
CREATE DATABASE [InterDes] ON PRIMARY
( NAME = N'InterDes', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\InterDes.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'InterDes_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\InterDes_log.ldf' , SIZE = 1024KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [InterDes] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [InterDes].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [InterDes] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [InterDes] SET ANSI_NULLS OFF
GO
ALTER DATABASE [InterDes] SET ANSI_PADDING OFF
GO
ALTER DATABASE [InterDes] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [InterDes] SET ARITHABORT OFF
GO
ALTER DATABASE [InterDes] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [InterDes] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [InterDes] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [InterDes] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [InterDes] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [InterDes] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [InterDes] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [InterDes] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [InterDes] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [InterDes] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [InterDes] SET DISABLE_BROKER
GO
ALTER DATABASE [InterDes] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [InterDes] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [InterDes] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [InterDes] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [InterDes] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [InterDes] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [InterDes] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [InterDes] SET READ_WRITE
GO
ALTER DATABASE [InterDes] SET RECOVERY FULL
GO
ALTER DATABASE [InterDes] SET MULTI_USER
GO
ALTER DATABASE [InterDes] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [InterDes] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'InterDes', N'ON'
GO
USE [InterDes]
GO
/****** Object: Table [dbo].[InfoPages] Script Date: 11/20/2011 20:18:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[InfoPages](
[InfoID] [int] IDENTITY(1,1) NOT NULL,
[InfoTitle] [nvarchar](max) NOT NULL,
[InfoContent] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_InfoPages] PRIMARY KEY CLUSTERED
(
[InfoID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Fact] Script Date: 11/20/2011 20:18:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Fact](
[FactsID] [int] IDENTITY(1,1) NOT NULL,
[FactText] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Fact] PRIMARY KEY CLUSTERED
(
[FactsID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[User] Script Date: 11/20/2011 20:18:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User](
[UserID] [int] NOT NULL,
[UserName] [nchar](10) NOT NULL,
[Password] [nchar](10) NOT NULL,
[IsAdmin] [bit] NOT NULL,
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED
(
[UserID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Portfolio] Script Date: 11/20/2011 20:18:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Portfolio](
[PortfolID] [int] IDENTITY(1,1) NOT NULL,
[PortfolText] [nvarchar](max) NOT NULL,
CONSTRAINT [PK_Portfolio] PRIMARY KEY CLUSTERED
(
[PortfolID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: Table [dbo].[Picture] Script Date: 11/20/2011 20:18:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Picture](
[PictureID] [int] IDENTITY(1,1) NOT NULL,
[PictureName] [nvarchar](max) NOT NULL,
[PortfolID] [int] NOT NULL,
CONSTRAINT [PK_Picture] PRIMARY KEY CLUSTERED
(
[PictureID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object: ForeignKey [FK_Picture_Portfolio] Script Date: 11/20/2011 20:18:00 ******/
ALTER TABLE [dbo].[Picture] WITH CHECK ADD CONSTRAINT [FK_Picture_Portfolio] FOREIGN KEY([PortfolID])
REFERENCES [dbo].[Portfolio] ([PortfolID])
GO
ALTER TABLE [dbo].[Picture] CHECK CONSTRAINT [FK_Picture_Portfolio]
GO
And its errors:
Msg 5133, Level 16, State 1, Line 2
Directory lookup for the file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\InterDes.mdf" failed with the operating system error 3(failed to retrieve text for this error. Reason: 15105).
Msg 1802, Level 16, State 1, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'InterDes', the database does not exist, or the database is not in a state that allows access checks.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'InterDes', the database does not exist, or the database is not in a state that allows access checks.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'InterDes', the database does not exist, or the database is not in a state that allows access checks.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Msg 5011, Level 14, State 5, Line 1
User does not have permission to alter database 'InterDes', the database does not exist, or the database is not in a state that allows access checks.
..................................................................................................
I cant undestand why. Please, help)))
Reply
Answers (
0
)
How to get subtraction of two rows value
Can change the Sql Server port number?