Archive for November, 2016

Mencari satu persatu user yang menjalankan crontab pada sistem linux cukup merepotkan, tapi bisa dicoba baris berikut pada terminal/console :

for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done

perintah tsb diatas akan menampilkan semua user yang menjalankan crontab.

(http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users)

Menjalankan Virtual Desktop didalam WMS 2012 yang dijalankan sebagai host pada proxmox akan menyatakan Hyper-V ‘disable’ dan proses tidak dapat dilanjutkan, aktifkan hyper-v dengan menjalankan perintah berikut pada WMS 2012 :

Dism /online /enable-feature /featurename:Microsoft-Hyper-V
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-Management-Clients

This installs the Hyer-V roles without the CPU check. I do not believe that it removes the VT requirements, but in my case, the Core i7 has VT and Hyper-V is working. It is also worth noting that I have removed the args: -cpu host flag from the /etc/qemu-server/<VMID>.conf file and it still works.

 

(https://forum.proxmox.com/threads/hyper-v-in-windows-guest-under-proxmox.7644/)

Import a .SQL script using OSQL

untuk hasil export script .sql MS SQL Server yang berukuran besar dan tidak dapat diproses import oleh sql management studio, dapat menggunakan osql untuk mengimport nya :

osql -U YourUserName -P YourPassword -S ServerName -d DatabaseName -n-1 -i DriveLetter:SQLFileNameAndPath.sql -o DriveLetter:LogFile.txt

Switches
-U: login ID for the specified server
-P: password for the login ID
-S: server name
-d: database upon which the script will be executed
-n: removes numbering and the prompt symbol (>) from the output file
-i: the .SQL file name (including drive letter)
-o: an output file that details how the script executed (if at all)

(http://metrix.fcny.org/wiki/display/dev/How+to+execute+a+.SQL+script+using+OSQL)