All posts

전체 글

전체 Zone 목록 조회

> dnscmd /EnumZones

 

Zone 파일 Export

> dnscmd /ZoneExport <영역이름> <파일명>
> dnscmd /ZoneExport domain domain.zone

 

전체 Record 목록 조회

> dnscmd /EnumRecords <영역이름> .
> dnscmd /EnumRecords domain .

// export
> dnscmd /EnumRecords <영역이름> . > <파일명>
> dnscmd /EnumRecords domain . > domain.record.full

 

하위 Record 목록 조회

> dnscmd /EnumRecords <영역이름> . /Child
> dnscmd /EnumRecords domain . /Child

// export
> dnscmd /EnumRecords <영역이름> . /Child > <파일명>
> dnscmd /EnumRecords domain . /Child > domain.record

 

vi 또는 vim 에디터를 실행한 상태에서 명령모드(:)로 실행.

 :g/^#/d

 

위 명령어는 '#'으로 시작하는 행을 모두 지운다.

version: Microsoft SQL Server 2012 (SP3)

 

! 사용 중인 프로시저가 있을 경우 detach가 진행 되지 않는다.
! 운영 서비스에 영향이 있는지 확인해보고 오프라인 전환 후 진행.

 

! If the procedure is running or using DB, you can't detach the Database. 
! First, you have to check the Service in operation. After that, switching the database offline.

use master;
GO
EXEC sp_detach_db @dbname = N'mydb';
GO

 

! detach 후, mdf 및 ldf 파일 복사 진행.
! After detach the databse, you can copy the mdf and ldf file.

! 복사가 완료 된 후, Attach 진행.
! if the file copy is finished normally, you can attach the DB with new path.

USE master;
GO
CREATE DATABASE PlatformService
    ON (FILENAME = 'H:\SQL_DATA3\mydb.mdf'),
    (FILENAME = 'H:\SQL_DATA3\mydb_log.ldf')
    FOR ATTACH;
GO

 

! attach 후 정상 작동 여부 확인. DB를 오프라인으로 전환했을 경우, 온라인 전환.

! When the tasks are completed successfully, Check that the DB is working properly. 
! If you switched the database offline, you have to switching the db status to online.

version: Microsoft SQL Server 2012 (SP3)

 

! If the procedure is running or using DB, you can't detach the Database.
! First, you have to check the Service in operation. After that, switching the database offline.

use master;
GO
EXEC sp_detach_db @dbname = N'mydb';
GO

 

! After detach the databse, you can copy the mdf and ldf file.

 

! if the file copy is finished normally, you can attach the DB with new path.

USE master;
GO
CREATE DATABASE PlatformService
    ON (FILENAME = 'H:\SQL_DATA3\mydb.mdf'),
    (FILENAME = 'H:\SQL_DATA3\mydb_log.ldf')
    FOR ATTACH;
GO

 

! When the tasks are completed successfully, Check that the DB is working properly.
! If you switched the database offline, you have to switching the db status to online.

IP변경

/etc/sysconfig/network-scripts/<인터페이스>
 IPADDR="<IP>" 

# ifup <인터페이스> 



history 타임스탬프

/etc/profile 
  HISTTIMEFORMAT="[%F %T] " 
  export HISTTIMEFORMAT 

or

# sed -i '10a\\export HISTTIMEFORMAT\n' /etc/profile 
# sed -i '10a\\HISTTIMEFORMAT="[%F %T] "' /etc/profile 

 


ssh root 접근 차단

/etc/ssh/sshd_config 
 PermitRootLogin no 

# sed -i "s/tLogin yes/tLogin no/g" /etc/ssh/sshd_config 

# systemctl restart sshd 



TimeZone 변경

# timedatectl set-timezone Asia/Seoul 

 


Prompt 전체 경로 표시

# echo 'export PS1="[\u@\h \w]\\$ "' > /etc/profile.d/prompt.sh