database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
PostgreSQL
Firebird
Oracle
Informix
Sybase
ㆍMS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
MS-SQL Q&A 827 게시물 읽기
No. 827
sql 스크립트 실행으로 테이블 작성시 오류가 생깁니다. 도와주세요 --;
작성자
정문기(mk555)
작성일
2003-05-31 21:16
조회수
6,012
첨부파일: oyesmall.sql (29,194bytes)

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

이 글에 대한 댓글이 총 2건 있습니다.

Specified owner name 'oyesmall' either does not exist or you do not have permission to use it.

 

EM에서 만든 스크립트였다면(실제로 돌아가야하는 스크립트라면).... 잘모르겠지만...

직접 만든 스크립트라는 가정하에서 이야기 해드리죠.

 

지금 oyesmall이 제가 보기에는 DB명 인것 같은데..

스크립트에서는 소유자명으로 인식한것 같습니다.

 

제가 알기로 [DB명].[소유자].[테이블명] 이런식으로

선언을 해야하지 않을까요...? (아닌가?)

 

sa로 로그인 하신후 [oyesmall]..[Comment] 이렇게 하면 되지 않을까요? (sa면 소유자 생략)

김주형님이 2003-06-03 09:49에 작성한 댓글입니다.

소유권 때문에 그런거 맞고요

[oyesmall]<<< 이부분을

쿼리 분석기에서 메뉴에서 찾기를 눌러서

dbo로 모두 바꿔줘서 쿼리 날리시면

쫘라라락 하문서 될꺼에요 ^^

올챙이님이 2003-06-07 16:18에 작성한 댓글입니다.
[Top]
No.
제목
작성자
작성일
조회
830병목현상 [1]
오세현
2003-06-04
3740
829원격에서 디비 백업 가능한가요..초보가..??
이재영
2003-06-04
4116
828바이트 값 구하기. [1]
칠칠이
2003-06-04
4218
827sql 스크립트 실행으로 테이블 작성시 오류가 생깁니다. 도와주세요 --; [2]
정문기
2003-05-31
6012
826공백 제거 커리문.. [4]
칠칠이
2003-05-30
12561
825MS-SQL 7.0 유니코드 관련 질문입니다.
이필용
2003-05-29
4188
823msdb를 backup 받은것을 복원시킬 때 문의 [1]
김병훈
2003-05-28
5176
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.017초, 이곳 서비스는
	PostgreSQL v16.4로 자료를 관리합니다