Pages

Thursday, August 15, 2013

DBVisualizer - Content not allowed in prolog

Hi!

After a Windows crash while DBVisualizer was opened. I lost everything under by DBViz.

When I start the app, I'm getting this error message:


>>>>

Could not read XML file C:\ ..... \dbvis.xml

Error is : Content not allowed in prolog.

<<<<

When I look at the file dbvis.xml, I saw the file was corrupted.


To correct the situation, there are backup files in the directory.

My directory is  C:\Users\ylaviole\.dbvis\config70

Simply delete all the files and remplace .bak files by there original file name.

dbvis.xml.bak => dbvis.xml
editorstyles.xml.bak => editorstyles.xml
favorites.xml.bak => favorites.xml
tablefilters.xml.bak => tablefilters.xml

Restart DBVisualizer and you should have restored all you settings.

Generate many files of a particular size in Windows



I was recently performing some performance testing that required me to copy many files of a particular size from one Windows XP workstation to a Windows 2003 server. I had a heck of a time figuring out how to batch generate the test files.


Finally I cam across the fsutil tool, which is included on both Windows XP and Windows Server 2003.


The syntax for using fsutil is:


fsutil file createnew filename filesize


I used a simple loop to create files of a particular size using fsutil. Running from a command prompt:


For /L %i in (1,1,25000) do fsutil file createnew A%i.tmp 12288


will create 25,000 files of 12288 bytes (12KB) named A1.tmp, A2.tmp, A3,tmp…


to run this loop in a .cmd file instead of from the command line replace single % with double percent signs


For /L %i in (1,1,10000) do fsutil file createnew B%i.tmp 65536


will create 10,000 files of 65536 bytes (64KB) named B1.tmp, B2.tmp, B3,tmp…


For /L %i in (1,1,2500) do fsutil file createnew C%i.tmp 131072


will create 2,500 files of 131072 bytes (128KB) named C1.tmp, C2.tmp, C3,tmp…


For /L %i in (1,1,1000) do fsutil file createnew D%i.tmp 1048576


will create 1,000 files of 1048576 bytes (1024KB or 1MB) named D1.tmp, D2.tmp, D3,tmp…


I was able to create hundreds of thousands of files of a very specific size in a short amount of time using this procedure.


















For /L %i in (1,1,10000000) do fsutil file createnew %i.copy 15

Apache Virtual Host with certificate

Here is a simple example for Virtual Host with Apache & certificates


<VirtualHost 111.222.333.444:443>
        DocumentRoot /var/www/html/xyz.ca
        ServerName xyz.ca
        ServerAlias www.xyz.ca

        SSLEngine on
        SSLProtocol all
        ServerAdmin admin@xyz.ca
        SSLCertificateFile /usr/local/ssl/crt/xyz_certificate.crt
        SSLCertificateKeyFile /usr/local/ssl/private/star_xyz_ca.key
        SSLCertificateChainFile /usr/local/ssl/crt/intermediate.crt
        SSLCACertificateFile /usr/local/ssl/crt/intermediate.crt
</VirtualHost>