MySQL Backup & Restore

I did this on an install of MySQL 5 Community Server running on Windows 2008 Server Web Edition- From the command line- backup:

mysqldump -u [username] -p[password] [database name] > FILE.sql

restore;

mysql -u [username] -p[password] [database name] < FILE.sql

Remember; if you have restored your core mysql database, which contains all the info on users and privileges, you will need to do a

FLUSH PRIVILEGES;

before you will be able to login using those user accounts!

, , , ,

No Comments

Web site’s back!

Just a quick note to say everything is back up and running after the past 24 hours worth of downtime. I’ve rebuilt the server here with a fresh install of windows server 2008 and the latest releases of php for IIS and MySQL5, as well as a whole new backup plan.

No Comments

Karma, now available on iTunes!

My first published iPhone app, “Karma” is now available on the iTunes store http://itunes.com/apps/karma

No Comments

Submitted “Karma” to Apple for approval

I’ve just submitted my second ever iPhone app to apple for approval- you can find details of the app on the dedicated Karma iPhone app support page on my new iPhone projects site.

I shall post again once it’s been accepted (hopefully!)

2 Comments

Cocos2d documentation on Easing effects for animating sprites

just found this ; http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:actions_ease?s=ease after ages of searching! shows you how to do smooth scrolling movements which ease out.

No Comments

Full Text Reindex, scheduled job has no steps!

We have a SQL Server 2005 box, on which we have a database which has a full text index. The database gets a massive refresh of its data each night, meaning the full text index needs rebuilding. I added a schedule to my full text index (Databases > [DBName] > Storage > Full Text Catalogs > Right click your index – click properties > Population Schedule) and this created me a new job (SQL Server Agent > Jobs) but when i opened it up and went to steps, nothing was there!  If i tried running the job it would fail because there are no steps!

I found this as a documented bug in the initial release candidate of sql 2005 (since fixed in the service packs) on the microsoft connect site, and added a workaround – basically just add your own job, using the following sql (which i found on msdn) to rebuild your index;

ALTER FULLTEXT CATALOG [catalogue_name] REBUILD;

Of course, this is only a workaround until we can get the latest service pack installed.

, ,

No Comments

Tools – Roy Osherove – Regulazy!

Just found an awesome tool allowing Regex noob’s such as myself, to build up Regex patterns, using only the sample data that you wish to match- go download Regulazy here!

Tools – Roy Osherove – Team Leadership, Agile Development & .NET – Speaking, Consulting, Training and Tools.

No Comments

How to run SQL Profiler against local SQL Express instances

I’m building a project using entity framework and wanted to ensure it wasn’t going mental and spamming the database with more queries than it should- this requires SQL Profiler, but i didn’t know how to connect it to my local instance of sql (I had just added an MDB file to the app’s app_data folder, so it was running via local sql express)

Turns out it’s easy- you just connect to .\SQLEXPRESS database and then execute this query against the master database;

SELECT
owning_principal_name,
instance_pipe_name
FROM
sys.dm_os_child_instances

From the results you will be able fish out the “named pipe” that you can just put into the server name box when connecting with profiler.

Sql Profiler connection dialogue

Sql Profiler connection dialogue

via Brad Wilson: Profiling SQL Server Express User Instances.

, ,

No Comments

Properties getting “k__BackingField” appended to their name in the WSDL file

I was finding k__backingField was being appended to all my object properties when exposed via my a WCF service, in the WSDL.  The solution it turns out was simple- just had to make my class a [DataContract] and mark the properties as [DataMember].

via WCF Data Contracts and “k__BackingField” Property Naming – Nathan Bridgewater.

No Comments

Making your WCF Service compatible with legacy .net 1.1 applications

I’m building an error tracking service which all our future web project will report to, so we can track and tag all our various systems problems from one place- this is currently done with email which is a bit of a nightmare!

According to Microsoft, traditional ASMX web services are now considered “Legacy technology” (!) so I thought I would buite the bullet and build the new services using WCF.

This was fairly painless until I tried to consume the web service in some old .net 1.1 web apps- when trying to add the web reference I received this error message;

Web ReferenceslocalhostReference.map(1): Custom tool warning: DiscoCodeGenerator unable to initialize code generator.  No code generated.

I found a great article over on the MSDN – and all it takes is a small change to the web.config, fiddling with, my old friend, the httpBindings.

I had to swap out the default bindings put in by .net;

        <endpoint address="" binding="wsHttpBinding" contract="HachetteErrorTracker.IErrorLog">
					<identity>
						<dns value="localhost"/>
					</identity>
				</endpoint>

For this one;

<endpoint
           address=""
           binding="basicHttpBinding" bindingNamespace="http://errortracker.localhost/"
           contract="HachetteErrorTracker.IErrorLog"
        />

How to: Configure WCF Service to Interoperate with ASP.NET Web Service Clients.

No Comments