How to shadow a session on Windows 2012 (R2 only)

How to shadow a session on Windows 2012 (R2 only)

It seems that to Remote Control a user in RDS (shadowing) was removed from Windows Server 2012.

It’s now reintroduced with Windows 2012 R2, I will show you the way using the command line.

Connect to the server with the first mstsc client.

This session will be the shadowed session.
Then on the server, run the following command :

query session

to get the session id of your RDS session.

On the second mstsc client check if the option /shadow is supported.
For instance on my Windows 7 laptop, if I run :

mstsc.exe /shadow

I get :

mstsc /shadow error

shadow option is not supported.
On a W2012 server I get :

it’s supported.

Once you have a client with /shadow option supported, run :

mstsc /v:‹your_server_name› /shadow:‹id_found_above›

On the first msctsc client you will have a prompt :

Just click on “Yes”. You’ve got a shadow !

Testing network path with powershell

Testing network path with powershell

If you want to scan a large list of network path to suppress old references, here is how to do it quickly in powershell.

Beware : if you don’t have authorization on the share the result will be the same as if it doesn’t exist


#Network path test
foreach ( $path_to_check in ( Get-Content ./list_path.txt)) {
echo “Scanning -> $path_to_checkif (Test-Path $path_to_check) {
	echo "$path_to_check,yes" >> ./check_path_restult.csv
else {
	echo "$path_to_check,no" >> ./check_path_restult.csv



Example :


PS D:\tmp> foreach ( $path_to_check in ( Get-Content ./list_path.txt)) {
>> echo "Scanning -> $path_to_check"
>> if (Test-Path $path_to_check) {
>>     echo "$path_to_check,yes" >> ./check_path_restult.csv
>>     }
>> else {
>>     echo "$path_to_check,no" >> ./check_path_restult.csv
>>     }
>> }
Scanning -> \\host000001\bibli
Scanning -> \\host000001\dom101$
Scanning -> \\host000001\dom33
Scanning -> \\host000001\dom38


Content of result file (check_path_restult.csv) :



How to find Oracle’s Database Edition version – Comment trouver la version Edition d’une base de données Oracle.

Here is the SQL command that show you important information about Oracle’s engine, such as the edition (Enterprise, Standard, Lite …).

Voici commande sql qui permet d’avoir les infos importantes sur la version du moteur Oracle, notamment l’éditions (Entreprise, Standard, Lite etc …).


SQL> select banner from v$version;
Oracle8i Enterprise Edition Release - Production
PL/SQL Release - Production
CORE       Production
TNS for DEC OSF/1 AXP: Version - Production
NLSRTL Version - Production


SQL> select banner from v$version;
Oracle Database 10g Enterprise Edition Release - Prod
PL/SQL Release - Production
CORE      Production
TNS for Linux: Version - Production
NLSRTL Version - Production



Définition d’un deadlock Oracle (ORA-00060)

deadlock Oracle

Juste pour faire le point avec mes amis développeurs.
Un deadlock n’est pas un problème Oracle (ou autre SGBD) ou système mais un problème de développement.
Un deadlock peut apparaitre quand 2 requêtes essayent simultanément de mettre un verrou sur une donnée que l’autre détient actuellement.
Les 2 requêtes s’attendent l’une l’autre.

Pour vous aider :
Sous Oracle on trouve en général des traces dans le répertoire « udump ». Un fichier .trc est généré à l’heure ou le deadlock (ORA-00060) est remonté dans les logs de vos traitements. Dans ce fichier se trouve des indices sur ce qui a provoqué le problème comme les SID des 2 requêtes incriminées, les rowid des enregistrements en question et les requêtes sql.

Robocopy on slow or busy links using Interframe gap (IPG).

Robocopy on slow or busy links using IPG

Use /IPG:n option to reduce robocopy’s impact on a slow or busy network link.

Between each 64Kb packet, robocopy will wait for n milliseconds so other applications can use the whole bandwidth.

I found an interesting link on zeda.n to calculate the transfert time when IPG delay (the n variable):

For instance to mirror a local directory tree to a remote location with a 10ms delay :

robocopy L:\FILES\SHARE\buro \\mynas1\SHARE12\buro /copyall /mir /r:5 /w:10 /log:c:\robo_buro.log /np /IPG:10