SQL Profiler templates missing

Uncategorized No Comments

If you are connecting to a SQL server with the SQL profiler and none of your templates are showing up, check the version of the SQL server you are connecting to, compare the versions of the SQL profiler you are running and the SQL server you’re connecting to; there is likely a version mismatch.

What’s happening here is that you’re connecting to a SQL 10.50 instance with a SQL 10.0 profiler and the profile templates for 10.50 aren’t present.

In the case of the profiler from SQL 2008 connecting to a SQL 2008 R2 instance, copy your 100 profile templates folder (default install is at C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Profiler\Templates\Microsoft SQL Server\100) into a new folder in the same location with the name “1050″ i.e. C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Profiler\Templates\Microsoft SQL Server\1050.

Then try to reconnect, and you’ll have access to the profile templates and everything will work fine.

More information about SQL versions can be found at: http://sqlserverbuilds.blogspot.com/

Loading jQuery via HTTP or HTTPS depending on the request protocol without document.write

Uncategorized No Comments

When running a page with HTTPS, you’ll want to also load any external resources such as javascript via HTTPS. A lot of people recommend loading jQuery from the Google CDN via the following javascript script:

<script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + gaJsHost + "ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js' type='text/javascript'%3E%3C/script%3E"));
    document.write(unescape("%3Cscript src='" + gaJsHost + "ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js' type='text/javascript'%3E%3C/script%3E"));
    document.write(unescape("%3Cscript src='" + gaJsHost + "ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js' type='text/javascript'%3E%3C/script%3E"));
</script>

This works just fine, however you can let the browser select the protocol depending on the request by the following snippet:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>

This is obviously much cleaner, and you can see the full URL rather than javascript code to build up a string. The key here is the double slash within the src attribute. This kind of url works for any web resource and is particularly useful for loading resources from the Google CDN.

Some 3D Art I worked on Recently

Uncategorized No Comments
Icons by N.Design Studio. Designed By Ben Swift, modified by Matt Button. Powered by WordPress, and Free WordPress Themes
Entries RSS Comments RSS Log in

Page optimized by WP Minify WordPress Plugin