Blog Archives
A short note about moving internal Drupal CMS site from test to the production
Target platform: Windows 2003 R2 x64, let’s call the production server PROD (of course, as always, all names, passwords and paths are obfuscated)
Packages installed on PROD:
- MySQL 5.1.28-RC-WINX64.msi (x64) – be careful and pick mirror that offers msi file and not exe. At first I downloaded from local mirror (Slovenia) and got .exe file that I couldn’t run on Windows x64.
- Apache 2.2.10 (win32)
- PHP 5.2.6 (win32) with mysql extension
Prepare empty MySQL database on PROD for Drupal:
cmd> mysqladmin -u root -p create drupal cmd> mysql -u root -p mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupal.* TO 'drupal'@'localhost' IDENTIFIED BY 'topsecret'; mysql> flush privileges
Export Drupal database on TEST and import on PROD:
cmd@test> mysqldump -u root -p drupal > drupal.sql cmd@prod> mysql -u drupaluser -p drupal < drupal.sql
Copy Drupal files from Apache\htmldoc on test server to the same directory on production server. Check Drupal configuration file (settings.php) file for MySQL connection (especially for a valid password that is needed to connect to MySQL).
I did the following changes in configuration files:
PHP.INI
I turned on the php_mysql.dll PHP extension: [PHP_MYSQL] extension=php_mysql.dll
All other PHP extensions I turned off with semicolon in front of the extension keyword (;).
Also, I copied libmysql.dll from PHP directory to Apache\bin directory.
Apache (httpd.conf)
I added index.php and index.htm in directoryIndex:
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
DirectoryIndex index.php index.html index.htm
…as well as some aliases for static content, such as:
Alias /doc "X:/DOCUMENTATION"
Options Indexes
AllowOverride None
Order allow,deny
Allow from all
MySQL (my.ini)
I added init-connet to my.ini at the server side, the reason for this is explained in this thread.
[mysqld] init-connect="SET NAMES cp1250"
Windows Server 2008 – short notes from the course 6416B
I decided to attend Microsoft Official Course, 6416B Updating your Network Infrastructure and Active Directory Technology Skills to Windows Server 2008, as part of the benefit that we get from the Enterprise Agreement Contract. As a bonus, every attendee of this course got free MS Window Server 2008 Standard Edition with 5 CAL licenses (btw. this promotional offer will expire at end of the year 2008).
License for Windows Server 2008 Std. will serve me well in my home lab for both, experimenting with Oracle software on Windows OS, as well as a replacement for my venerable Windows XP workstation, allowing me to completely skip Vista.
License that I receive will allow me to run Windows Server 2008 Standard Edition as parent partition in Hyper-V, plus another instance of Server 2008 Std. as a Hyper-V child. Howard Rogers wrote about setting up his Windows Server 2008 as a workstation in not so distant blog article, thought he also find out that Hyper-V doesn’t do multimedia very well, which doesn’t bother me much, as I’ll use my “workstation” more or less for experimenting with Oracle, Windows Server 2008 itself, some writing, perhaps a bit of photo editing with Adobe Lightening ant that’s pretty much all.
I do like the look and feel of Hyper-V management, thought it bothers me the lack of support for Linux. Suse being the only Linux distribution that can use so-called synthetic (as opposed to emulated) drivers. What a shame, because I put SUSE on my “dirty-list” of Linux distributions a long time ago. If I’ll find performance of Centos 5 under Hyper-V unsatisfactory, I’ll probably replace Hyper-V with soon to be released production version of VMWare Server 2.0.
Let’s see some new features of Windows Server 2008 that are in my opinion worth spending some time studying and understanding them.
- built-in multipath I/O and Storage Manager for SAN
- Bitlocker drive encryption (not something I wouldn’t lightly choose for Oracle production server – but it can get handy for securing deployment of various kinds of databases on laptops)
- services for NFS
- Windows PowerShell – not exactly new, but it ships with Win2008 and should be one of the first features to be installed
- brand new Windows Backup – for better or worse, Microsoft decided to redone Windows backup, completely replacing ntbackup with Windows Backup. For medium and large shops Microsoft recognizes that there are third party tools that are way better at doing backup and recovery. For a smaller shops, however, Windows Backup might be enough – I got an impression that Microsoft wanted to deliver backup tool for the dummies. Microsoft completely removed support for tape backups and added support for optical media with UDF support (in addition to disk and network drives for backup store). Limited scheduling possibilities and the fact that your only choice for a backup is complete volume (during recovery you have a chance to select files and folders, but not during backup) it’s hard to believe that many professionals will be happy with WBA. Another difference is the backup format itself, which is vhd file instead of bkf – so getting something restored is much simpler than in the old days.
- remote differential compression – Microsoft is using this feature in new DFRS (Distributed File System Replication), allowing only changed parts of the file to be replicated – in a similar way rsync is used for a long time ;-).
- Windows PE – Preinstallation Environment can run entirely from memory and can boot from CD, USB key – something we would have to buy from third party vendors, at least so far…
- Windows RE – Recovery Environment – special variant of Windows PE dedicated to recovery
- NTFS improvements – NTFS v6 brings two new features; self-healing NTFS that will reduce the need for chkdsk to run in exclusive mode and transactional NTFS with Kernel Transaction Manager
- complete redesign of TCP/IP stack – IPv4 and IPv6 are now integrated in the tcpip.sys, they call this dual IP architecture. There are numerous improvements, especially on performance front. In older releases TCP/IP receive windows was by default fixed (at 64KB), no matter over what kind of network we communicated. With Windows Server 2008 (Vista) they introduced receive window auto-tuning that can considerably improves network performance.
- multi CPU network interface access – in Windows Server 2003 only one CPU could access network interface – causing performance bottleneck in case if that particular CPU was overloaded, leaving little CPU cycles to handle server network traffic. In Windows Server 2008, several CPU’s can access network interface.
- SMB 2.0 protocol allows several commands to be embedded in single packet, further enhancing network performance of high latency network connections
- Policy based Quality of Service – network bandwidth throttling
- Windows Remote Shell (winrm & winrs) – one “new” possibility for remote administration from command line. Network traffic is encrypted with SSL, other than that, we could do the same job with pstools from Sysinternals for years.
- servermanager.exe – another command lined tool for administration
- RSAT – Remote Server Administration Toolkit works on Vista and Windows Server 2008 only, unfortunately leaving vast majority of sysadmins that are still using Windows XP without this option.
- RRAS (Routing and Remote Access Service) – has new possibility, SSTP – Secure Socket Tunneling Protocol over well known port 443
- NAP – Network Access Protection
- Hyper-V – it’ll be interesting to follow Microsoft success with Hyper-V, considering VM Ware decision to offer ESXi for free.
- restartable AD Data store service
- PHP 5.2.1support in IIS 7
- redesign of monolithic IIS6 into highly modular IIS7
- replacing binary IIS metastore with flexible, file based xml configuration that can be copied from machine to another machine
- TS Gateway – TS Gateway serves as a “proxy” between client (somewhere on the Internet) and some internal TS server. TS Gateway uses port 443 and SSL encryption. Smaller shops without dedicated VPN equipment will appreciate this feature.
- TS Remote APP – this feature is really cool. It allow us to “publish” certain applications hosted on terminal server to end users. Really neat.
- TS Easy Print – major enhancement, we don’t need anymore printer drivers on our TS server for every printer that we have out there – instead, drivers installed on the client workstations are used
- RDP 6.1 protocol – (available for Windows XP SP3), 32-bit color support, up to 4096 x 2048 screen size that can be displayed over several monitors, display data prioritization, single-sign on, PNP redirector, Audio Mixer …
I intentionally left out other features targeted more or less to system administration – such as Active Directory related enhancements, new deployment infrastructure (Windows Deployment Services), DNS improvements, Auditing Directory Domain Services etc.
You may ask why I didn’t mention Server Core version? Well, I believe this version in the current state is seldom usable. Certainly I wouldn’t bother to install, run and support Oracle10g/11g on this release. The major handicap of this release at present is the lack of .NET framework and hence PowerShell. I don’t expect more than 3% of Windows Server 2008 deployments will use Server Core in production. I’m afraid Microsoft released Core, at least 10 years too late to have any serious impact on enterprises that run most of their production on Windows.
Final disclaimer:
Don’t believe everything you read here. Above comments of the features are the result of my personal notes taken during the class. They might be inaccurate or miss leading. I’ll post any correction or explanation in the form of comment to this blog entry.
Pushing the limits of Windows
Mark Russinovich started a blog post series under the title Pushing the limits of Windows – a must read if you’re professional sysadmin/dba working with Windows OS. He started the series with physical memory and will continue with other essential resources. I hope he’ll cover Large Pages memory support in one of his future posts.
In addition to Mark’s blog I would like to mark down two links mentioned in his blog:
- Memory Limits for Windows Releases
- Alex Ionescu’s blog and his tool, meminfo (unfortunately available only for Vista and Windows 2008)
How to extract OLE object from MS Access database
Years ago we developed simple application in MS Access for keeping different requests from the users in one place, we chose MS Access as a front end and one existing MySQL server for the back-end (our decision to use MySQL was a deliberate one – anyway, it well might be any other RDBMS, it’s not important fact in the context of this memo).
Basically the design of the application was very simple, when someone from DBA team received an e-mail request from the user he/she entered some meta information in the database plus Word document that was attached to the message by simply copy/pasting word document in MS Access. The inserted document was stored in MySQL blob field as OLE document (doc with some binary meta data envelope). Here is the screenshot:
The small preview image of the “inserted” Word document for example is stored in MySQL BLOB field as part of the OLE envelope. As long as we’re happy with the MS Access as a front end we can always extract the doc by double clicking the preview image or by right clicking the image and selecting Open from the context menu.
We plan to rewrite the application, most likely with Oracle Apex on top of Oracle XE. We faced the problem of how to migrate our data from MySQL to Oracle XE. Word documents stored in blob fields are really not true (binary) .doc files any more, but OLE objects (some binary header plus doc). We thought that finding official documentation about OLE object header would be easy and that all we’ll have to do is to cut off the OLE header from each document file stored in blob field. We’re wrong.
To make long story short, we found the solution on Stephen Lebens site. He wrote MS Access application that can extract (any) OLE content from the mdb file and save the document in native format. You can download ExtractInventoryOLE.zip from here.
First we imported table with OLE objects from MySQL to local mdb file and then extracted the word documents with above application. Several hundreds Word documents where dumped without a hitch in less than a minute.
Here is a screenshot from ExtractInventoryOLE to get a filling:
You can select unique field (in our case it was a primary key for the table; a numeric sequence) that is used to name the documents. The good news is that you can extract the OLE objects even if OLE Server that was used to insert the document is not present/installed on the machine (for example MS Word, Excel etc.).
How to backup MS Analysis Services OLAP db with ascmd
I’m not sure why Microsoft doesn’t ship compiled version of ascmd with SQL Server 2005!? Ascmd as you might know is command lined tool that you can use to execute xmla scripts in addition to MDX queries and DMX statements.
My only interest at present is to use ascmd to backup OLAP mode database from command line (if you’re storing data as ROLAP or HOLAP, then make sure you read Backup Strategies with SQL Server 2005 Analysis Services).
Essential references:
- Readme For Ascmd Command-line Utility Sample
- I found compiled version of ascmd at Project Real homepage, more precisely in package ProjectREALRefImpl_10.zip. Unpack ProjectREALSampleCodeAndTools.msi from zip file and install the package, then search for ascmd.exe. I picked up binary for x64.
Copy ascmd to your OLAP server (like ?:\MSSQL\MSSQL.1\OLAP\bin). All that you need now is xmla script that can be generated within MS SQL Server Management Studio and simple batch file, such as:
SET PATH=?:\MSSQL\MSSQL.1\OLAP\bin;%PATH% ascmd -i BackupOLAP.xmla if errorlevel 0 echo Backup BACKUPOLAP= OK > ?:\OLAPBackup\BackupOLAP.log if errorlevel 1 echo Backup BACKUPOLAP= ERROR > ?:\OLAPBackup\BackupOLAP.log
and BackupOLAP.xmla might look like this:
<Backup xmlns="http://schemas.microsoft.com/analysisservices/2003/engine"> <File>?:\OLAPBackup\BackupOLAP.abf</File> <AllowOverwrite>true</AllowOverwrite> </Backup>
…replacing ? with the appropriate drive letter, of course.


You must be logged in to post a comment.