¾È±Ô °øºÎ¹æ

MS-SQL > SYSTEM °ü·Ã ÇÔ¼ö

µî·ÏÀÏ : 2017-06-30 17:34 Á¶È¸¼ö : 52,678

1. APP_NAME()
         
OS À̸§À» ±¸ÇÑ´Ù. 
  
SELECT APP_NAME()

°á°ú -> Microsoft(R) Windows (R) 2000 Operating System

2. HOST_ID()       

È£½ºÆ® ¹øÈ£¸¦ ±¸ÇÑ´Ù.
  
SELECT HOST_ID()
°á°ú -> 1500


3. HOST_NAME()

¼­¹ö À̸§À» ±¸ÇÑ´Ù.
  
SELECT HOST_NAME()
°á°ú -> SSHONG

4. DB_ID, DB_NAME

DB_ID´Â µ¥ÀÌÅͺ£À̽ºÀÇ ID¸¦, DB_NAMEÀº µ¥ÀÌÅͺ£À̽ºÀÇ À̸§À» º¸¿©ÁÝ´Ï´Ù. 
Çü½Ä: DB_ID(µ¥ÀÌÅͺ£À̽º À̸§)
Çü½Ä: DB_NAME(µ¥ÀÌÅͺ£À̽º ID)         

SELECT DB_ID('MASTER'),DB_NAME(1)
°á°ú -> 1      master

5. SUSER_ID(), SUSER_NAME(), SYSTEM_USER

ÇöÀç ·Î±×ÀÎÇÑ »ç¿ëÀÚÀÇ ID¿Í À̸§À» º¸¿©ÁÝ´Ï´Ù.
Çü½Ä: SUSER_ID() ... SUSER_NAMEµµ µ¿ÀÏ.
Çü½Ä: SYSTEM_USER -> ±×³É »ç¿ë...

SELECT SUSER_ID(), SUSER_NAME(), SYSTEM_USER
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.