Date: Mon, 20 Oct 2003 16:14:43 +0900
From: "¾å¿ù¡¡ÌÀÆÁ" <who@sub.example.jp>
¤ªÀ¤Ïäˤʤê¤Þ¤¹¡£
Transact-SQL¤Ç¤¹¤¬°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
go¤Ï¾Êά¤µ¤»¤Æ¤¤¤¿¤À¤¤Þ¤¹¡£
A¥µ¡¼¥Ð¡¼¡¢B¥µ¡¼¥Ð¡¼¤Ç°Ê²¼¤ÎTransact-SQL¤ò
¼Â¹Ô¤·¤Þ¤·¤¿¡£
¡sa¤Ç¥í¥°¥¤¥ó¤¹¤ë
osql -U sa -P aaa
¢¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®¤¹¤ë
CREATE DATABASE TEST
£¥Ç¡¼¥¿¥Ù¡¼¥¹¥æ¡¼¥¶¡¼¤òºîÀ®¤¹¤ë
sp_addlogin test,test,TEST
£¥µ¡¼¥Ð¡¼¤Ë¥í¥°¥¤¥ó¤òÅÐÏ¿¤¹¤ë
use TEST
sp_grantdbaccess test
¤¥í¥°¥¤¥ó¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¥í¡¼¥ëÆâ¤Î¸¢¸Â¤ò³ä¤êÅö¤Æ¤ë
sp_addrolemember db_owner,test
¥¥Ç¡¼¥¿¥Ù¡¼¥¹Ãæ¤Î¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤¹¤ë
¡¡¡Ê¥æ¡¼¥¶¡¼¤òÀÚ¤êÂؤ¨¤ë¡Ë
osql -U test -P test
create table test(
id¡¡integer
)
¥ª¥Ö¥¸¥§¥¯¥È¤Î¥»¥¥å¥ê¥Æ¥£
¡Ê¥µ¡¼¥Ð¡¼¥í¡¼¥ë¤ÎÀßÄê¤Î¤³¤È¤Ç¤è¤í¤·¤¤¤Ç¤·¤ç¤¦¤«¡©¡Ë¤Ï
ÀßÄꤷ¤Æ¤ª¤ê¤Þ¤»¤ó¡£
¤³¤Î¾õÂ֤ǡ¢£Å£î£ô£å£ò£ð£ò£é£ó£å¡¡£Í£á£î£á£ç£å£ò¤ò»ÈÍѤ·¤Æ
¡Ê£±¡Ë£Á¥µ¡¼¥Ð¡¼¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹TEST¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¤È¤ë
¡Ê£²¡Ë£Â¥µ¡¼¥Ð¡¼¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹TEST¤òºï½ü¤¹¤ë
¡Ê£³¡ËB¥µ¡¼¥Ð¡¼¤Ë£Á¥µ¡¼¥Ð¡¼¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¥Õ¥¡¥¤¥ë¤ò¥³¥Ô¡¼¤·¤Æ
¡¡¡¡Éü¸µ¤ò¹Ô¤¦¡ÊÉü¸µ¤â¤È¤Ï¥Ç¥Ð¥¤¥¹¤òÁªÂò¤·¥Õ¥¡¥¤¥ë¤ò»ØÄê¡Ë
Éü¸µ¸å¡¢test¥æ¡¼¥¶¡¼¤¬¥í¥°¥¤¥ó¤Ç¤¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¤Ê¤¯¤Ê¤ë
¡Ê¥Ç¡¼¥¿¥Ù¡¼¥¹TEST¤Ë¥í¥°¥¤¥ó¤¹¤ë¸¢¸Â¤Î¥Á¥§¥Ã¥¯¤¬³°¤ì¤Æ¤¤¤ë¡Ë
£Á¥µ¡¼¥Ð¡¼¤È£Â¥µ¡¼¥Ð¡¼¤ÏƱ¤¸¥É¥á¥¤¥óÆâ¤ËƱ»þ¤Ë¸ºß¤·¤Æ¤ª¤ê
£É£Ð¤È¥³¥ó¥Ô¥å¡¼¥¿¡¼Ì¾¤Ï°Û¤Ê¤ê¤Þ¤¹¡£
¥µ¡¼¥Ó¥¹¥Ñ¥Ã¥¯¤Ë¤Ä¤¤¤Æ¤Ï
¥Þ¥¤¥¯¥í¥½¥Õ¥È¡¡SQL¥µ¡¼¥Ð¡¼£²£°£°£°¡¡¥µ¡¼¥Ó¥¹¥Ñ¥Ã¥¯¡¡£³£á¤ò
¤¢¤Æ¤Æ¤¢¤ê¤Þ¤¹¡£
²¿Å٤⿽¤·Ìõ¤±¤¢¤ê¤Þ¤»¤ó¤¬
¤è¤í¤·¤¯¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹¡£
[MSDE/SQLServer¤Ë´Ø¤·¤Æ¡¢º£¡¢¤É¤ó¤Ê¤³¤È¤Ë¤ªº¤¤ê¤Ç¤¹¤«¡©] |
¤è¤í¤·¤±¤ì¤Ð¤ªº¤¤ê¤ÎÆâÍƤò¡¢ÅŻҥ᡼¥ë¤Ç¶µ¤¨¤Æ²¼¤µ¤¤¡£ |
¼ÁÌä¤òÅŻҥ᡼¥ë¤ÇºîÀ®¤¹¤ë
|
[¥¦¥£¥ó¥É¤òÊĤ¸¤ë][MSDE/SQLServer FAQ ][MSDE / MSDE2000 µ»½Ñ¥µ¥Ý¡¼¥È¾ðÊó°ìÍ÷]
|