İptal Edildi

Coping Locked Files

Hello,

I need a programmer who will write a CLR application that will read log files as well as database files(MDF) locked by MS SQL Server. To do it you will need to use duplicatehandle() WIN API and then send it to the client throught either sql pipe or socket piping...

Hints to do;

1. Obtain File Handle from "sys.dm_io_virtual_file_stats" system catalog view

2. Use the following code....

SafeFileHandle objectHandle = null;

IntPtr handle = (IntPtr)FileHandle;

IntPtr currentProcess = GetCurrentProcess();

if(DuplicateHandle(currentProcess,handle,currentProcess,out objectHandle,0,false,DuplicateHandleOptions.DUPLICATE_SAME_ACCESS))

{

objectHandle = Is Valid Duplicated File Handle

.........................

.........................

your work

}

The code above will produce a valid file handle code, you will need to finish the code above with your own work. Also this small project must be completed within the 2(two) days.....

Ismar

Just a few more info about the project;
The application will be Class Library as a SQLFunction registrated on the SQL server as an ASSEMBLY. Since this will be in-process with MS SQL(not kernel mode or out of process app.) obtaining file handle is easy but you will need to make a function to extract buffer from the handle....

Beceriler: .NET

Daha fazlasını görün: coping locked files, duplicatehandle locked files, locked files duplicatehandle, sql clr, ms sql client, code sys, sys, piping work, Pipe, null, log files, coping, clr, client socket server, log api, socket project, read project files, write win, win api, read write sql server, catalog application, locked , send file socket, file handle, read sql server

İşveren Hakkında:
( 0 değerlendirme ) ISTANBUL, Turkey

Proje NO: #117671