블로그 이미지
LifeisSimple

calendar

1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28

Notice

'2013/02'에 해당되는 글 2

  1. 2013.02.20 [MSSQL] Database 서버 전체 복구
  2. 2013.02.05 [MSSQL] sysfiles ...
2013. 2. 20. 14:09 Brain Trainning/DataBase

DB 서버 전체 간단한 복구 방법

  • MSSQL 을 기존 서버와 동일한 위치에 설치 (드라이브 폴더 모두)
    - master DB에는 각 DB들의 기존 정보가 들어 있기 때문에 Restore 하고 난 이후에 서비스를 올리면 기존 위치에서 DB들을 찾게 됨.
    - 새로 설치되는 DB는 기존 서버의 버전과 동일해야 master 가 복원됨
  • SQL Server 서비스를 Single 모드로 실행 -m 옵션
  • Restore Commander 로 Master DB를 복원 (미리 동일한 드라이브 및 위치에 MDF, LDF 들이 있으면 master 복구후에 바로 DB들을 서비스 할 수 있음)
  • SQL Server를 정상시작
  • msdb 복원.
  • 사용자 DB파일들이 만일 기존 서버와 동일한 위치라면 별도 작업 필요 없음.


msdb 를 복원하고 나서 이런 오류가 뜬다면.. 

Service Broker is disabled in MSDB or MSDB failed to start

이런 오류를 만나면 아래의 내용을 참고하면 됨. (아래의 링크는 접기 안에 내용을 첨부했습니다.)

출처 : http://www.lifeasbob.com/code/kb_articles.aspx?article_Id=60&CatId=39


posted by LifeisSimple
2013. 2. 5. 11:28 Brain Trainning/DataBase

2000 버전에서의 Sysfiles 정보


Contains one row for each file in a database. This system table is a virtual table; it cannot be updated or modified directly.

Column nameData typeDescription
fileidsmallintFile identification number unique for each database.
groupidsmallintFilegroup identification number.
sizeintSize of the file (in 8-KB pages).
maxsizeintMaximum file size (in 8-KB pages). A value of 0 indicates no growth, and a value of -1 indicates that the file should grow until the disk is full.
growthintGrowth size of the database. A value of 0 indicates no growth. Can be either the number of pages or the percentage of file size, depending on value of status. If status contains 0x100000, then growthis the percentage of file size; otherwise, it is the number of pages.
statusintStatus bits for the growth value in either megabytes (MB) or kilobytes (K).

0x1 = Default device.
0x2 = Disk file.
0x40 = Log device.
0x80 = File has been written to since last backup.
0x4000 = Device created implicitly by the
CREATE DATABASE statement.
0x8000 = Device created during database
creation.
0x100000 = Growth is in percentage, not pages.

perfintReserved.
namenchar(128)Logical name of the file.
filenamenchar(260)Name of the physical device, including the full path of the file.

posted by LifeisSimple
prev 1 next