Tuesday, September 21, 2010

For reference: my current question was how to optimise a query which does a > comparison on two columns.... I can see how to do it using a computed column with an index, but that's not available to me at present - as I'm using Fluent nhibernate...

This question helped a bit "What happens when a function is used in the WHERE clause? In that case, the index will not be used because the function will have to be applied to every row in the table."

Do you make transaction backups?Yes -> Do not shrink the log unless you have done some exceptional operation (such as a massive delete) as the "cost" of SQL Server re-growing the Log file is significant, and will lead to fragmentation and thus worse performance.No and I don't want to -> Change the Recovery Model to "Simple" - Enterprise Manager : Right click database : Properties @ [Options]Don't know -> Transaction log backups allow you to recover to a "point in time" - you restore the last Full Backup (and possibly a subsequently Differential backup) and then every log backup, in sequence, until the "point in time" that you want to roll-forward to.

SQL Azure Backup and RestoreSQL Azure does not support the normal SQL Server BACKUP commands.

It does provide inherent data redundancy and reliability. However, this will not help if:

There is an app bug which corrupts your data.

There's a hacker who destroys your data

The Microsoft's datacenter loses all of your data (unlikely but possible)

To cope with these scenarios, there are two mechanisms currently available to backup your data:

You can use the SQL Azure copy commands to copy your database contents to a second, still stored within SQL Azure - this will protect again only the first problem above (assuming the hacker has a way into your Azure store)

You can use the open source SQL Azure Migration Wizard to download data to a local copy - this will provide a recovery mechanism for all 3 items above

The use of this second tool is discussed further below:

SQL Azure Data Migration

Warning - using this for a backup process will involve a large amount of data transfer (which will cost money), but it's better than not having a backup at all.

Monday, September 13, 2010

If you're trying to debug a Bada device and you see "The "COM0" port did not open." under the entry for the Broker.exe in the Bada IDE Console, then:

1. If it's the first time you've ever tried to connect then check that you've installed the necessary USB drivers and have the device attached. 2. If you've previously been using this fine, but this has suddenly stopped working then try: --- rebooting your phone --- killing broker.exe in the PC task manager --- setting your phone's USB connect to Samsung Kies or to Mass Storage, and then using Run As rather than Debug As in the IDE --- hit the task manager on the phone and choose "End All Applications"

I'm not entirely sure what worked for me... but I think it was a combination of the last few in the end!