Archive for the ‘ Databases ’ Category

Disabling Client-side Caching in RavenDB

While editing documents in RavenDB Management Studio for testing, it became evident that the changes were not reflected in the website that was using the database. By default, RavenDB caches client queries. This article describes how to disable this feature, should the need arise.

Read more

Named Pipe Support Broken in PHP 5.3.x on Windows

Named pipe support is apparently broken in PHP 5.3.x on Windows. When upgrading from PHP 5.2.x or earlier the following error message may appear in the PHP error log:

PHP Warning:  mysql_connect() [<a href='function.mysql-connect'>
    function.mysql-connect</a>]: php_network_getaddresses:
    getaddrinfo failed: No such host is known.

Read more

Model-First Entity Framework With .MDF Database Files in App_Data

The recommended way to create SQL databases from Entity Framework models is to use a dedicated database server. However, in some instances you may want to create the database in a .mdf file inside the application’s App_Data directory. While this is definitely possible, the solution is certainly not straightforward and not entirely possible from within Visual Studio alone. One needs to connect to an existing SQL Server database instance in SQL Server Management Studio and manually attach the .mdf database file to that instance.

Read more

SQL Management Studio Express Install Fails with Exception

When installing SQL Server Management Studio on top of an existing SQL Server 2008 or SQL Server 2008 R2 installation, the setup program may fail with the following .NET Framework exception, even if the .NET Framework 3.5 and 4.0 is already installed on the target machine:

System.Configuration.ConfigurationErrorsException:
An error occurred creating the configuration section handler for userSettings/Microsoft.SqlServer.Configuration.LandingPage.Properties.Settings:
Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
The system cannot find the file specified. (C:\Documents and Settings\[UserAccountName]\Local Settings\Application Data\Microsoft_Corporation\LandingPage.exe_StrongName_ryspccglaxmt4nhllj5z3thycltsvyyx\10.0.0.0\user.config line 5) --->
System.IO.FileNotFoundException: Could not load file or assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
The system cannot find the file specified.
File name: 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
   at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
   at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
   at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
   at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

Read more

MySQL default-character-set is Deprecated in Windows Event Log

Current versions of MySQL 5.1.x appear to ship with an outdated default configuration file that generates the following warning in the Windows Event Log upon restarting the MySQL service: The syntax ‘–default-character-set’ is deprecated and will be removed in a future release. Please use –character-set-server instead.

Read more

SQL Server 2005 Express on Windows Vista 64-bit

This article is part of a backup. It was originally posted on Sunday, April 13. 2008.

At the very bottom of the SQL Server 2005 Express download page, Microsoft offers 64-bit versions of their installers. Unfortunately, this is not everything you need to run SQL Server Express on 64-bit versions of Windows Vista. As it turns out, the installer currently provided on the download page is bundled with the 32-bit version of the SQL Server Native Client, which causes the subsequent SQL Server installation to fail with the following symptoms:

  • The installer prompts for sqlncli_x64.msi

Restarting the whole installation or uninstalling the Native Client doesn’t help.

Read more

MySQL Configuration Wizzard on Windows Vista

This article is part of a backup. It was originally posted on Sunday, April 13. 2008.

The MySQL Server Instance Configuration Wizzard MySQLInstanceConfig.exe (current version 1.0.10.0) that comes with the MySQL Server Community Edition (current version 5.0.51a) has a typo in the embedded manifest file that prevents it from running on Windows Vista machines.

Read more

Quick and Dirty Backup Script for MySQL on Windows

The following batch file is a simple backup script for MySQL. It exports all databases into a temporary SQL dump file and compresses it using 7Zip into a file with the current date as its name. It also automatically deletes backups that are older than 30 days.

Read more