728x90

 

 

 

 

 

 

좋은 분의 행적을 만나는 건

큰 행운이 아닐 수 없다.

세상에는 말없이 훌륭한 일을 하시는 많은 고마운 분들이 존재한다.

허된 욕망을 버리고 사람이 살아야할 진정한 가치를 전해주는 분들,

그 분들의 행적을 따라 가는 것 역시 큰 행운이겠지.

728x90

'향기나는글' 카테고리의 다른 글

1만달러의 힘  (0) 2013.07.30
회장의 유서  (0) 2013.07.19
아홉을 가진 사람  (0) 2013.03.26
만나라 사랑할 시간이 없다  (0) 2013.02.08
사랑하는 사람을 위한 기도 - 김옥림  (0) 2013.02.03
728x90

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90

'하늘을 사랑한 사람 여행기' 카테고리의 다른 글

계룡산 두번째  (0) 2014.09.22
계룡산 첫번째  (0) 2014.09.22
가평 아침고요수목원 두번째  (0) 2013.06.23
가평 아침 고요수목원 첫번째  (0) 2013.06.23
청평 드라이브~  (0) 2013.05.19
728x90

 

 

 

 

 

 

 

 

 

 

 

 

728x90

'하늘을 사랑한 사람 여행기' 카테고리의 다른 글

계룡산 첫번째  (0) 2014.09.22
가평 아침고요수목원 세번째  (0) 2013.06.24
가평 아침 고요수목원 첫번째  (0) 2013.06.23
청평 드라이브~  (0) 2013.05.19
벗꽃의 향연  (0) 2013.04.14
728x90

 

 

 

 

 

 

 

 

 

 

728x90
728x90

입력받은 데이터를 서버에서 처리할 수 있는 문자셋으로 변환해서 전송하게 된다.

     <form name=”fForm” method=”post” action=”" accept-charset=”utf-8″>

     </form>

     현재 페이지의 문자셋과 관계없이 전송시에 accept-charset 에 지정된 문자셋으로 변환해서 전송하게 된다.

728x90

'프로그래밍 > 웹표준' 카테고리의 다른 글

jquery input type='file' 초기화 처리  (0) 2016.07.12
홈페이지 생성시 웹 폰트 사용하기  (0) 2015.11.24
다음 사진 올리는 방법  (0) 2015.08.12
html5 기본구조  (0) 2013.08.09
if IE 명령어 사용법  (0) 2012.10.25
728x90

Session 관리

 

1. 세션 상태 모드

 

1) InProc ( Default )

 

- 세션 정보를 웹서버 메모리에 저장

- 데이터베이스 이용하는 것보다 성능 우월

- 웹 서비스 재부팅시 모든 세션 사라짐

 

 

2) StateServer

 

- 윈도우 서버 관리도구에 있는 ASP.NET State Service 라는 서비스 데몬의 메모리 이용

- IIS 재부팅 되어도 세션 정보 유지

- 하나의 서비스 데몬이므로 여러개의 웹서버에서 하나의 세션관리 가능해짐

- 윈도우 시작시 수정 시작 설정되어 있음 ( StateServer 를 하려면 자동 고려 하거나 서비스 시작 시켜야 함 )

- 웹서버 재부팅시에는 세션 사라짐

 

 

3) SQL Server

 

- 세션 정보를 SQL Server 에서 저장 관리

- 웹서버 재부팅되어도 세션 유지

- 여러개의 웹서버에서 하나의 세션관리 가능

- 물리적인 디스크 I/O 가 발생되어 가장 느린 상테 관리 방법

 

 

2. 세션 상태 모드 설정

 

1) web.config 에서 설정

  1. <configuration>  
  2.     <system.web>  
  3.         <sessionState mode="off || StateServer || SQLServer " ~~ />  
  4.     </system.web>  
  5. </configuration>  

 

 

2) 각 소스상에서 System.Web.SessionState.HttpSession-State.Mode 속성으로 셋팅

 

 

 

[SQL Server Settion 설정 방법]

 

1. DB 에 ASPState DB 생성

 

< DB 서버 cmd 창에서 아래의 경로로 aspnet_regsql 실행 >

 

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regsql -S "ServerHost" -U sa -P [sa password] -ssadd -sstype c -d "ASPState"

(ex: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql -S localhost -U sa -P your-password -ssadd -sstype p)

 

위 명령어를 치면 아래 < 그림1 > 의 ASPState 라는 DB 및 관련 SP 들이 생김

 

<주의사항>

Password 등의 글자에 "&" 등이 있으면 전체 명령어를 인식하는것이 아닌 "&" 앞까지 인식.

따라서 암호에 "&" 가 있으면 aspnet_regsql -S localhost -U sa -ssadd -sstype p 로 "-P"를 빼서 명령어를 친 다음 암호 입력창이 나오면 암호입력

 

 

 

2. Web.config 설정

  1. <configuration>  
  2.     <system.web>  
  3.             <sessionState mode="SQLServer"   
  4. sqlConnectionString="data source=ServerHost; User ID=SessionUserID; Password=SessionUserPassword" timeout="3600" />  
  5.     </system.web>  
  6. </configuration>  

 

- 사용하고자 하는 User ID의 DB 계정은 ASPState에 대해 db_owner 이거나 아니면 최소한 db_datareader, db_datawriter 역할과 자동 생성되는 Stored procedure에 대해 실행 권한이 있어야 함.

 

 

< 그림1 >

 

 

 

 

< aspnet_regsql 파라미터 >

 

Parameter

Description

-S [Server Name] Sql Server name or IP address, where sessions will be stored
-E  Windows authentication is used to access SQL Server
-U [User Name] User name, if SQL authentication is used
-P [Password] Password, if SQL authentication is used
-D [Database Name] Database name. This parameter is used if parameter -sstype is equal to "c", which means that custom database is used as session storage.
-ssadd Abbreviation of "Session State Add". This option adds session state database.
-ssremove  This parameter removes existing session state database.
-sqlexportonly [Script File Name or Full Path]

 If this parameter is used, program will not execute any SQL, but just create T-SQL script which can be executed later on server(s). This is useful in shared hosting scenario.

Type of session state storage. There are three possible values:

-sstype [t|p|c] t, means temporary storage. Tables are created in temdb database. In this case session is lost if SQL Server restarts,
 p, represents persistent storage. Session state tables are created in AspState database,
 c, custom storage. In this case, you specify database name where sessions will be stored. Database name is set using -D parameter.

 

 

< ASPStateTempSessions 테이블, ASPStateTempApplications 테이블 내용 >

 

- 사이트에 접속된 사용자가 있으면 ( 처음 이거나, 세션기간만료 사용자 ) ASPStateTempSessions 테이블에 Row 생성 ( 만료일자: web.config 값에 따라 셋팅 )

 

 


728x90
728x90

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

728x90
728x90

--2008 이전 버젼의 경우

BACKUP LOG EchoRPT WITH NO_LOG

DBCC SHRINKDATABASE (EchoRPT, TRUNCATEONLY)

--2008 버젼의 경우

GO
-- Truncate the log by changing the database recovery model to SIMPLE.

ALTER DATABASE DB이름
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DB이름_log, 1); --1mb로 축소
GO
-- Reset the database recovery model.
ALTER DATABASE DB이름
SET RECOVERY FULL;
GO

728x90

+ Recent posts