Pages

Bài đăng phổ biến

Tuesday, December 27, 2011

Backup Mssql while Mssql server is running

Script to backup all database mssql  :

DECLARE @name VARCHAR(50)
DECLARE @path VARCHAR(256)
DECLARE @fileName VARCHAR(256)
DECLARE @fileDate VARCHAR(20)

SET @path = 'C:\backup'

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

DECLARE db_cursor CURSOR FOR
SELECT name
FROM master.dbo.sysdatabases
WHERE name NOT IN ('master','model','msdb','tempdb')

OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name

WHILE @@FETCH_STATUS = 0
BEGIN
SET @fileName = @path + @name + '_' + @fileDate + '.BAK'
BACKUP DATABASE @name TO DISK = @fileName with noinit

FETCH NEXT FROM db_cursor INTO @name
END

CLOSE db_cursor
DEALLOCATE db_cursor

 To backup daily or schedule to backup all database you should our script :
http://download.0937686468.com/sqlvn/backupdatabases.rar
(This app is written by my friend http://sqlvn.com )


How to use above application ? 
You just extract this file and edit file MrNhanApp.exe.config that I set the red color :
    <add key="ConnectionStr" value="server=1.1.1.1;database=master;uid=sa;pwd=1111"/>


Nguyen Si Nhan

Monday, December 26, 2011

Vituozzo : Install yum for vps

You just login server via ssh then type this cmd:
#vzpkg install -p containerID yum

That's all

Nguyen Si Nhan

Sunday, December 25, 2011

SPF and DKIM with google app

If you use free email with google app ,you should declaration spf and setup dkim for your domain :
SPF
1. You declare  txt record in dns of domain such as:
"v=spf1 include:_spf.google.com ~all"
Dkim
1. Login google app with account admin https://www.google.com/a/cpanel/domain.xxx/Dashboard
2. Advance tool
3.Set up email authentication (DKIM)
4.Do follow instruction of google about declare on DNS and verify

Nguyen Si Nhan