Following on from Leo Pasta's lead, I've created two stored procedures to make printing out a message without waiting for a batch or transaction to completed. InstantPrint and InstantPrintTime
While trying to use SQLCMD to produce an app.config file, I encountered problems with the output being truncated.
The script was similar to:
DECLARE @appconfig XML
SET @appconfig = '<configuration></configuration>'
... Insert configuration nodes
-- Output the config
SELECT @appconfig as ApplicationConfiguration
The default options for SQLCMD produced output like:
(the value was a little longer, but cut off at the end)
Clearly the xml was not valid. There's header text included, corrupted tags, and missing closing tags. So I hunted through books online and google for an answer.
Turns out I needed to use the -y 0 option, which will output xml columns up to 1MB in size.
Also the -h-1 (without any spaces) will remove the header from the output.
If you are planning to use SQLCMD to output XML, remember: Hey Yo! -h-1 -y 0!
Working from home using a remote desktop has turned out to be surprisingly responsive. There's little to no lag, and I can still do most things (except use some windows shortcuts).
My current gripe is that Menus take a while to display because of fancy fade-ins and smooth expansion. It all looks nice when you are sitting in front of a PC, but remotely, it just uses more bandwith and wastes time.
So when you start working remotely, save yourself sometime and turn off Window's lovely effects, and go for a responsive connection: disable the effects.
Well I've definitely been "missing" on my blog lately. Between work commitments, a long daily commute, and personal projects, I've had no time to post much content on my website.
As of last week, I started working some days remotely; from home. Its been quiet a good change, and now that I have less distractions: I get a lot more work done. I've be able to finish off a lot of interrupted tasks. Get my head around how to organise and structure my day when working from home. I'm more focused, planned, and driven. I'm delivering more results each day, and as a result having more time for taking on more responsibilities comfortably.
But working remotely isn't all about work. Its also about re-gaining some of your personal time. I was spending about 10-15 hours per week travelling to work in my car. I planned my travel to try and avoid peak hour traffic, but where my employer is situated there are no direct travel routes. Public transport (commuter train & bus or bus & ferry & bus or bus & bus & bus & bus) would have seen me spending twice as long driving each day. My car has an awesome stereo, so the drive is not too stressful most days.
Ah! Again! Talking about work and the commute! See how I never got time for myself?
So now that I'm actually getting a few days a week working from home, I have time to get more things done. I'm not as tired. My energy level has sky rocketed. And my relationship has definately benefited. I've got time to persue more study, more personal projects, art, catch up with friends, and get back to writing useful tips for other SQL Server users.
Work has also benefitted. I've started to take an interest in managing myself more and co-ordinating my work with others better. Whilst working from home is ultimately a selfish want, it is definately improving my team skills.
So over the next coming weeks, expect a lot more from me. I'll be posting regularly on SQL Server 2005, including scalability with Service Broker and Notfication Services, Management Studio, and Visual Studio for Database Professionals especially Unit Tests.
So if you have any lagging questions or a SQL problem you'd like some tips for, send me an email sqlquestiokuiters.id.au
Open a new connection by choosing File menu -> Connect Object Explorer in SQL Server Management Studio.
Change the Server Type to SQL Server Compact Edition.
For Database file: put the full path to an existing SQL Server Compact Edition .sdf file; click the drop-down button, and select New Database or Browse to locate a .sdf file.
There is already a number of links to my other domains, so I needed to configure Geeklog to redirect people to the new domain. I think that re-direct pages are pretty annoying, so I opted to use “HTTP/1.1 301 Moved Permanently” to indicate to browsers and search engines the new address.
After quite a few attempts at inserting the redirect code in the theme, I opted to place it in the lib-common.php file.
The basic code to redirect any connects not on my primary domain is:
if ($_SERVER['SERVER_NAME'] != 'www.julian-kuiters.id.au')
{
header("HTTP/1.1 301 Moved Permanently"); // Convert to GET
header("Location: http://www.julian-kuiters.id.au" . $_SERVER['REQUEST_URI']);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
}
And I inserted it into the function COM_siteHeader of lib-common.php
function COM_siteHeader( $what = 'menu', $pagetitle = '', $headercode = '' )
{
global $_CONF, $_TABLES, $_USER, $LANG01, $LANG_BUTTONS, $LANG_CHARSET,
$LANG_DIRECTION, $_IMAGE_TYPE, $topic, $_COM_VERBOSE;
//jkuiters 20070420
if ($_SERVER['SERVER_NAME'] != 'www.julian-kuiters.id.au')
{
header("HTTP/1.1 301 Moved Permanently"); // Convert to GET
header("Location: http://www.julian-kuiters.id.au" . $_SERVER['REQUEST_URI']);
header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
}
// If the theme implemented this for us then call their version instead.
$function = $_CONF['theme'] . '_siteHeader';
As you can now see, the same url on differentdomains automatically takes you to the correct site.
We have over 13 years experience designing and building websites. We can handle websites of all sizes, from a simple web presence to a fully customised database driven website designed to handle thousands of customers a minute.
We can create you a custom website from scratch - that meets your needs as a business. And we can update your existing website if you wish.
Our design services can produce stunning website, print and logo designs that will create a recognisable brand for your business and invoke customer loyalty.
Our aim is to increase your sales and increase your customers through brand recognition and targeted marketing