2017-01-06 1 views
0

ローカルからホスティングにデータベースをアップロードしようとしています。私はこのエラーを受け取るServer 2008を使用して、私は自分のデータベースをアップロードすると、2012年を使用してホスティングしています:「データベース 『dbUserの』という名前のオブジェクトが既に存在し、」データベースに「dbUser」という名前のオブジェクトが既にあります

私は解決することができますどのようにこの問題?

USE [phanthi3_db] 
 
GO 
 
/****** Object: Table [dbo].[dbUser] Script Date: 01/04/2017 15:20:31 ******/ 
 
SET ANSI_NULLS ON 
 
GO 
 
SET QUOTED_IDENTIFIER ON 
 
GO 
 
SET ANSI_PADDING ON 
 
GO 
 
CREATE TABLE [dbo].[dbUser](
 
\t [ID] [int] IDENTITY(1,1) NOT NULL, 
 
\t [Type] [int] NULL, 
 
\t [Name] [nvarchar](50) NULL, 
 
\t [UserName] [varchar](50) NULL, 
 
\t [Pass] [nvarchar](50) NULL, 
 
\t [Status] [bit] NULL, 
 
CONSTRAINT [PK_dbUser] PRIMARY KEY CLUSTERED 
 
(
 
\t [ID] 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 
 
SET ANSI_PADDING OFF 
 
GO 
 
SET IDENTITY_INSERT [dbo].[dbUser] ON 
 
INSERT [dbo].[dbUser] ([ID], [Type], [Name], [UserName], [Pass], [Status]) VALUES (1, 1, N'namlinhvn', N'namlinhvn', N'E10ADC3949BA59ABBE56E057F20F883E', 1) 
 
SET IDENTITY_INSERT [dbo].[dbUser] OFF 
 
/****** Object: Table [dbo].[dbNewsType] Script Date: 01/04/2017 15:20:31 ******/ 
 
SET ANSI_NULLS ON 
 
GO 
 
SET QUOTED_IDENTIFIER ON 
 
GO 
 
SET ANSI_PADDING ON 
 
GO 
 
CREATE TABLE [dbo].[dbNewsType](
 
\t [ID] [int] IDENTITY(1,1) NOT NULL, 
 
\t [Name] [nvarchar](100) NULL, 
 
\t [ImageURL] [varchar](50) NULL, 
 
\t [Status] [bit] NOT NULL, 
 
\t [ViewCount] [int] NULL, 
 
\t [SEOName] [nvarchar](100) NULL, 
 
\t [OderBy] [int] NULL, 
 
\t [IsIndex] [bit] NULL, 
 
CONSTRAINT [PK_dbNewsType] PRIMARY KEY CLUSTERED 
 
(
 
\t [ID] 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 
 
SET ANSI_PADDING OFF 
 
GO 
 
SET IDENTITY_INSERT [dbo].[dbNewsType] ON 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (1, N'Công nghệ', N'', 1, 0, N'0', 1, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (2, N'Đời sống', N'', 1, 0, N'0', 2, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (4, N'Khám phá', N'', 1, 0, N'', 0, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (5, N'Mẹo vặt', N' ', 1, 0, N'0', 0, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (6, N'Video nổi bật', N' ', 1, 0, N'0', 0, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (7, N'Hàng xách tay Úc', N' ', 1, 0, N'0', 0, 1) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (8, N'Công nghệ mới', N' ', 1, 0, N'0', 1, 0) 
 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (9, N'Khoa học', N'', 1, 0, N'', 0, 0) 
 
SET IDENTITY_INSERT [dbo].[dbNewsType] OFF 
 
/****** Object: Table [dbo].[dbNewsDictionary] Script Date: 01/04/2017 15:20:31 ******/ 
 
SET ANSI_NULLS ON 
 
GO 
 
SET QUOTED_IDENTIFIER ON 
 
GO 
 
CREATE TABLE [dbo].[dbNewsDictionary](
 
\t [Id] [int] NOT NULL, 
 
\t [Subject] [nvarchar](max) NULL, 
 
\t [Description] [nvarchar](max) NULL, 
 
\t [MainContent] [nvarchar](max) NULL, 
 
\t [SEOsubject] [nvarchar](50) NULL, 
 
CONSTRAINT [PK_dbNewsDictionary_1] PRIMARY KEY CLUSTERED 
 
(
 
\t [Id] 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

と、このようなエラーが出る:

Changed database context to 'phanthi3_db'. 

Changed database context to 'phanthi3_db'. 

CREATE TABLE [dbo].[dbUser]( 
[ID] [int] IDENTITY(1,1) NOT NULL, 
[Type] [int] NULL, 
[Name] [nvarchar](50) NULL, 
[UserName] [varchar](50) NULL, 
[Pass] [nvarchar](50) NULL, 
[Status] [bit] NULL, 
CONSTRAINT [PK_dbUser] PRIMARY KEY CLUSTERED 
( 
[ID] ASC 
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 
) ON [PRIMARY] 
Msg 2714, Level 16, State 6, Line number 1 
There is already an object named 'dbUser' in the database. 

SET IDENTITY_INSERT [dbo].[dbUser] ON 
INSERT [dbo].[dbUser] ([ID], [Type], [Name], [UserName], [Pass], [Status]) VALUES (1, 1, N'namlinhvn', N'namlinhvn', N'E10ADC3949BA59ABBE56E057F20F883E', 1) 
SET IDENTITY_INSERT [dbo].[dbUser] OFF 
/****** Object: Table [dbo].[dbNewsType] Script Date: 01/04/2017 15:20:31 ******/ 
SET ANSI_NULLS ON 
Msg 2627, Level 14, State 1, Line number 2 
Violation of PRIMARY KEY constraint 'PK_dbUser'. Cannot insert duplicate key in object 'dbo.dbUser'. The duplicate key value is (1). 

Msg 3621, Level 0, State 0, Line number 2 
The statement has been terminated. 

CREATE TABLE [dbo].[dbNewsType]( 
[ID] [int] IDENTITY(1,1) NOT NULL, 
[Name] [nvarchar](100) NULL, 
[ImageURL] [varchar](50) NULL, 
[Status] [bit] NOT NULL, 
[ViewCount] [int] NULL, 
[SEOName] [nvarchar](100) NULL, 
[OderBy] [int] NULL, 
[IsIndex] [bit] NULL, 
CONSTRAINT [PK_dbNewsType] PRIMARY KEY CLUSTERED 
( 
[ID] ASC 
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 
) ON [PRIMARY] 
Msg 2714, Level 16, State 6, Line number 1 
There is already an object named 'dbNewsType' in the database. 

SET IDENTITY_INSERT [dbo].[dbNewsType] ON 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (1, N'Công nghệ', N'', 1, 0, N'0', 1, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (2, N'Đời sống', N'', 1, 0, N'0', 2, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (4, N'Khám phá', N'', 1, 0, N'', 0, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (5, N'Mẹo vặt', N' ', 1, 0, N'0', 0, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (6, N'Video nổi bật', N' ', 1, 0, N'0', 0, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (7, N'Hàng xách tay Úc', N' ', 1, 0, N'0', 0, 1) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (8, N'Công nghệ mới', N' ', 1, 0, N'0', 1, 0) 
INSERT [dbo].[dbNewsType] ([ID], [Name], [ImageURL], [Status], [ViewCount], [SEOName], [OderBy], [IsIndex]) VALUES (9, N'Khoa học', N'', 1, 0, N'', 0, 0) 
SET IDENTITY_INSERT [dbo].[dbNewsType] OFF 
/****** Object: Table [dbo].[dbNewsDictionary] Script Date: 01/04/2017 15:20:31 ******/ 
SET ANSI_NULLS ON 
Msg 2627, Level 14, State 1, Line number 2 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (1). 

Msg 2627, Level 14, State 1, Line number 3 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (2). 

Msg 2627, Level 14, State 1, Line number 4 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (4). 

Msg 2627, Level 14, State 1, Line number 5 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (5). 

Msg 2627, Level 14, State 1, Line number 6 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (6). 

Msg 2627, Level 14, State 1, Line number 7 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (7). 

Msg 2627, Level 14, State 1, Line number 8 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (8). 

Msg 2627, Level 14, State 1, Line number 9 
Violation of PRIMARY KEY constraint 'PK_dbNewsType'. Cannot insert duplicate key in object 'dbo.dbNewsType'. The duplicate key value is (9). 

Msg 3621, Level 0, State 0, Line number 2 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 3 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 4 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 5 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 6 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 7 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 8 
The statement has been terminated. 

Msg 3621, Level 0, State 0, Line number 9 
The statement has been terminated. 

CREATE TABLE [dbo].[dbNewsDictionary]( 
[Id] [int] NOT NULL, 
[Subject] [nvarchar](max) NULL, 
[Description] [nvarchar](max) NULL, 
[MainContent] [nvarchar](max) NULL, 
[SEOsubject] [nvarchar](50) NULL, 
CONSTRAINT [PK_dbNewsDictionary_1] PRIMARY KEY CLUSTERED 
( 
[Id] ASC 
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DU 

答えて

0

エラーは、オブジェクトがすでに存在していることを語っています。確認するために目的地を確認してください。スクリプトを複数回実行しましたか?これは問題の一部である可能性があります。すでにオブジェクトを作成しています。また、あなたのデータベースを "アップロード"することはどういう意味ですか?

関連する問題