Query Conversion Tool Between Oracle And SQL Server

You can use a free tool from Oracle SQL Developer under>>Tools>>Migration>>Translation Scratch Editor
http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

(You may need to register for a free account first to download the software).


Copy Files to Multipe Locations with Robocopy

1. Prepare a destination list with one item each line and save it to the same location as the .bat file;
2.Save the following file as bat file to c:\jobs;




for /f "usebackq tokens=*" %%T in ("FolderList.txt") do (
robocopy c:\temp\myfiles_src\ \\mydestination\%%T\myfolder\ /s /LOG+:C:\jobs\log\%date:~-4,4%%date:~-10,2%%date:~-7,2%_log.txt 
)



Execute this bat file manually or through a scheduled job.


Schedule a Job To Run SSIS Package to Delete Old Files with Robocopy

Step 1: Create a bat file (saved as TheDeleteFile.bat from notepad in this example)  in the following format (use your own file paths)

IF NOT EXIST \\myShare\SQLData\empty mkdir \\myShare\SQLBackups\empty
Robocopy \\myShare\SQLData\backups \\myShare\SQLData\empty /e /MOVE /create /MINAGE:15 /LOG+:C:\jobfiles\log\%date:~-4,4%%date:~-10,2%%date:~-7,2%_log.txt
rmdir \\myShare\SQLData\empty /s /q

 

Any files in the  \\myShare\SQLData\backups folder that are 15 days old will be deleted. You can change the number 15 to the number you desire.

 

Step 2:  Design an SSIS Package with  Execute Process Task component:

The major Process Properties:
RequiredFullFileName: True
Executable: C:\myjobfile\TheDeleteFile.bat
Arguments: ..\bat
WorkingDirectory: C:\myjobfile

 

Step 3: Set up a job from SSMS to run the SQL Server Intergration Package designed from above step and schedule a time to run this job.

 

References:

http://texhex.blogspot.com/2009/09/misusing-robocopy-to-delete-old-files.html

http://www.codesingh.com/2009/08/using-robocopy-to-delete-old-files-from.html

http://blogs.msdn.com/b/jjameson/archive/2009/11/07/using-robocopy-to-move-files-and-folders.aspx

 


Replace Laptop’s Hard Driver with Intel SSD Driver By Using Intel’s Data Migration Software

It is very easy to upgrade a laptop’s hard driver with Intel SSD with Intel® Data Migration Software.

I used one 160 GB Intel SSD drive to replace a 500 GB HD with 120 GB data on it from ASUS X53E Windows 7 Home Premium.

The cloning mode is manual to control the destination partition size and the other options you can leave it as default to proceed.
It takes a while to finish cloning the 120GB driver through a USB connection. After the cloning, I simply swap the driver with the SSD
and the machine is ready to run.
Download link for the software and manual:
http://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&DwnldID=19324


How to Show File Extension in Window 2008 Server and Windows 7

If you open a folder from a Window 2008 Server, you cannot see your files extension any more.
There is a setting you can change to see the extension again.
Follow these steps:

In Window Explore
>>Click on Organize(Up-Left corner)
>> Folderand search options
>>Under View tab
>>Uncheck the checkbox for: Hide extensions for known file types

Go back to your folder and you will see your files with extensions!


Remove Write-Protect (Write Protection) from Jump Drive (Reformat)

My wife’s MP3 jump drive has some files which cannot be removed due to the write-protect of the drive. After messing around for a while, I decide to reformat the drive after making a copy of all files to my computer hard drive.

Go to command line and format the drive (find the drive letter of the drive. In my case, it looks like:

C:\>format g: /x

Got a full formatted drive back.  Then copy some useful files back to the jump drive. Done.


How to access Cmd.exe in Windows 7?

There are some changes compared with what get to the command prompt in XP. I read a summary listed 5 ways to access the Cmd.exe in Windows 7 from book  Windows 7 Inside Out Appedex B: (The command prompt works identically in all editions of Windows 7)
http://www.amazon.com/Windows-Inside-Out-Ed-Bott/dp/0735626650
 
 

To get to the command prompt, run Cmd.exe, which you can do in any of the following ways:

  • Type cmd in the Start menu search box, and click the Cmd shortcut when it appears, under Programs, at the top of the menu.

  • Press Windows logo key+R, and type cmd in the Open box.

  • Choose Start, All Programs, Accessories, Command Prompt.

  • Double-click the Cmd icon in your %SystemRoot%\System32 folder.

  • Double-click any shortcut for Cmd.exe.