Dibatalkan

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

Kemahiran: .NET

Lihat lebih lanjut: coping locked files, duplicatehandle locked files, locked files duplicatehandle, sql clr, 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

Tentang Majikan:
( 0 ulasan ) ISTANBUL, Turkey

ID Projek: #117671