2013 m. lapkričio 5 d.

View free space on Oracle tablespaces

SQL query, which could be used for listing tablespaces and occupied space:
select df.tablespace_name "Tablespace", totalusedspace "Used MB", (df.totalspace - tu.totalusedspace) "Free MB", df.totalspace "Total MB", round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace)) "Pct. Free" from (select tablespace_name, round(sum(bytes) / 1048576) TotalSpace from dba_data_files group by tablespace_name) df, (select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name from dba_segments group by tablespace_name) tu where df.tablespace_name = tu.tablespace_name ;

2013 m. rugsėjo 14 d.

m2e-android Eclipse Update Site

maven-android-plugin http://rgladwell.github.io/m2e-android/ in eclipse can be installed from Eclipse Market Place (see http://marketplace.eclipse.org/content/android-configurator-m2e).

Eclipse Update Site:
http://rgladwell.github.com/m2e-android/updates/

2013 m. rugpjūčio 10 d.

Enabling anonymous access to a file share on Windows 8

To enable anonymous access to shared folder in internal network, the following steps had to be completed:

  1. Open up Local Group Policy Manager.
  2. Expand Computer Configuration
  3. Expand Windows Settings
  4. Expand Security Settings
  5. Expand Local Policies
  6. Select Security Options
  7. Change “Network access: Let Everyone permissions to apply to anonymous users” from Disabled to Enable.
  8. Change “Network access: Restrict anonymous access to Named Pipes and Shares” from Enables to Disabled.
  9. Enter in the share name for “Network access: Shares that can be accessed anonymously”

image

Set up the Share with Everybody permissions and away you go…

2013 m. vasario 14 d.

Windows 7 and Windows 8: allow storing credentials for remote machines

Start local group policy editor, Start – Run (Win+R) – gpedit.msc
Go to Local Computer Policy –> Computer Configuration –> Administrative Templates –> System –> Credentials Delegation
Edit “Allow delegating saved credentials”
Enable the policy, click Show and enter the value “TERMSRV/*” into the list (TERMSRV shouldn’t be changed, leave it).

clip_image001

Do the same thing for the following policies:

  • “Allow delegating saved credentials”
  • “Allow delegating saved credentials with NTLM-only server authentication”

Close the policy editor, open a command prompt and use “gpupdate /force” to apply the policy directly.

2013 m. sausio 24 d.

Import Remote Server RDP Certificate

After importing certificate, when connecting to Remote Desktop, it does not warn about invalid certificate, and what is most important – it allows to save password.

The certificate needs to be added to your Local Computer's "Trusted Root Certification Authorities" store. Adding it to the user's "Trusted Root Certification Authorities" store is not enough! If this sounds confusing don't worry - it is.

If you think you already installed the certificate, skip to "Move Certificate on Client."

Export Certificate on Server

First the certificate needs to be exported to a file. On the server, i.e. the computer you'd like to connect to:

  1. Run %windir%\System32\mmc.exe
  2. Menu File -> Add/Remove Snap-in...
  3. Select Certificates -> Add > -> Computer account -> Local computer -> Finish
  4. OK the Add or Remove Snap-ins dialog. The console should now contain Certificates (Local Computer).
  5. Select Certificates (Local Computer) -> Remote Desktop -> Certificates. There should be a single certificate with your computer's name.
  6. Open the certificate.
  7. Open the Details tab.
  8. Copy to File...
  9. Select any format, e.g. DER encoded binary X.509 (.CER).
  10. Type in any file name, e.g. <computername>.cer.
  11. Copy the file to your client computer.

Another way to get the certificate is to follow steps 6 to 10 on your client computer, on the Remote Desktop warning dialog mentioned in the question. But you're trusting the network in this case. At least compare the fingerprints, so you can be sure you trust the right certificate.

Import Certificate on Client

On the client, i.e. the computer you're connecting from, an receive the warning popup, do:

  1. Run %windir%\System32\mmc.exe
  2. Menu File -> Add/Remove Snap-in...
  3. Select Certificates -> Add -> Computer account -> Local computer -> Finish
  4. OK the Add or Remove Snap-ins dialog. The console should now contain Certificates (Local Computer).
  5. Select Certificates (Local Computer) -> Trusted Root Certification Authorities -> Certificates.
  6. Menu Action -> All Tasks -> Import....
  7. Enter the path to the exported certificate, e.g. <computername>.cer.
  8. Place all certificates in the following store -> Trusted Root Certification Authorities.
  9. Finish. You should no longer receive the warning.

Move Certificate on Client

If you already installed the certificate through the warning dialog, you can find the certificate in the current user's store. Skip the steps above and just move the certificate to the right place:

  1. Follow steps 1 to 3 as described in "Import Certificate on Client."
  2. Add another Certificates snap-in, this time for My user account.
  3. The certificate should be here somewhere. Try Certificates - Current User -> Intermediate Certification Authorities -> Certificates first.
  4. Drag-and-drop or cut-and-paste the certificate to Certificates (Local Computer) -> Trusted Root Certification Authorities -> Certificates. Note that the certificate stores stack, so you will still see the certificate in you user's store! You should no longer receive the warning.

Thanks to Ronald Blaschke who published these steps at http://serverfault.com/questions/7653/remote-desktop-keeps-asking-me-to-accept-a-certificate