<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bisql.net &#187; MySQL</title>
	<atom:link href="http://www.bisql.net/category/floss/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bisql.net</link>
	<description>Ashley Burton&#039;s BI, SQL &#38; Mobile Dev Blog</description>
	<lastBuildDate>Tue, 24 Jan 2012 06:09:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Using MySQL BLOB Data via ODBC in SSIS, SQL Server &amp; Business Objects</title>
		<link>http://www.bisql.net/2011/03/mysql-odbc-blob/</link>
		<comments>http://www.bisql.net/2011/03/mysql-odbc-blob/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 20:58:36 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[blob]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[mys]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=811</guid>
		<description><![CDATA[Whilst trying to build a centralised cross-platform alerting system I spotted a peculiar issue when trying to move the output of a SHOW FULL PROCESSLIST command on MySQL via ODBC.  It seems that the output of the SHOW FULL PROCESSLIST command returns both integers and binary (BLOB) data types even though to they eye (that [...]]]></description>
			<content:encoded><![CDATA[
<p>Whilst trying to build a centralised cross-platform alerting system I spotted a peculiar issue when trying to move the output of a SHOW FULL PROCESSLIST command on MySQL via ODBC.  It seems that the output of the SHOW FULL PROCESSLIST command returns both integers and binary (BLOB) data types even though to they eye (that is, in the MySQL Query Browser) most of the columns appear to be short text fields.</p>
<p>Despite the fact that the data <em>looks</em> like text whenever I tried to return the data into an application, I tried SSIS, SQL Server Linked Servers <em>and</em> Business Objects, each time the data would come back unusable or an error would be returned.  Business Objects gave me the key by declaring &#8220;This is a BLOB.&#8221; as you can see in the following screenshots&#8230;</p>
<p><span style="text-decoration: underline;">SQL Server Integration Services</span></p>
<p><em><img class="alignnone size-full wp-image-819" title="mysql_blob_ssis_01" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_06.png" alt="" width="508" height="186" /></em></p>
<p><span style="text-decoration: underline;">SQL Server Linked Server</span></p>
<p><img class="alignnone size-full wp-image-818" title="mysql_blob_linked_02" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_05.png" alt="" width="352" height="163" /></p>
<p><span style="text-decoration: underline;">Business Objects Desktop Intelligence</span></p>
<p><span style="text-decoration: underline;"><img class="alignnone size-full wp-image-814" title="mysql_blob_busobj_01" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_01.png" alt="" width="169" height="138" /></span></p>
<p>As with my recent post about <a title="Loading Data into MySQL Using SSIS" href="http://www.bisql.net/2011/03/pgsql_ssis_mysql/" target="_blank">loading data into MySQL with SSIS</a> the saviour turns out to be an ODBC configuration setting, this time in the Metadata tab of the MySQL ODBC driver.  All you have to do is check the &#8220;Always handle binary function results as character data&#8221; and instantly your problems will be solved&#8230;</p>
<p><img class="alignnone size-full wp-image-815" title="mysql_blob_odbc" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_02.png" alt="" width="387" height="267" /></p>
<p>Out of a crazy fit of completeness I also took screenshots of the final results and it&#8217;d be a shame to waste them so here they are&#8230;</p>
<p><span style="text-decoration: underline;">SQL Server Integration Services</span></p>
<p><img class="alignnone size-full wp-image-822" title="mysql_blob_ssis_02" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_08.png" alt="" width="457" height="149" /></p>
<p><span style="text-decoration: underline;">SQL Server Linked Server</span></p>
<p><span style="text-decoration: underline;"><img class="alignnone size-full wp-image-817" title="mysql_blob_linked_03" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_04.png" alt="" width="277" height="125" /><br />
</span></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;">Business Objects Desktop Intelligence</span></p>
<p><img class="alignnone size-full wp-image-816" title="mysql_blob_busobj_02" src="http://www.bisql.net/wp-content/uploads/2011/03/mysql_blob_03.png" alt="" width="377" height="77" /></p>
<p>&nbsp;</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2011%252F03%252Fmysql-odbc-blob%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Using%20MySQL%20BLOB%20Data%20via%20ODBC%20in%20SSIS%2C%20SQL%20Server%20%26%20Business%20Objects%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2011/03/mysql-odbc-blob/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loading Data into MySQL with SSIS via ODBC (sql_mode = ANSI)</title>
		<link>http://www.bisql.net/2011/03/pgsql_ssis_mysql/</link>
		<comments>http://www.bisql.net/2011/03/pgsql_ssis_mysql/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 18:40:27 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[SSIS]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ADO]]></category>
		<category><![CDATA[BIDS]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[Integration Services]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[Postgres]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=798</guid>
		<description><![CDATA[I was performing a test earlier, a proof-of-concept to show that we could use Integration Services to move data from one platform (PostgreSQL) to another (MySQL) without SQL Server itself being involved at all.  Unfortunately I hit a slight snag on the first simple attempt, I could read the data without a hitch but despite [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-full wp-image-799" title="PostgreSQL to MySQL via SSIS 1" src="http://www.bisql.net/wp-content/uploads/2011/03/pg_ssis_mysql_01.png" alt="" width="210" height="245" />I was performing a test earlier, a proof-of-concept to show that we could use Integration Services to move data from one platform (PostgreSQL) to another (MySQL) without SQL Server itself being involved at all. </p>
<p>Unfortunately I hit a slight snag on the first simple attempt, I could read the data without a hitch but despite multiple attempts at tweaking SSIS settings and reconfiguring connections I could not manage to get data into the MySQL target table.  Amongst other messages in the Output window in BIDS I could see the following error&#8230;</p>
<p>[MySQL][ODBC 5.1 Driver][mysqld-5.0.45-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;&#8221;tblDestination&#8221; (&#8220;col1&#8243;, &#8220;col2&#8243;, &#8220;col3&#8243;, &#8220;col4&#8243;, &#8220;col5&#8243;, &#8220;c&#8217; at line 1</p>
<p>After some Googling I determined that the issue was down to an incompatibility between the SQL being generated by SSIS and the default MySQL engine, specifically that MySQL was not setup to accept ANSI compliant SQL.  Most of the solutions out there seemed to require that the entire server was configured in the ANSI compliant mode which was a problem for me as it&#8217;s a shared server and I can&#8217;t go reconfiguring it at will.  Thankfully MySQL provides the ability to set the mode on a per connection level with the following command&#8230;</p>
<pre style="padding-left: 30px;">SET SESSION sql_mode= 'ansi';</pre>
<p>The trick is &#8211; how to get SSIS to run this before inserting the data without messing with the package itself?  The easiest way is to have the ODBC driver send the command at the point SSIS opens the connection, this can be configured in the settings of the ODBC source&#8230;</p>
<p><img class="alignnone size-full wp-image-807" title="PostgreSQL to MySQL via SSIS 2" src="http://www.bisql.net/wp-content/uploads/2011/03/pg_ssis_mysql_02.png" alt="" width="395" height="316" /></p>
<p>This is a relatively common feature of ODBC drivers and allows you to setup initial configuration options for this exact reason, now I know that I will not impact any other users of the server and my SSIS package works just fine.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2011%252F03%252Fpgsql_ssis_mysql%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Loading%20Data%20into%20MySQL%20with%20SSIS%20via%20ODBC%20%28sql_mode%20%3D%20ANSI%29%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2011/03/pgsql_ssis_mysql/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Quick Tip – MySQL Equivalent of ISNUMERIC()</title>
		<link>http://www.bisql.net/2010/12/quick-tip-mysql-equivalent-of-isnumeric/</link>
		<comments>http://www.bisql.net/2010/12/quick-tip-mysql-equivalent-of-isnumeric/#comments</comments>
		<pubDate>Mon, 20 Dec 2010 18:14:54 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ISNUMBER]]></category>
		<category><![CDATA[ISNUMERIC]]></category>
		<category><![CDATA[RegExp]]></category>
		<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=558</guid>
		<description><![CDATA[In one of the source databases for my data warehouse I have a table of contact telephone numbers, stored as VARCHAR() values since where a number is not available the record might say &#8220;unknown&#8221;, or &#8220;N/A&#8221;.  So to extract a list of all valid telephone telephone numbers I need to perform a logical test and one of [...]]]></description>
			<content:encoded><![CDATA[
<p>In one of the source databases for my data warehouse I have a table of contact telephone numbers, stored as VARCHAR() values since where a number is not available the record might say &#8220;unknown&#8221;, or &#8220;N/A&#8221;.  So to extract a list of all valid telephone telephone numbers I need to perform a logical test and one of the simplest checks I can perform is to verify that the number is actually a number. </p>
<p>This would be pretty straight-forward in Excel with the <span style="font-family: Courier New; font-size: small; color: maroon;">ISNUMBER</span><span style="color: maroon;">(</span><span style="color: maroon;">) </span>function, or in T-SQL with <span style="font-family: Courier New; font-size: small; color: maroon;">ISNUMERIC</span><span style="color: maroon;">(</span><span style="color: maroon;">)</span>, but neither work in MySQL so after a little searching around I came across this solution&#8230;</p>
<p><span style="font-family: Courier New; font-size: small;"><span style="color: blue;">SELECT</span> <span style="color: blue;">DISTINCT</span> <span style="color: maroon;">contact_number</span><br />
<span style="color: blue;">FROM</span> <span style="color: maroon;">customers</span><br />
<span style="color: blue;">WHERE</span> <span style="color: maroon;">contact_number</span> <span style="color: blue;">REGEXP</span> <span style="color: maroon;">(</span><span style="color: red;">&#8216;[0-9]&#8216;</span><span style="color: maroon;">)</span></span></p>
<p>Effectively we&#8217;re processing a regular expression on the contents of the &#8216;contact_number&#8217; field, it may seem like using a sledgehammer to crack a nut and I&#8217;ve no idea how performance would differ from a more simple approach but it worked and I guess that&#8217;s the point.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F12%252Fquick-tip-mysql-equivalent-of-isnumeric%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fg45nZL%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Quick%20Tip%20%E2%80%93%20MySQL%20Equivalent%20of%20ISNUMERIC%28%29%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/12/quick-tip-mysql-equivalent-of-isnumeric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 32-bit ODBC Invalid Attribute String 64-bit Windows 7</title>
		<link>http://www.bisql.net/2010/11/mysql-odbc-ias/</link>
		<comments>http://www.bisql.net/2010/11/mysql-odbc-ias/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 12:49:19 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[32-bit]]></category>
		<category><![CDATA[64-bit]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DeskI]]></category>
		<category><![CDATA[Desktop Intelligence]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[Win7]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=501</guid>
		<description><![CDATA[Having just migrated my development PC to Windows 7 I&#8217;m slowly encountering perculiar issues as I setup all of the software and connections I used to have in Windows XP.  This morning I was trying to write a Business Objects report against a MySQL database and because Desktop Intelligence is a 32-bit application if I want it to talk to MySQL [...]]]></description>
			<content:encoded><![CDATA[
<p>Having just migrated my development PC to Windows 7 I&#8217;m slowly encountering perculiar issues as I setup all of the software and connections I used to have in Windows XP.  This morning I was trying to write a Business Objects report against a MySQL database and because Desktop Intelligence is a 32-bit application if I want it to talk to MySQL I have to use the 32-bit driver. </p>
<p>I obtained the latest driver (5.1.7) from MySQL&#8217;s standard <a title="MySQL ODBC Connector" href="http://dev.mysql.com/downloads/connector/odbc/5.1.html" target="_blank">ODBC Connector</a> page, installed it and added a System DSN without a hitch, the odd part came when Business Objects was returning only one row from a query that should return a couple of hundred.  Having run the same query on XP (I&#8217;m parallel running now) I suspected that the problem must be with the ODBC configuration so I attempted to delete the DSN only to receive the &#8220;Invalid attribute string&#8221; error&#8230;</p>
<p><a href="http://www.bisql.net/wp-content/uploads/2010/11/MySQL_ODBC_02.png"><img class="alignnone size-full wp-image-500" title="MySQL_ODBC_02" src="http://www.bisql.net/wp-content/uploads/2010/11/MySQL_ODBC_02.png" alt="" width="373" height="184" /></a></p>
<p>A little Googling later led me to <a title="MySQL Bug #56233" href="http://bugs.mysql.com/bug.php?id=56233" target="_blank">MySQL Bug #56233</a>, in the discussion Fred Zappert frames the simplest solution suggested which is to uninstall version 5.1.7 and install version 5.1.6 instead.  Oddly MySQL don&#8217;t make it especially clear how to get hold of previous minor versions of the ODBC drivers but you can get it from here: <a href="http://www.mysql.com/get/Downloads/Connector-ODBC/5.1/mysql-connector-odbc-5.1.6-win32.msi/from/http://www.mirrorservice.org/sites/ftp.mysql.com/" target="_blank">mysql-connector-odbc-5.1.6-win32.msi </a></p>
<p>Alternatively you could always visit bisql.net&#8217;s <a title="Tools, Utilities and ODBC Drivers" href="http://www.bisql.net/tools-odbc/" target="_blank">Tools, Utilities and ODBC Drivers</a> page where I have a link for 5.1.6 which I&#8217;ll keep in place until the next Windows 7 compatible driver is released.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F11%252Fmysql-odbc-ias%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22MySQL%2032-bit%20ODBC%20Invalid%20Attribute%20String%2064-bit%20Windows%207%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/11/mysql-odbc-ias/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BusObj + MySQL &#8211; SQLBindParameter State 07001</title>
		<link>http://www.bisql.net/2010/07/sqlbindparameter/</link>
		<comments>http://www.bisql.net/2010/07/sqlbindparameter/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 12:40:49 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[DeskI]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[SQLBindParameter]]></category>
		<category><![CDATA[Universe]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=365</guid>
		<description><![CDATA[I recently encountered a strange problem in Business Objects whilst trying to create a derived table against a MySQL database and whilst the query was a complex one it executed without fault in the MySQL Query Browser so I knew that wasn&#8217;t the probem.  The error message I encountered was &#8220;SQLBindParameter not used for all parameters&#8221;&#8230; I tried [...]]]></description>
			<content:encoded><![CDATA[
<p>I recently encountered a strange problem in Business Objects whilst trying to create a derived table against a MySQL database and whilst the query was a complex one it executed without fault in the MySQL Query Browser so I knew that wasn&#8217;t the probem.  The error message I encountered was &#8220;SQLBindParameter not used for all parameters&#8221;&#8230;</p>
<p><img class="alignnone size-full wp-image-367" title="SQLBindParameter" src="http://www.bisql.net/wp-content/uploads/2010/07/SQLBindParameter.jpg" alt="" width="486" height="118" /></p>
<p>I tried the same query as a Freehand SQL query in DeskI and received the same error, after banging my head against the problem for about 15 minutes I decided to take my favourite solution &#8211; I went for lunch!  On return the solution seemed blindingly obvious, at the very top of my query I&#8217;d included a comment but in the comment I&#8217;d included a question mark &#8211; as soon as I removed the &#8220;?&#8221; the query ran without a hitch.  I&#8217;m not quite sure of the reason behind this but I suspect that one of the Business Objects, ODBC or MySQL layers treats the &#8220;?&#8221; as a reserved character to indicate a parameterised query &#8211; if anyone has the answer i&#8217;d be interested to know.</p>
<p><a href="http://www.bisql.net/wp-content/uploads/2010/07/SQLBindParameter.jpg"></a></p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F07%252Fsqlbindparameter%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FbOS0KA%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22BusObj%20%2B%20MySQL%20-%20SQLBindParameter%20State%2007001%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/07/sqlbindparameter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Databases and Users in MySQL</title>
		<link>http://www.bisql.net/2010/06/mysql-user-creation/</link>
		<comments>http://www.bisql.net/2010/06/mysql-user-creation/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 10:46:21 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[DBA]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Admin Administrator]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[User]]></category>

		<guid isPermaLink="false">http://www.bisql.net/?p=270</guid>
		<description><![CDATA[Historically I&#8217;ve been a Microsoft SQL Server guy but I&#8217;ve been doing quite a bit of query &#38; analysis work on MySQL lately, though I&#8217;ve never performed any serious MySQL DBA. Well, the other day I was asked by a friend how to create a user and allow read/write access to a newly created database [...]]]></description>
			<content:encoded><![CDATA[
<p>Historically I&#8217;ve been a Microsoft SQL Server guy but I&#8217;ve been doing quite a bit of query &amp; analysis work on MySQL lately, though I&#8217;ve never performed any serious MySQL DBA. Well, the other day I was asked by a friend how to create a user and allow read/write access to a newly created database and this had to be done in SQL (i.e. no GUI tools or <a title="PHPMyAdmin" href="http://www.phpmyadmin.net/home_page/index.php" target="_blank">PHPMyAdmin</a>).</p>
<p>Since I was starting from scratch I thought I&#8217;d put together a little script to create the database, add some data, create a user, prove that the user had write access and then tidy up after myself (always good to do!).<code></p>
<div><span style="font-family: Courier New; font-size: 10pt;"> </span></div>
<div><span style="font-family: Courier New; font-size: 10pt;"> </span></div>
<p><span style="font-family: Courier New; font-size: 10pt;"> </span></p>
<div><span style="color: #0000ff;">CREATE</span> <span style="color: #0000ff;">DATABASE</span> <span style="color: #800000;">ash_db</span><span style="color: #c0c0c0;">;</span></div>
<div><span style="color: #c0c0c0;"><span style="color: #000000;"><br />
</span></span></div>
<div><span style="color: #0000ff;">USE</span> <span style="color: #800000;">ash_db</span><span style="color: #c0c0c0;">;</span></div>
<div><span style="color: #c0c0c0;"><br />
</span></div>
<div><span style="color: #0000ff;">CREATE</span> <span style="color: #0000ff;">TABLE</span> <span style="color: #800000;">ash_tbl</span> <span style="color: #800000;">(</span><span style="color: #800000;">id</span> <span style="color: #000000;"><em>INT</em></span> <span style="color: #0000ff;">NOT</span> <span style="color: #0000ff;">NULL</span><span style="color: #c0c0c0;">,</span><span style="color: #800000;">name</span> <span style="color: #000000;"><em>CHAR</em></span><span style="color: #800000;">(</span><span style="color: #000000;">50</span><span style="color: #800000;">)</span> <span style="color: #0000ff;">NOT</span> <span style="color: #0000ff;">NULL</span><span style="color: #800000;">)</span><span style="color: #c0c0c0;">;</span></div>
<div><span style="color: #c0c0c0;"><br />
</span></div>
<div><span style="color: #0000ff;">INSERT</span> <span style="color: #0000ff;">INTO</span> <span style="color: #800000;">ash_tbl</span> <span style="color: #800000;">(</span><span style="color: #800000;">id</span><span style="color: #c0c0c0;">,</span><span style="color: #800000;">name</span><span style="color: #800000;">)</span> <span style="color: #0000ff;">VALUES</span><span style="color: #800000;">(</span><span style="color: #000000;">1</span><span style="color: #c0c0c0;">,</span><span style="color: #ff0000;">'Ash'</span><span style="color: #800000;">)</span><span style="color: #c0c0c0;">;</span></div>
<div><span style="color: #c0c0c0;"><br />
</span></div>
<div><span style="color: #0000ff;">SELECT</span> <span style="color: #c0c0c0;">*</span> <span style="color: #0000ff;">FROM</span> <span style="color: #800000;">ash_tbl</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
CREATE</span> <span style="color: #0000ff;">USER</span> <span style="color: #ff0000;">'ash_user'</span> <span style="color: #800000;">IDENTIFIED</span> <span style="color: #0000ff;">BY</span> <span style="color: #ff0000;">'ash_pass'</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
GRANT</span> <span style="color: #0000ff;">ALL</span> <span style="color: #800000;">PRIVILEGES</span> <span style="color: #0000ff;">ON</span> <span style="color: #800000;">ash_db</span><span style="color: #c0c0c0;">.</span><span style="color: #c0c0c0;">*</span> <span style="color: #0000ff;">TO</span> <span style="color: #800000;">ash_user</span><span style="color: #008000;">;<br />
<em><br />
-- LOGIN AS ash_user THEN EXECUTE THIS...<br />
<span style="color: #000000; font-style: normal;"><span style="color: #0000ff;"><br />
INSERT</span> <span style="color: #0000ff;">INTO</span> <span style="color: #800000;">ash_tbl</span> <span style="color: #800000;">(</span><span style="color: #800000;">id</span><span style="color: #c0c0c0;">,</span><span style="color: #800000;">name</span><span style="color: #800000;">)</span> <span style="color: #0000ff;">VALUES</span><span style="color: #800000;">(</span><span style="color: #000000;">2</span><span style="color: #c0c0c0;">,</span><span style="color: #ff0000;">'Burton'</span><span style="color: #800000;">)</span><span style="color: #c0c0c0;">;<br />
<em></p>
<p></em></span></span></em><em><em>-- THEN LOG OUT AND COME BACK HERE<br />
<span style="color: #000000; font-style: normal;"><span style="color: #0000ff;"><br />
SELECT</span> <span style="color: #c0c0c0;">*</span> <span style="color: #0000ff;">FROM</span> <span style="color: #800000;">ash_tbl</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
DROP</span> <span style="color: #0000ff;">TABLE</span> <span style="color: #800000;">ash_tbl</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
DROP</span> <span style="color: #0000ff;">USER</span> <span style="color: #800000;">ash_user</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
USE</span> <span style="color: #800000;">information_schema</span><span style="color: #c0c0c0;">;<br />
<span style="color: #000000;"><span style="color: #0000ff;"><br />
DROP</span> <span style="color: #0000ff;">DATABASE</span> <span style="color: #800000;">ash_db</span><span style="color: #c0c0c0;">;</span></span></span></span></span></span></span></span></span></span></em></em></p>
<p></span></span></span></span></span></div>
<p></code></p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F06%252Fmysql-user-creation%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2Fd7muzv%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Creating%20Databases%20and%20Users%20in%20MySQL%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/06/mysql-user-creation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to show the version number in MS SQL Server, Sybase and MySQL</title>
		<link>http://www.bisql.net/2010/01/how-to-show-the-version-number-in-ms-sql-server-sybase-and-mysql/</link>
		<comments>http://www.bisql.net/2010/01/how-to-show-the-version-number-in-ms-sql-server-sybase-and-mysql/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 15:16:32 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Sybase]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=167</guid>
		<description><![CDATA[Just a quick post &#8211; I often need to find out what version of a database platform I am running SQL against (presuming this is not my own server!), this may come up whenever you are contemplating upgrades, diagnosing faults or looking for features in documentation.  In Microsoft SQL Server, Sybase and MySQL (and perhaps other [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-medium wp-image-176" title="Upgrade Board" src="http://bisql.net/wp-content/uploads/2010/01/iStock_000001500338XSmall-300x213.jpg" alt="Upgrade Board" width="180" height="128" />Just a quick post &#8211; I often need to find out what version of a database platform I am running SQL against (presuming this is not my own server!), this may come up whenever you are contemplating upgrades, diagnosing faults or looking for features in documentation.  In Microsoft SQL Server, Sybase and MySQL (and perhaps other platforms) the command is&#8230;<br />
<span style="font-size: small; font-family: Courier New;"><br />
<span style="color: #0000ff;">SELECT</span> <span style="color: #ff00ff;"><em>@@VERSION</em><br />
</span></span></p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2010%252F01%252Fhow-to-show-the-version-number-in-ms-sql-server-sybase-and-mysql%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22How%20to%20show%20the%20version%20number%20in%20MS%20SQL%20Server%2C%20Sybase%20and%20MySQL%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2010/01/how-to-show-the-version-number-in-ms-sql-server-sybase-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Business Objects Fails to Retrieve Rows from MySQL Table</title>
		<link>http://www.bisql.net/2009/12/busobj-fail-mysql/</link>
		<comments>http://www.bisql.net/2009/12/busobj-fail-mysql/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 13:02:23 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Business Objects]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[business objects]]></category>
		<category><![CDATA[CAST]]></category>
		<category><![CDATA[Character Set]]></category>
		<category><![CDATA[fail]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=157</guid>
		<description><![CDATA[I just encountered a very odd situation in Business Objects where a Web Intelligence (WebI) report running against a MySQL v5 database suddenly stopped returning any rows, even though the data had not been deleted.  It turned out that the underlying application had been upgraded and the database schema had undergone a few minor changes [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-medium wp-image-164" title="Empty Rows" src="http://bisql.net/wp-content/uploads/2009/12/iStock_000010264437XSmall-300x195.jpg" alt="Empty Rows" width="194" height="127" />I just encountered a very odd situation in Business Objects where a Web Intelligence (WebI) report running against a MySQL v5 database suddenly stopped returning any rows, even though the data had not been deleted.  It turned out that the underlying application had been upgraded and the database schema had undergone a few minor changes but essentially the table structure appeared not to have changed at all. </p>
<p>After investigating for a few hours I managed to rule out the change in storage engine (from MyISAM to InnoDB) and had managed to narrow the issue down to a single varchar column.  I didn&#8217;t have access to the pre-upgrade table scripts so I couldn&#8217;t see what had changed but I did notice that in the new table definition the character set of the column was being specified as ASCII like so&#8230;</p>
<p><span style="color: #800000;">`column`</span> <span style="color: #000000;"><em>VARCHAR</em><span style="color: #800000;">(</span><span style="color: #000000;">10</span><span style="color: #800000;">) </span><span style="color: #0000ff;">CHARACTER </span><span style="color: #0000ff;">SET </span><span style="color: #0000ff;">ASCII </span><span style="color: #0000ff;">DEFAULT </span><span style="color: #0000ff;">NULL </span></span></p>
<p>To fix this I went back to the Universe level and amended my object definition to CAST the column values&#8230;</p>
<p><span style="color: #800000;"><span style="color: #0000ff;">CAST<span style="color: #800000;">(</span></span>`column` <span style="color: #0000ff;">AS </span></span><span style="color: #000000;"><em>CHAR </em><span style="color: #0000ff;">CHARACTER</span> <span style="color: #0000ff;">SET</span> <span style="color: #0000ff;">UTF8<span style="color: #800000;">)</span></span></span></p>
<p>That solved the problem, if you have the same issue &#8211; I hope this helps you on your way.</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2009%252F12%252Fbusobj-fail-mysql%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Business%20Objects%20Fails%20to%20Retrieve%20Rows%20from%20MySQL%20Table%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2009/12/busobj-fail-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learn Microsoft SQL Server for Free</title>
		<link>http://www.bisql.net/2009/12/learn-msql-free/</link>
		<comments>http://www.bisql.net/2009/12/learn-msql-free/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 06:59:27 +0000</pubDate>
		<dc:creator>Ash</dc:creator>
				<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Evaluation]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[RDBMS]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Trial]]></category>

		<guid isPermaLink="false">http://bisql.net/?p=62</guid>
		<description><![CDATA[I had a conversation with a colleague recently about how to start teaching yourself SQL Server  skills outside of the workplace, he&#8217;d read an article on SQL Server Central that recommended buying the Developer Edition of Microsoft SQL Server which I think is a great idea but if you&#8217;re really just starting out with SQL [...]]]></description>
			<content:encoded><![CDATA[
<p><img class="alignright size-thumbnail wp-image-74" title="Free Mac Pro" src="http://bisql.net/wp-content/uploads/2009/12/iStock_000005541595XSmall-150x150.jpg" alt="Free Mac Pro" width="150" height="150" />I had a conversation with a colleague recently about how to start teaching yourself SQL Server  skills outside of the workplace, he&#8217;d read <a href="http://www.sqlservercentral.com/articles/DBA/68526/" target="_blank">an article</a> on <a href="http://www.sqlservercentral.com/" target="_blank">SQL Server Central</a> that recommended buying the Developer Edition of Microsoft SQL Server which I think is a great idea but if you&#8217;re really just starting out with SQL Server why not do it for free?</p>
<p>Luckily, there are a number of ways that Microsoft helps us to do this&#8230;</p>
<p><a href="http://www.microsoft.com/express/sql/default.aspx" target="_blank">Microsoft SQL Server Express 2008</a> is a cut-down (but not time-limited) version of the full SQL Server 2008 product restricted to 1 CPU, 1GB RAM and one single 4GB database.  The express edition contains the core database engine as well as the excellent Management Studio (IDE) and if you download the &#8220;Runtime with Advanced Services&#8221; version you also get Reporting Services, enabling you to build, deploy and run a small-scale BI solution.  Please note that the express edition does <em>not</em> come with SQL Server Agent (scheduling) or Integration Services (ETL) but you do get the Import/Export wizard to help move data around &#8211; check out the <a href="http://www.microsoft.com/sqlserver/2008/en/us/editions-compare.aspx" target="_blank">full comparison</a> for more detail.</p>
<p>Alternatively, if you want to run with the big dogs you could try <a href="http://www.microsoft.com/SQLserver/2008/en/us/trial-software.aspx" target="_blank">SQL Server 2008 Evaluation Edition</a> which contains all the features of the Enterprise Edition but has a time limit of 180 days.</p>
<p>If you&#8217;re just starting out and want to get the hang of basic data manipulation, writing queries, creating tables, etc. then you&#8217;re probably better off with the Express version.   It&#8217;s smaller and won&#8217;t use up as much space/RAM on your PC and you won&#8217;t have to worry about the time running out &#8211; there&#8217;s also a chance that you&#8217;d be overwhelmed by all of the other features and products that are bundled with the Evaluation version and in the beginning it&#8217;s always better to keep things simple. If you&#8217;re already an intermediate-advanced user of SQL Server or another database platform, or you already know that you&#8217;re interested in SSIS or Analysis Services then you might as well get hold of the evaluation version but don&#8217;t forget that it&#8217;s time limited!</p>
<div class="topsy_widget_data topsy_theme_light-green" style="float: left;margin-bottom: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.bisql.net%252F2009%252F12%252Flearn-msql-free%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Learn%20Microsoft%20SQL%20Server%20for%20Free%22%20%7D);"></div>

]]></content:encoded>
			<wfw:commentRss>http://www.bisql.net/2009/12/learn-msql-free/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

