DarenHan's Blog

I am a Dot net asp.net developer working with VS 2005 and SQL 2005 now.

February 2007 - Posts

http://s20.photobucket.com/albums/b246/darenhan/river%20ang%20bao/ My shots with k750i handphone camera. :) Happy Chinese New Year to everyone!
Posted by darenhan | with no comments
I was using sqlcache dependency in my dot net project file yesterday...and today somehow I cannot connect to my local database.

Msg 945, Level 14, State 2, Server ServerName, Line 1 Database 'msdb' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
To work around this problem, you must change the DACL on the user database file to use the new service account. Then, you must restart the service.

To change the DACL on the file, follow these steps: 1. Log in to SQL Server as the administrator of the computer that is running SQL Server 2005.
2. Locate the database file.
3. Right-click the file, and then click Properties.
4. Click the Security tab.
5. Click Add. Type the name of the service account in my case it is "COMPUTERNAME\ASPNET". Click to select the Full Control check box, and then click OK.


found this solution at
http://support.microsoft.com/kb/899436



Posted by darenhan | with no comments
I got this error below when trying to enable sql cache dependency for tables with schema.

An error has happened. Details of the exception: Cannot create trigger 'dbo.Affiliate.Country_AspNet_SqlCacheNotification_Trigger ' as its schema is different from the schema of the target table or view. Failed during cache dependency registration. Please make sure the database name and the table name are valid. Table names mus t conform to the format of regular identifiers in SQL.


Then i found the solution. Need to modify one of the asp.net system stored proc.
http://chrisbenard.net/downloads/code/AspNet_SqlCacheRegisterTableStoredProcedure_new.sql



Posted by darenhan | with no comments
the process flow
I did the above maintainence plan to backup one of my db file but when i want to delete the rest of old backup files, it didn't work. This is because the file extension of the below screenshot should be "bak" not ".bak".
Another silly mistake.

delete old backups


Posted by darenhan | with no comments