Archive

Archive for October, 2008

Single Attach MDF MSSQL

October 31, 2008 ppshein Leave a comment

Some many projects drive me so far to update my blog in these days. So, I want to update my blog when I get free time. In this post, I’ll describe how to reduce our storage size by the way of deleting Log File (.ldf) of MsSQL. Sometimes, Log file is bigger than Data File (.mdf) because it save all transaction of whatever we do to our database. That’s why I want to delete log file (without having risks) and create new log file without having log records. Yap, here we go. First of all, we need to detach our database. Then, delete .ldf file. (if you’re not sure, backup this log file). Then, open Query Analyzer and type following coding.

EXEC sp_attach_single_file_db @dbname = ‘[db_name]‘,
@physname = ‘C:\MSSQL\Data\[mdf_file_name]‘

After that, run it. SQL will create new log file for you. How? Easy. Isn’t it?

Categories: MSSQL Tags: ,

How to kill PrivateCam.exe virus?

October 24, 2008 ppshein Leave a comment

1. Open Notepad.
2. Copy and paste followings. (Red colored sentences)

taskkill /F /IM chrome.exe
taskkill /F /IM privateCam_v0.1.exe
attrib -S -H -R C:\windows\system32\chrome.exe
del C:\windows\system32\chrome.exe
REG Delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableRegistryTools /f
REG Delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v DisableTaskMgr /f
REG Delete HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NofolderOptions /f
REG Delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v “Yahoo Messengger” /f
REG Delete HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v “Yahoo! pager” /f
gpupdate


3. Save it.
4. Change file extension from .txt to .bat (don’t save with richtextformat *.rtf)
5. Run it.
6. Search and Delete the file name: privateCam_v0.1.exe in your computer.
7. Restart your computer.

Note: Disable any kinds of anti-virus from your computer before you run .bat file.

Categories: Informations Tags: , ,

privateCam.exe vircus

October 21, 2008 ppshein Leave a comment

Today, one of my friends let me know there is one virus called, privateCam.exe that she found. When we’re crushed this one, all of messenger installed in our pc would open automatically and sending msg to all contacts of our lists.

Sent message is

Hey Please help me to test my new cam application http://h1.ripway.com/db0/privateCam.exe

Be ware of this link whenever you get. And, don’t try to run any form of exe file anymore.

Categories: Informations Tags: ,

Javascript calendar

October 16, 2008 ppshein Leave a comment

I’ve recevied new project called DEMS. Purpose of this project, users can send mails, reports and share files through their local area network. In part of this project, users need to type create date in their files like 02/09/2008. So, I have created textbox for typing date format. Unfortunately, users complaint that they don’t wanna type like that into textbox. They wanna choose date format by calendar control. That’s why I need to create calendar control by javascript. I found this page:

http://calendar.swazz.org/

This site isn’t cool enough. But they can support what I want to have.

Categories: Javascript Tags: ,

Automatically create folder with ColdFusion

October 9, 2008 ppshein Leave a comment

In these days, one of our section called “Post N’ Share” needed to save users’ uploaded filesĀ  into folder day by day. Make a short, when user upload one file on 7th Oct 2008 we need to create automatically blank folder named as “070102008″ and saved uploaded files into this folder. If we do like that, we can easily check how many users upload how many files day by day. And, when we want to migrate/erase such files, we can easily do it. Here is coding:

<cfset foldername = #dateformat(now(), “ddmmyyyy”)#>
<cfset location = “E:/uploadedphoto/”>
<cfset vDir = “#location##foldername#”>
<cfset NumberOfFilesToCreate = 100000>
<cfdirectory action=”CREATE” directory=”#vDir#”>

Categories: coldfusion Tags: ,