1. Use the Windows Backup GUI interface to create a backup job. Make sure to
specify that it should not run now but later.
2. Open the Task Scheduler, then open the backup job that you just created.
3. Mark & copy the whole command line.
4. Create the new batch file "MyBackup.bat"
5. Paste the backup command line into it.
6. Create some blank lines at the top of the file, then paste the following
code into the empty space.
@echo off
set MyDate=%date:/=_%_%time::=_%
ntbackup /.. /.. /.. /F d:\Backups\%MyDate%_File_Backup.bkf
7. Adjust the last line of the above code so that it matches your own
switches, then remove the original Windows Backup command line.
8. Use the Task Scheduler to create a task that will invoke
"MyBackup.bat" instead of your previous Windows Backup command
Monday, March 29, 2010
Tuesday, February 23, 2010
SQL 2005 : Database Mail Setup
- Enable Database Mail feature via Surface Area Configuration for Features.
- In SSMS, Use Database Mail Configuratin Wizard to create account and profile.
- Select a default profile.
- Create Operator.
- If you would use Alert to notifiy operator, enable Mail Profile in Alert system option of SQL Server Agent.
- Restart the SQL Server Agent.
- You are ready to use Database Mail to notify the operator now.
ASP.NET Page Events Lifecycle
This is for my own reference purpose. The The original info comes from : http://weblogs.asp.net/ricardoperes/archive/2009/03/08/asp-net-page-events-lifecycle.aspx
When using master pages, the normal page event lifecycle is a little different. Here is the actual order:
- Page.OnPreInit
- MasterPageControl.OnInit (for each control on the master page)
- Control.OnInit (for each contol on the page)
- MasterPage.OnInit
- Page.OnInit
- Page.OnInitComplete
- Page.LoadPageStateFromPersistenceMedium
- Page.LoadViewState
- MasterPage.LoadViewState
- Page.OnPreLoad
- Page.OnLoad
- MasterPage.OnLoad
- MasterPageControl.OnLoad (for each control on the master page)
- Control.OnLoad (for each control on the page)
- OnXXX (control event)
- MasterPage.OnBubbleEvent
- Page.OnBubbleEvent
- Page.OnLoadComplete
- Page.OnPreRender
- MasterPage.OnPreRender
- MasterPageControl.OnPreRender (for each control on the master page)
- Control.OnPreRender (for each control on the page)
- Page.OnPreRenderComplete
- MasterPageControl.SaveControlState (for each control on the master page)
- Control.SaveControlState (for each control on the page)
- Page.SaveViewState
- MasterPage.SaveViewState
- Page.SavePageStateToPersistenceMedium
- Page.OnSaveStateComplete
- MasterPageControl.OnUnload (for each control on the master page)
- Control.OnUnload (for each control on the page)
- MasterPage.OnUnload
- Page.OnUnload
Friday, February 19, 2010
Steps to install dotProject
Add "dp_user" user to the MySQL.
1) Install Apache web server.
2) Install PHP to your web server.
PHP should support GD and MySQL
3) Install MySQL.
4) Add "dp_user" user to the MySQL.
5) Create a schema (Database) "dotproject" and assign user "dp_user" has full permission of this DB.
6) Copy all dotProject files to the htdocs folder.
- Open browser to access http://Your Domain/dotProject/install/index.php
- follow the step to complete the installation.
7) The default admin login is :
User Id : admin
Password : passwd
1) Install Apache web server.
2) Install PHP to your web server.
PHP should support GD and MySQL
3) Install MySQL.
4) Add "dp_user" user to the MySQL.
5) Create a schema (Database) "dotproject" and assign user "dp_user" has full permission of this DB.
6) Copy all dotProject files to the htdocs folder.
- Open browser to access http://Your Domain/dotProject/install/index.php
- follow the step to complete the installation.
7) The default admin login is :
User Id : admin
Password : passwd
Prepare SQL 2005 to use CLR
1) Turn on the 'clr enabled" feature of your server.
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
2) Turn on the Trustworthy property of your database if your clr assembly require access external resources.
ALTER DATABASE [DB Name]
SET TRUSTWORTHY ON
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
2) Turn on the Trustworthy property of your database if your clr assembly require access external resources.
ALTER DATABASE [DB Name]
SET TRUSTWORTHY ON
Sunday, November 22, 2009
Use Diskpart to Remove EISA Partition
- Open a command prompt as administrator.
- Run Diskpart application by typing Diskpart in the command prompt.
- In the “Diskpart” prompt, enter rescan command and press Enter key to re-scan all partitions, volumes and drives available.
- Then type in list disk and press Enter key to show all hard disk drive available.
- Select the disk that contains the partition you want to remove. So the command will be:
select disk y
Finish by Enter key.
- Type list partition and press Enter key to show all available and created partition in the disk selected.
- Select the partition that wanted to be deleted by using the following command, followed by Enter key:
select partition x
where x is the number of the EISA based recovery partition to be removed and unlocked its space. Be careful with the number of this partition, as wrong number may get data wipes off.
- Finally, type in delete partition override and press Enter key.
Wednesday, September 23, 2009
Caution when upgrade WinService from .NET 1.1 To .NET 2.0
When you try to upgrade a WinService from .NET 1.1 to .NET 2.0, Please pay attention at the thread mode. In .NET 1.1, the default value of the thread mode is background. However, the default value of the thread mode is changed in .NET 2.0.
In .NET 2.0, You need to explicitly set the thread mode to background.
In .NET 2.0, You need to explicitly set the thread mode to background.
Subscribe to:
Posts (Atom)