sql 파일을 쿼리 분석기 에서 읽어들여서
실행(Execute query) 시키면 다음과 같은 에러가 납니다.
Server: Msg 2760, Level 16, State 1, Line 2
Specified owner name 'oyesmall' either does not exist or you do not have permission to use it.
원래 sql 파일의 내용은 다음과 같습니다. 도움말씀 부탁드립니다.
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[FK_Comment_Board]') and OBJECTPROPERTY(id, N'IsForeignKey') = 1)
ALTER TABLE [oyesmall].[Comment] DROP CONSTRAINT FK_Comment_Board
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[Comment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[Comment]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[MyBox]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[MyBox]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[Statistic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[Statistic]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[banner]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[banner]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[board]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[board]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[category]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[category]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[goods]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[goods]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[juke]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[juke]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[my_juke]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[my_juke]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[notice]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[notice]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[poll]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[poll]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[poll_tail]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[poll_tail]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[post]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[post]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[seller]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[seller]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[shop_cart]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[shop_cart]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[tbl_temp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[tbl_temp]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[visit]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[visit]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[oyesmall].[members]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [oyesmall].[members]
GO
CREATE TABLE [oyesmall].[Comment] (
[Co_seq] [int] IDENTITY (1, 1) NOT NULL ,
[num] [int] NOT NULL ,
[Co_name] [varchar] (20) COLLATE Korean_Wansung_CI_AS NOT NULL ,
[Co_date] [smalldatetime] NOT NULL ,
[Co_Content] [varchar] (500) COLLATE Korean_Wansung_CI_AS NULL ,
[co_pass] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[master] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[MyBox] (
[m_num] [bigint] IDENTITY (1, 1) NOT NULL ,
[SessionID] [bigint] NULL ,
[MyBox] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[Statistic] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[user_ip] [varchar] (15) COLLATE Korean_Wansung_CI_AS NOT NULL ,
[user_agent] [varchar] (50) COLLATE Korean_Wansung_CI_AS NOT NULL ,
[refer_page] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[log_time] [datetime] NOT NULL ,
[s_mon] [tinyint] NULL ,
[s_day] [tinyint] NULL ,
[s_hour] [tinyint] NULL ,
[counter] [tinyint] NULL ,
[s_year] [tinyint] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[banner] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[b_name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[b_room] [varchar] (200) COLLATE Korean_Wansung_CI_AS NULL ,
[nomi] [int] NULL ,
[image1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[image2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[cate] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[top3] [int] NULL ,
[category_top] [int] NULL ,
[mainimage] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[board] (
[num] [int] NOT NULL ,
[name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[email] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[title] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[content] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[postdate] [datetime] NULL ,
[readcount] [int] NULL ,
[coding] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[pwd] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ref] [int] NULL ,
[r_step] [int] NULL ,
[reforder] [int] NULL ,
[home] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tank] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[master] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[category] (
[c_no] [int] NOT NULL ,
[c_title] [text] COLLATE Korean_Wansung_CI_AS NOT NULL ,
[ref] [int] NULL ,
[ref_n] [float] NULL ,
[lev] [int] NULL ,
[step] [float] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[goods] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[g_code] [bigint] NULL ,
[g_name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[g_com] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[or_p] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[Weekly_Best] [int] NULL ,
[color] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[t_choice] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[g_row] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[g_wid] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[point] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ea] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[sphoto] [varchar] (255) COLLATE Korean_Wansung_CI_AS NULL ,
[bphoto] [varchar] (255) COLLATE Korean_Wansung_CI_AS NULL ,
[coding] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[content] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[filesize] [int] NULL ,
[postdate] [datetime] NULL ,
[editdate] [datetime] NULL ,
[feature] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[r_ea] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ca1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ca2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ca3] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[cphoto] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[Rooms] [varchar] (300) COLLATE Korean_Wansung_CI_AS NULL ,
[best_choice] [int] NULL ,
[m_choice] [int] NULL ,
[choice] [int] NULL ,
[event_2] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[juke] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[title] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[category] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[mp3] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[filesize] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[postdate] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[fileroom] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[my_juke] (
[ck] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[sessionID] [bigint] NULL ,
[mp3] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[j_num] [bigint] IDENTITY (1, 1) NOT NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[notice] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[title] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[content] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[branch] [int] NULL ,
[coding] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[postdate] [smalldatetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[poll] (
[p_num] [int] IDENTITY (1, 1) NOT NULL ,
[p_name] [varchar] (20) COLLATE Korean_Wansung_CI_AS NULL ,
[p_email] [varchar] (30) COLLATE Korean_Wansung_CI_AS NULL ,
[p_title] [varchar] (300) COLLATE Korean_Wansung_CI_AS NULL ,
[p_qcount] [int] NULL ,
[p_over] [tinyint] NULL ,
[p_date] [datetime] NULL ,
[p_pass] [varchar] (20) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q1] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q2] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q3] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q4] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q5] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q6] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q7] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q8] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q9] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[p_q1_count] [int] NULL ,
[p_q2_count] [int] NULL ,
[p_q3_count] [int] NULL ,
[p_q4_count] [int] NULL ,
[p_q5_count] [int] NULL ,
[p_q6_count] [int] NULL ,
[p_q7_count] [int] NULL ,
[p_q8_count] [int] NULL ,
[p_q9_count] [int] NULL ,
[p_vote_count] [int] NULL ,
[p_total_count] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[poll_tail] (
[t_num] [int] NULL ,
[t_name] [varchar] (20) COLLATE Korean_Wansung_CI_AS NULL ,
[t_email] [varchar] (30) COLLATE Korean_Wansung_CI_AS NULL ,
[t_content] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[t_date] [datetime] NULL ,
[t_ip] [varchar] (15) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[post] (
[PostNo] [nvarchar] (6) COLLATE Korean_Wansung_CI_AS NULL ,
[Si] [nvarchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[Gu] [nvarchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[Dong] [nvarchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[PostEtc] [nvarchar] (50) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[seller] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[g_code] [bigint] NULL ,
[order_name1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_goods] [varchar] (200) COLLATE Korean_Wansung_CI_AS NULL ,
[order_num] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_price] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_kind] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_date] [datetime] NULL ,
[order_totalprice] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_address] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[order_status] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_tel1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_tel2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[order_name2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[cardno] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[bankno] [varchar] (100) COLLATE Korean_Wansung_CI_AS NULL ,
[paidman] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[bank_amt] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[card_amt] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[shop_cart] (
[sessionID] [bigint] NULL ,
[good_code] [bigint] NULL ,
[good_ea] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[tbl_temp] (
[sessionID] [int] NULL ,
[userID] [varchar] (10) COLLATE Korean_Wansung_CI_AS NULL ,
[passwd] [varchar] (10) COLLATE Korean_Wansung_CI_AS NULL ,
[writedate] [smalldatetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[visit] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[email] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[home] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[content] [text] COLLATE Korean_Wansung_CI_AS NULL ,
[postdate] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [oyesmall].[members] (
[num] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[passwd] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[passwd1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[name] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[jumin1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[jumin2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[birth_yy] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[birth_mm] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[birth_dd] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[birth_gbn] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[ismarry] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[address] [varchar] (150) COLLATE Korean_Wansung_CI_AS NULL ,
[tel1_1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tel1_2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tel1_3] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[whereTel1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tel2_1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tel2_2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[tel2_3] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[whereTel2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[hp1] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[hp2] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[hp3] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[job] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[receiveType] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[mail_flag] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[email] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[postdate] [datetime] NULL ,
[editdate] [datetime] NULL ,
[point] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[passwd_q] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL ,
[passwd_a] [varchar] (50) COLLATE Korean_Wansung_CI_AS NULL
) ON [PRIMARY]
GO
|