<?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>Admins Goodies &#187; sql</title>
	<atom:link href="http://adminsgoodies.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://adminsgoodies.com</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Mon, 20 May 2013 16:34:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Restoring Microsoft SQL databases to a different disk partition on the same server</title>
		<link>http://adminsgoodies.com/restoring-microsoft-sql-databases-to-a-different-disk-partition-on-the-same-server/</link>
		<comments>http://adminsgoodies.com/restoring-microsoft-sql-databases-to-a-different-disk-partition-on-the-same-server/#comments</comments>
		<pubDate>Thu, 18 Oct 2012 16:33:39 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql-server]]></category>
		<category><![CDATA[sql-server-2005]]></category>
		<category><![CDATA[windows-server-2003]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/restoring-microsoft-sql-databases-to-a-different-disk-partition-on-the-same-server/</guid>
		<description><![CDATA[We have a SQL Server 2005 box running Windows Server 2003 R2 Std 64bit. We have two production databases residing on one partition (which is an iSCSI software target), that partition got apparently got corrupted and the databases are not working properly and pulling all kinds of consistency check errors. We have created a new iSCSI target and introduced it to the SQL server as a new disk partition. we have good backups that we [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>We have a SQL Server 2005 box running Windows Server 2003 R2 Std 64bit. We have two production databases residing on one partition (which is an iSCSI software target), that partition got apparently got corrupted and the databases are not working properly and pulling all kinds of consistency check errors. </p>
<p>We have created a new iSCSI target and introduced it to the SQL server as a new disk partition. we have good backups that we can use for restoration (Both native SQL backups and symantec Backup Exec backups).</p>
<p>The question is, how to restore these two databases to the new partition and make SQL server aware of the change?</p>
<div class="author">Asked by <a href="http://serverfault.com/users/73412/zero-subnet" target="_blank">Zero Subnet</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>When you&#8217;re restoring the database go to the Options and edit the Restore as field.</p>
<p>You can manually enter here where do you want data and log files to be (change the default location it gives you to the new disk partition).</p>
<p>The picture is from SQL express 2008R2 but it&#8217;s the same for 2005</p>
<p><img src="http://i.stack.imgur.com/aSoVE.png" alt="enter image description here"></p>
<div class="author">Answered by <a href="http://serverfault.com/users/137553/alen" target="_blank">Alen</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/439841/restoring-microsoft-sql-databases-to-a-different-disk-partition-on-the-same-serv" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/restoring-microsoft-sql-databases-to-a-different-disk-partition-on-the-same-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How frequent can we do SQL transaction log backups?</title>
		<link>http://adminsgoodies.com/how-frequent-can-we-do-sql-transaction-log-backups/</link>
		<comments>http://adminsgoodies.com/how-frequent-can-we-do-sql-transaction-log-backups/#comments</comments>
		<pubDate>Mon, 23 Jul 2012 16:33:17 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[transaction]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/how-frequent-can-we-do-sql-transaction-log-backups/</guid>
		<description><![CDATA[I&#8217;m installing a highly critical system. If the system fails, the users wants data up to the last minute. To achieve this, I was thinking of running Transaction Log Backups + FTP every minute. Has anybody done this before? Is this the best way to achieve the 1-minute data loss tolerance? Appreciate any advice, Thanks! Asked by user1034912 Well, you can do frequent tx log, but it still looses data. Best approach is: 3 database [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I&#8217;m installing a highly critical system. If the system fails, the users wants data up to the last minute. </p>
<p>To achieve this, I was thinking of running Transaction Log Backups + FTP every minute. Has anybody done this before? Is this the best way to achieve the 1-minute data loss tolerance?</p>
<p>Appreciate any advice,</p>
<p>Thanks!</p>
<div class="author">Asked by <a href="http://serverfault.com/users/100298/user1034912" target="_blank">user1034912</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>Well, you can do frequent tx log, but it still looses data.</p>
<p>Best approach is:</p>
<ul>
<li>3 database servers, one small free edition as witness, using safe mirroring.</li>
</ul>
<p>2 copies of the database, kept in sync.</p>
<p>Then use DPM (Data Protection Manager) to make near real time backups of that.</p>
<p>Particularly target an ugprade to SQ LServer 2012 asap and mirror the database files on both servers (total: 4 copies of the database), preferably on separate casings / raid controllers.</p>
<p>Yes, that gets expensive -but then &#8220;highly critical&#8221; means &#8220;pay what it takes&#8221;.</p>
<p>And you do not need FTP &#8211; SQL Server Log File Shipping can ship out the logs itself via file share.</p>
<div class="author">Answered by <a href="http://serverfault.com/users/37059/tomtom" target="_blank">TomTom</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/361757/how-frequent-can-we-do-sql-transaction-log-backups" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/how-frequent-can-we-do-sql-transaction-log-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL query, 2 similar servers, 2 minute difference in execution times</title>
		<link>http://adminsgoodies.com/mysql-query-2-similar-servers-2-minute-difference-in-execution-times/</link>
		<comments>http://adminsgoodies.com/mysql-query-2-similar-servers-2-minute-difference-in-execution-times/#comments</comments>
		<pubDate>Fri, 01 Jun 2012 16:33:32 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/mysql-query-2-similar-servers-2-minute-difference-in-execution-times/</guid>
		<description><![CDATA[I had a similar question on stack overflow, but it seems to be more server/mysql setup related than coding. The queries below all execute instantly on our development server where as they can take upto 2 minutes 20 seconds. The query execution time seems to be affected by home ambiguous the LIKE string&#8217;s are. If they closely match a country that has few matches it will take less time, and if you use something like [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I had a similar question on stack overflow, but it seems to be more server/mysql setup related than coding.</p>
<p>The queries below all execute instantly on our development server where as they can take upto 2 minutes 20 seconds.</p>
<p>The query execution time seems to be affected by home ambiguous the LIKE string&#8217;s are. If they closely match a country that has few matches it will take less time, and if you use something like &#8216;ge&#8217; for germany &#8211; it will take longer to execute. But this doesn&#8217;t always work out like that, at times its quite erratic.  </p>
<p>Sending data appears to be the culprit but why and what does that mean. Also memory on production looks to be quite low (free memory)?</p>
<p><em>Production:</em>  </p>
<p>Intel Quad Xeon E3-1220 3.1GHz<br />
4GB DDR3<br />
2x 1TB SATA in RAID1<br />
Network speed 100Mb<br />
Ubuntu  </p>
<p><em>Development</em>  </p>
<p>Intel Core i3-2100, 2C/4T, 3.10GHz<br />
500 GB SATA &#8211; No RAID<br />
4GB DDR3  </p>
<p><strong>UPDATE 2 :</strong><br />
mysqltuner output:  </p>
<p>[prod]</p>
<pre><code>-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.61-0ubuntu0.10.04.1
[OK] Operating on 64-bit architecture-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 103M (Tables: 180)
[--] Data in InnoDB tables: 491M (Tables: 19)
[!!] Total fragmented tables: 38-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned-------- Performance Metrics -------------------------------------------------
[--] Up for: 77d 4h 6m 1s (53M q [7.968 qps], 14M conn, TX: 87B, RX: 12B)
[--] Reads / Writes: 98% / 2%
[--] Total buffers: 58.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 463.8M (11% of installed RAM)
[OK] Slow queries: 0% (12K/53M)
[OK] Highest usage of available connections: 22% (34/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/10.6M
[OK] Key buffer hit rate: 98.7% (162M cached / 2M reads)
[OK] Query cache efficiency: 20.7% (7M cached / 36M selects)
[!!] Query cache prunes per day: 3934
[OK] Sorts requiring temporary tables: 1% (3K temp sorts / 230K sorts)
[!!] Joins performed without indexes: 71068
[OK] Temporary tables created on disk: 24% (3M on disk / 13M total)
[OK] Thread cache hit rate: 99% (690 created / 14M connections)
[!!] Table cache hit rate: 0% (64 open / 85M opened)
[OK] Open file limit used: 12% (128/1K)
[OK] Table locks acquired immediately: 99% (16M immediate / 16M locks)
[!!] InnoDB data size / buffer pool: 491.9M/8.0M-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    query_cache_size (&gt; 16M)
    join_buffer_size (&gt; 128.0K, or always use indexes with joins)
    table_cache (&gt; 64)
    innodb_buffer_pool_size (&gt;= 491M)
</code></pre>
<p>[dev]</p>
<pre><code>-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.1.62-0ubuntu0.11.10.1
[!!] Switch to 64-bit OS - MySQL cannot currently use all of your RAM-------- Storage Engine Statistics -------------------------------------------
[--] Status: +Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 185M (Tables: 632)
[--] Data in InnoDB tables: 967M (Tables: 38)
[!!] Total fragmented tables: 73-------- Security Recommendations  -------------------------------------------
[OK] All database users have passwords assigned-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 2h 26m 9s (5K q [0.058 qps], 1K conn, TX: 4M, RX: 1M)
[--] Reads / Writes: 99% / 1%
[--] Total buffers: 58.0M global + 2.7M per thread (151 max threads)
[OK] Maximum possible memory usage: 463.8M (11% of installed RAM)
[OK] Slow queries: 0% (0/5K)
[OK] Highest usage of available connections: 1% (2/151)
[OK] Key buffer size / total MyISAM indexes: 16.0M/18.6M
[OK] Key buffer hit rate: 99.9% (60K cached / 36 reads)
[OK] Query cache efficiency: 44.5% (1K cached / 2K selects)
[OK] Query cache prunes per day: 0
[OK] Sorts requiring temporary tables: 0% (0 temp sorts / 44 sorts)
[OK] Temporary tables created on disk: 24% (162 on disk / 666 total)
[OK] Thread cache hit rate: 99% (2 created / 1K connections)
[!!] Table cache hit rate: 1% (64 open / 4K opened)
[OK] Open file limit used: 8% (88/1K)
[OK] Table locks acquired immediately: 100% (1K immediate / 1K locks)
[!!] InnoDB data size / buffer pool: 967.7M/8.0M-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Enable the slow query log to troubleshoot bad queries
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    table_cache (&gt; 64)
    innodb_buffer_pool_size (&gt;= 967M)
</code></pre>
<p><strong>UPDATE 1</strong>:</p>
<p>When testing the queries listed here there is usually no more than one other query taking place, and usually none.</p>
<p>Because production is actually handling apache requests that development gets very few of as it&#8217;s only myself and 1 other who accesses it &#8211; could the 4GB of RAM be getting exhausted by using the single machine for both apache and mysql server?</p>
<p><em>Production:</em>  </p>
<pre><code>sudo hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   24872 MB in  2.00 seconds = 12450.72 MB/sec
 Timing buffered disk reads:  368 MB in  3.00 seconds = 122.49 MB/secsudo hdparm -tT /dev/sdb
/dev/sdb:
 Timing cached reads:   24786 MB in  2.00 seconds = 12407.22 MB/sec
 Timing buffered disk reads:  350 MB in  3.00 seconds = 116.53 MB/secServer version(mysql + ubuntu versions): 5.1.61-0ubuntu0.10.04.1
</code></pre>
<p><em>Development:</em>  </p>
<pre><code>sudo hdparm -tT /dev/sda
/dev/sda:
 Timing cached reads:   10632 MB in  2.00 seconds = 5319.40 MB/sec
 Timing buffered disk reads: 400 MB in  3.01 seconds = 132.85 MB/secServer version(mysql + ubuntu versions): 5.1.62-0ubuntu0.11.10.1 
</code></pre>
<p><strong>ORIGINAL DATA :</strong></p>
<p>This query is NOT the query in question but is related so ill post it.
</p>
<pre><code>SELECT 
    f.form_question_has_answer_id 
FROM 
    form_question_has_answer f 
INNER JOIN 
    project_company_has_user p ON f.form_question_has_answer_user_id = p.project_company_has_user_user_id 
INNER JOIN 
    company c ON p.project_company_has_user_company_id = c.company_id 
INNER JOIN 
    project p2 ON p.project_company_has_user_project_id = p2.project_id 
INNER JOIN 
    user u ON p.project_company_has_user_user_id = u.user_id 
INNER JOIN 
    form f2 ON p.project_company_has_user_project_id = f2.form_project_id 
WHERE 
    (f2.form_template_name = 'custom' AND p.project_company_has_user_garbage_collection = 0 AND p.project_company_has_user_project_id = '29') AND (LCASE(c.company_country) LIKE '%ge%' OR LCASE(c.company_country) LIKE '%abcde%') AND f.form_question_has_answer_form_id = '174'
</code></pre>
<p>And the explain plan for the above query is, run on both dev and production produce the same plan.</p>
<pre><code>+----+-------------+-------+--------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+-------------+
| id | select_type | table | type   | possible_keys                                                                                                                                | key                              | key_len | ref                                                | rows | Extra       |
+----+-------------+-------+--------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+-------------+
|  1 | SIMPLE      | p2    | const  | PRIMARY                                                                                                                                      | PRIMARY                          | 4       | const                                              |    1 | Using index |
|  1 | SIMPLE      | f     | ref    | form_question_has_answer_form_id,form_question_has_answer_user_id                                                                            | form_question_has_answer_form_id | 4       | const                                              |  796 | Using where |
|  1 | SIMPLE      | u     | eq_ref | PRIMARY                                                                                                                                      | PRIMARY                          | 4       | new_klarents.f.form_question_has_answer_user_id    |    1 | Using index |
|  1 | SIMPLE      | p     | ref    | project_company_has_user_unique_key,project_company_has_user_user_id,project_company_has_user_company_id,project_company_has_user_project_id | project_company_has_user_user_id | 4       | new_klarents.f.form_question_has_answer_user_id    |    1 | Using where |
|  1 | SIMPLE      | f2    | ref    | form_project_id                                                                                                                              | form_project_id                  | 4       | const                                              |   15 | Using where |
|  1 | SIMPLE      | c     | eq_ref | PRIMARY                                                                                                                                      | PRIMARY                          | 4       | new_klarents.p.project_company_has_user_company_id |    1 | Using where |
+----+-------------+-------+--------+----------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+-------------+
</code></pre>
<p>This query takes 2 minutes ~20 seconds to execute.</p>
<p>The query that is ACTUALLY being run on the server is this one:
</p>
<pre><code>SELECT 
    COUNT(*) AS num_results 
FROM (SELECT 
        f.form_question_has_answer_id 
    FROM 
        form_question_has_answer f 
    INNER JOIN 
        project_company_has_user p ON f.form_question_has_answer_user_id = p.project_company_has_user_user_id 
    INNER JOIN 
        company c ON p.project_company_has_user_company_id = c.company_id 
    INNER JOIN 
        project p2 ON p.project_company_has_user_project_id = p2.project_id 
    INNER JOIN 
        user u ON p.project_company_has_user_user_id = u.user_id 
    INNER JOIN 
        form f2 ON p.project_company_has_user_project_id = f2.form_project_id 
    WHERE 
        (f2.form_template_name = 'custom' AND p.project_company_has_user_garbage_collection = 0 AND p.project_company_has_user_project_id = '29') AND (LCASE(c.company_country) LIKE '%ge%' OR LCASE(c.company_country) LIKE '%abcde%') AND f.form_question_has_answer_form_id = '174' 
    GROUP BY 
        f.form_question_has_answer_id;) dctrn_count_query;
</code></pre>
<p>With explain plans (again same on dev and production):</p>
<pre><code>+----+-------------+-------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+------------------------------+
    | id | select_type | table | type   | possible_keys                                                                                                                                                                            | key                              | key_len | ref                                                | rows | Extra                        |
    +----+-------------+-------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+------------------------------+
    |  1 | PRIMARY     | NULL  | NULL   | NULL                                                                                                                                                                                     | NULL                             | NULL    | NULL                                               | NULL | Select tables optimized away |
    |  2 | DERIVED     | p2    | const  | PRIMARY                                                                                                                                                                                  | PRIMARY                          | 4       |                                                    |    1 | Using index                  |
    |  2 | DERIVED     | f     | ref    | form_question_has_answer_form_id,form_question_has_answer_user_id                                                                                                                        | form_question_has_answer_form_id | 4       |                                                    |  797 | Using where                  |
    |  2 | DERIVED     | p     | ref    | project_company_has_user_unique_key,project_company_has_user_user_id,project_company_has_user_company_id,project_company_has_user_project_id,project_company_has_user_garbage_collection | project_company_has_user_user_id | 4       | new_klarents.f.form_question_has_answer_user_id    |    1 | Using where                  |
    |  2 | DERIVED     | f2    | ref    | form_project_id                                                                                                                                                                          | form_project_id                  | 4       |                                                    |   15 | Using where                  |
    |  2 | DERIVED     | c     | eq_ref | PRIMARY                                                                                                                                                                                  | PRIMARY                          | 4       | new_klarents.p.project_company_has_user_company_id |    1 | Using where                  |
    |  2 | DERIVED     | u     | eq_ref | PRIMARY                                                                                                                                                                                  | PRIMARY                          | 4       | new_klarents.p.project_company_has_user_user_id    |    1 | Using where; Using index     |
    +----+-------------+-------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------+---------+----------------------------------------------------+------+------------------------------+
</code></pre>
<p>On the production server the information I have is as follows.</p>
<p>Upon execution:
</p>
<pre><code>+-------------+
| num_results |
+-------------+
|           3 |
+-------------+
1 row in set (2 min 14.28 sec)
</code></pre>
<p>Show profile:
</p>
<pre><code>+--------------------------------+------------+
| Status                         | Duration   |
+--------------------------------+------------+
| starting                       |   0.000016 |
| checking query cache for query |   0.000057 |
| Opening tables                 |   0.004388 |
| System lock                    |   0.000003 |
| Table lock                     |   0.000036 |
| init                           |   0.000030 |
| optimizing                     |   0.000016 |
| statistics                     |   0.000111 |
| preparing                      |   0.000022 |
| executing                      |   0.000004 |
| Sorting result                 |   0.000002 |
| Sending data                   | 136.213836 |
| end                            |   0.000007 |
| query end                      |   0.000002 |
| freeing items                  |   0.004273 |
| storing result in query cache  |   0.000010 |
| logging slow query             |   0.000001 |
| logging slow query             |   0.000002 |
| cleaning up                    |   0.000002 |
+--------------------------------+------------+
</code></pre>
<p>On development the results are as follows.</p>
<pre><code>+-------------+
| num_results |
+-------------+
|           3 |
+-------------+
1 row in set (0.08 sec)
</code></pre>
<p>Again the profile for this query:</p>
<pre><code>+--------------------------------+----------+
| Status                         | Duration |
+--------------------------------+----------+
| starting                       | 0.000022 |
| checking query cache for query | 0.000148 |
| Opening tables                 | 0.000025 |
| System lock                    | 0.000008 |
| Table lock                     | 0.000101 |
| optimizing                     | 0.000035 |
| statistics                     | 0.001019 |
| preparing                      | 0.000047 |
| executing                      | 0.000008 |
| Sorting result                 | 0.000005 |
| Sending data                   | 0.086565 |
| init                           | 0.000015 |
| optimizing                     | 0.000006 |
| executing                      | 0.000020 |
| end                            | 0.000004 |
| query end                      | 0.000004 |
| freeing items                  | 0.000028 |
| storing result in query cache  | 0.000005 |
| removing tmp table             | 0.000008 |
| closing tables                 | 0.000008 |
| logging slow query             | 0.000002 |
| cleaning up                    | 0.000005 |
+--------------------------------+----------+
</code></pre>
<p>If i remove user and/or project innerjoins the query is reduced to 30s.</p>
<p>Last bit of information I have:</p>
<p>Mysqlserver and Apache are on the same box, there is only one box for production.</p>
<p>Production output from top: before &amp; after.</p>
<pre><code>top - 15:43:25 up 78 days, 12:11,  4 users,  load average: 1.42, 0.99, 0.78
Tasks: 162 total,   2 running, 160 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us, 50.4%sy,  0.0%ni, 49.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4037868k total,  3772580k used,   265288k free,   243704k buffers
Swap:  3905528k total,   265384k used,  3640144k free,  1207944k cachedtop - 15:44:31 up 78 days, 12:13,  4 users,  load average: 1.94, 1.23, 0.87
Tasks: 160 total,   2 running, 157 sleeping,   0 stopped,   1 zombie
Cpu(s):  0.2%us, 50.6%sy,  0.0%ni, 49.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4037868k total,  3834300k used,   203568k free,   243736k buffers
Swap:  3905528k total,   265384k used,  3640144k free,  1207804k cached
</code></pre>
<p>But this isn&#8217;t a good representation of production&#8217;s normal status so here is a grab of it from today outside of executing the queries.</p>
<pre><code>top - 11:04:58 up 79 days,  7:33,  4 users,  load average: 0.39, 0.58, 0.76
Tasks: 156 total,   1 running, 155 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.3%us,  2.8%sy,  0.0%ni, 93.9%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4037868k total,  3676136k used,   361732k free,   271480k buffers
Swap:  3905528k total,   268736k used,  3636792k free,  1063432k cached
</code></pre>
<p>Development: This one doesn&#8217;t change during or after.</p>
<pre><code>top - 15:47:07 up 110 days, 22:11,  7 users,  load average: 0.17, 0.07, 0.06
Tasks: 210 total,   2 running, 208 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.1%us,  0.2%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   4111972k total,  1821100k used,  2290872k free,   238860k buffers
Swap:  4183036k total,    66472k used,  4116564k free,   921072k cached
</code></pre>
<div class="author">Asked by <a href="http://serverfault.com/users/123020/mr12086" target="_blank">mr12086</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<ol>
<li>The data is different on both machines or at least there is more on one of them.</li>
<li>You key_buffer is 16M and innodb_buffer is 8M</li>
<li>The buffers are soooo small that your prod server, averaging 7 queries a second, is probably blowing the cache on ever single query. </li>
</ol>
<p>I suspect that on your Dev server queries get to use the whole 8M innodb buffer in a single query while prod has to share 7 queries across the same 8M. Depending on the data needs of those queries your performance oscillates between bad and horrible.</p>
<p>Simplest solution is to set this in your my.cnf and see if things get better. </p>
<pre><code>innodb_buffer_pool_size = 1G
</code></pre>
<p>Also bump the key_buffer as well since you&#8217;re got 100M of myisam tables.</p>
<pre><code>key_buffer = 128M
</code></pre>
<p>You might need to play with these numbers since Apache is on the same server, but I&#8217;d do at least 500M for the innodb buffer.</p>
<div class="author">Answered by <a href="http://serverfault.com/users/9110/kashani" target="_blank">kashani</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/394314/mysql-query-2-similar-servers-2-minute-difference-in-execution-times" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/mysql-query-2-similar-servers-2-minute-difference-in-execution-times/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What database server will benefit from 4 CPUs</title>
		<link>http://adminsgoodies.com/what-database-server-will-benefit-from-4-cpus/</link>
		<comments>http://adminsgoodies.com/what-database-server-will-benefit-from-4-cpus/#comments</comments>
		<pubDate>Tue, 29 May 2012 16:33:24 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[linode]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/what-database-server-will-benefit-from-4-cpus/</guid>
		<description><![CDATA[I use MySQL server on Debian GNU/Linux machine with 4 CPUs (Linode 4096) and there are performace issue on havy load (in the middle of the day) but machine is not overload only queries are slow. What other database I can use that will use those 4 CPUs? I read that MySQL use only one. Is there SQL dababse or do I need to use NoSQL? Most queries are selects. Asked by jcubic You are [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I use MySQL server on Debian GNU/Linux machine with 4 CPUs (Linode 4096) and there are performace issue on havy load (in the middle of the day) but machine is not overload only queries are slow.</p>
<p>What other database I can use that will use those 4 CPUs? I read that MySQL use only one. Is there SQL dababse or do I need to use NoSQL? Most queries are selects.</p>
<div class="author">Asked by <a href="http://serverfault.com/users/54695/jcubic" target="_blank">jcubic</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>You are asking the wrong question. Find out what the performance bottleneck is instead of searching for a database server that makes better use of the resource you obviously have enough of (CPU power). </p>
<div class="author">Answered by <a href="http://serverfault.com/users/8897/svenw" target="_blank">SvenW</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/393621/what-database-server-will-benefit-from-4-cpus" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/what-database-server-will-benefit-from-4-cpus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ridiculously slow queries on Microsoft SQL Server 2008 R2</title>
		<link>http://adminsgoodies.com/ridiculously-slow-queries-on-microsoft-sql-server-2008-r2/</link>
		<comments>http://adminsgoodies.com/ridiculously-slow-queries-on-microsoft-sql-server-2008-r2/#comments</comments>
		<pubDate>Mon, 28 May 2012 16:34:25 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql-server]]></category>
		<category><![CDATA[sql-server-2008]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/ridiculously-slow-queries-on-microsoft-sql-server-2008-r2/</guid>
		<description><![CDATA[I&#8217;m getting really slow queries in MS SQL Server 2008 R2 on my dev machine. This problem has been plaguing me for about a month. Other developers don&#8217;t have the same problem, but we all run the same code. It seems to be that any query that includes a JOIN takes &#62;20s, some taking up to a minute. Inserts and updates are fast. The total database size is about 30MB, so it&#8217;s hardly huge. During [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I&#8217;m getting really slow queries in MS SQL Server 2008 R2 on my dev machine. This problem has been plaguing me for about a month. Other developers don&#8217;t have the same problem, but we all run the same code. It seems to be that any query that includes a <code>JOIN</code> takes &gt;20s, some taking up to a minute. Inserts and updates are fast. The total database size is about 30MB, so it&#8217;s hardly huge.</p>
<p>During the laggy queries, the CPU usage stays flat, the IO rates stay low, and the pagefault delta stays low too. I&#8217;ve not tweaked any performance settings in the db config &#8211; it&#8217;s all stock from the setup.</p>
<p>The software that connects to the SQL server is running on the same machine as it. I&#8217;ve tried multiple dev database copies, and customer databases that are known to be fine, all to no avail.</p>
<p>Any ideas what might be causing this?</p>
<div class="author">Asked by <a href="http://serverfault.com/users/100092/polynomial" target="_blank">Polynomial</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>Maybe you have a lot of BLOBs (Binary Large OBJectS) stored in your database.  That happens if you store very large binary objects in your db, such as other databases, or perhaps zip packages or whatnot.</p>
<p>That can become a performance killer, and is quite possible if you allow folks to upload files through something like Sharepoint.  </p>
<div class="author">Answered by <a href="http://serverfault.com/users/107763/bgm" target="_blank">BGM</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/392694/ridiculously-slow-queries-on-microsoft-sql-server-2008-r2" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/ridiculously-slow-queries-on-microsoft-sql-server-2008-r2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server 2005: Move account from one server to another while maintaining unknown password</title>
		<link>http://adminsgoodies.com/sql-server-2005-move-account-from-one-server-to-another-while-maintaining-unknown-password/</link>
		<comments>http://adminsgoodies.com/sql-server-2005-move-account-from-one-server-to-another-while-maintaining-unknown-password/#comments</comments>
		<pubDate>Fri, 25 May 2012 16:33:28 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql-server]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/sql-server-2005-move-account-from-one-server-to-another-while-maintaining-unknown-password/</guid>
		<description><![CDATA[There is a user account that someone set up on one of our database servers long ago, that no-one any longer knows the password for. However some apps have the password (for various reasons we cannot recover the password from the apps). Unfortunately we want to point the apps at a new server and will backup and restore the relevant databases to this new server &#8211; is there a way to copy the login from [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>There is a user account that someone set up on one of our database servers long ago, that no-one any longer knows the password for. However some apps have the password (for various reasons we cannot recover the password from the apps). </p>
<p>Unfortunately we want to point the apps at a new server and will backup and restore the relevant databases to this new server &#8211; is there a way to copy the login from one server to the other keeping the password value as whatever it was before?</p>
<div class="author">Asked by <a href="http://serverfault.com/users/28741/richard" target="_blank">Richard</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p><a href="http://support.microsoft.com/kb/918992/en-us" rel="nofollow">How to transfer the logins and the passwords between instances of SQL Server 2005 and SQL Server 2008</a></p>
<p>Relevant content from link:</p>
<blockquote>
<p>In this article, server A and server B are different servers.<br />
  Additionally, both server A and server B are running SQL Server 2005. </p>
<p>Note This information also applies to SQL Server 2008.</p>
<p>After you move a database from the instance of SQL Server on server A<br />
  to the instance of SQL Server on server B, the users may not be able<br />
  to log in to the database on server B. Additionally, the users may<br />
  receive the following error message: Login failed for user &#8216;MyUser&#8217;.<br />
  (Microsoft SQL Server, Error: 18456) This problem occurs because you<br />
  did not transfer the logins and the passwords from the instance of SQL<br />
  Server on server A to the instance of SQL Server on server B.</p>
<p>To transfer the logins and the passwords from the instance of SQL<br />
  Server on server A to the instance of SQL Server on server B, follow<br />
  these steps: On server A, start SQL Server Management Studio, and then<br />
  connect to the instance of SQL Server from which you moved the<br />
  database. Open a new Query Editor window, and then run the following<br />
  script. USE master GO IF OBJECT_ID (&#8216;sp_hexadecimal&#8217;) IS NOT NULL<br />
  DROP PROCEDURE sp_hexadecimal GO CREATE PROCEDURE sp_hexadecimal<br />
      @binvalue varbinary(256),<br />
      @hexvalue varchar (514) OUTPUT AS DECLARE @charvalue varchar (514) DECLARE @i int DECLARE @length int DECLARE @hexstring char(16) SELECT<br />
  @charvalue = &#8217;0x&#8217; SELECT @i = 1 SELECT @length = DATALENGTH<br />
  (@binvalue) SELECT @hexstring = &#8217;0123456789ABCDEF&#8217; WHILE (@i &lt;=<br />
  @length) BEGIN   DECLARE @tempint int   DECLARE @firstint int<br />
  DECLARE @secondint int   SELECT @tempint = CONVERT(int,<br />
  SUBSTRING(@binvalue,@i,1))   SELECT @firstint = FLOOR(@tempint/16)<br />
  SELECT @secondint = @tempint &#8211; (@firstint*16)   SELECT @charvalue =<br />
  @charvalue +<br />
      SUBSTRING(@hexstring, @firstint+1, 1) +<br />
      SUBSTRING(@hexstring, @secondint+1, 1)   SELECT @i = @i + 1 END</p>
<p>SELECT @hexvalue = @charvalue GO   IF OBJECT_ID (&#8216;sp_help_revlogin&#8217;)<br />
  IS NOT NULL   DROP PROCEDURE sp_help_revlogin GO CREATE PROCEDURE<br />
  sp_help_revlogin @login_name sysname = NULL AS DECLARE @name sysname<br />
  DECLARE @type varchar (1) DECLARE @hasaccess int DECLARE @denylogin<br />
  int DECLARE @is_disabled int DECLARE @PWD_varbinary  varbinary (256)<br />
  DECLARE @PWD_string  varchar (514) DECLARE @SID_varbinary varbinary<br />
  (85) DECLARE @SID_string varchar (514) DECLARE @tmpstr  varchar (1024)<br />
  DECLARE @is_policy_checked varchar (3) DECLARE @is_expiration_checked<br />
  varchar (3)</p>
<p>DECLARE @defaultdb sysname   IF (@login_name IS NULL)   DECLARE<br />
  login_curs CURSOR FOR</p>
<pre><code>  SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM 
</code></pre>
<p>sys.server_principals p LEFT JOIN sys.syslogins l<br />
        ON ( l.name = p.name ) WHERE p.type IN ( &#8216;S&#8217;, &#8216;G&#8217;, &#8216;U&#8217; ) AND p.name &lt;&gt; &#8216;sa&#8217; ELSE   DECLARE login_curs CURSOR FOR</p>
<pre><code>  SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM 
</code></pre>
<p>sys.server_principals p LEFT JOIN sys.syslogins l<br />
        ON ( l.name = p.name ) WHERE p.type IN ( &#8216;S&#8217;, &#8216;G&#8217;, &#8216;U&#8217; ) AND p.name = @login_name OPEN login_curs</p>
<p>FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type,<br />
  @is_disabled, @defaultdb, @hasaccess, @denylogin IF (@@fetch_status =<br />
  -1) BEGIN   PRINT &#8216;No login(s) found.&#8217;   CLOSE login_curs   DEALLOCATE login_curs   RETURN -1 END SET @tmpstr = &#8216;/* sp_help_revlogin script &#8216;<br />
  PRINT @tmpstr SET @tmpstr = &#8216;** Generated &#8216; + CONVERT (varchar,<br />
  GETDATE()) + &#8216; on &#8216; + @@SERVERNAME + &#8216; */&#8217; PRINT @tmpstr PRINT &#8221;<br />
  WHILE (@@fetch_status &lt;&gt; -1) BEGIN   IF (@@fetch_status &lt;&gt; -2)   BEGIN<br />
      PRINT &#8221;<br />
      SET @tmpstr = &#8216;&#8211; Login: &#8216; + @name<br />
      PRINT @tmpstr<br />
      IF (@type IN ( &#8216;G&#8217;, &#8216;U&#8217;))<br />
      BEGIN &#8212; NT authenticated account/group</p>
<pre><code>  SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [' + @defaultdb + ']'
END
ELSE BEGIN -- SQL Server authentication
    -- obtain password and sid
        SET @PWD_varbinary = CAST( LOGINPROPERTY( @name, 'PasswordHash' ) AS varbinary (256) )
    EXEC sp_hexadecimal @PWD_varbinary, @PWD_string OUT
    EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT    -- obtain password policy state
    SELECT @is_policy_checked = CASE is_policy_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name =
</code></pre>
<p>@name<br />
          SELECT @is_expiration_checked = CASE is_expiration_checked WHEN 1 THEN &#8216;ON&#8217; WHEN 0 THEN &#8216;OFF&#8217; ELSE NULL END FROM sys.sql_logins<br />
  WHERE name = @name</p>
<pre><code>        SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' WITH PASSWORD = ' + @PWD_string + ' HASHED, SID = ' + @SID_string + ',
</code></pre>
<p>DEFAULT_DATABASE = [' + @defaultdb + ']&#8216;</p>
<pre><code>    IF ( @is_policy_checked IS NOT NULL )
    BEGIN
      SET @tmpstr = @tmpstr + ', CHECK_POLICY = ' + @is_policy_checked
    END
    IF ( @is_expiration_checked IS NOT NULL )
    BEGIN
      SET @tmpstr = @tmpstr + ', CHECK_EXPIRATION = ' + @is_expiration_checked
    END
END
IF (@denylogin = 1)
BEGIN -- login is denied access
  SET @tmpstr = @tmpstr + '; DENY CONNECT SQL TO ' + QUOTENAME( @name )
END
ELSE IF (@hasaccess = 0)
BEGIN -- login exists but does not have access
  SET @tmpstr = @tmpstr + '; REVOKE CONNECT SQL TO ' + QUOTENAME( @name )
END
IF (@is_disabled = 1)
BEGIN -- login is disabled
  SET @tmpstr = @tmpstr + '; ALTER LOGIN ' + QUOTENAME( @name ) + ' DISABLE'
END
PRINT @tmpstr   END
</code></pre>
<p>FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type,<br />
  @is_disabled, @defaultdb, @hasaccess, @denylogin    END CLOSE<br />
  login_curs DEALLOCATE login_curs RETURN 0 GO Note This script creates<br />
  two stored procedures in the master database. The two stored<br />
  procedures are named the sp_hexadecimal stored procedure and the<br />
  sp_help_revlogin stored procedure. Run the following statement. EXEC<br />
  sp_help_revlogin The output script that is generated by the<br />
  sp_help_revlogin stored procedure is the login script. This login<br />
  script creates the logins that have the original Security Identifier<br />
  (SID) and the original password. On server B, start SQL Server<br />
  Management Studio, and then connect to the instance of SQL Server to<br />
  which you moved the database.</p>
<p>Important Before you go to step 5, review the information in the<br />
  &#8220;Remarks&#8221; section. Open a new Query Editor window, and then run the<br />
  output script that is generated in step 3.</p>
</blockquote>
<div class="author">Answered by <a href="http://serverfault.com/users/121802/michelz" target="_blank">MichelZ</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/392604/sql-server-2005-move-account-from-one-server-to-another-while-maintaining-unkno" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/sql-server-2005-move-account-from-one-server-to-another-while-maintaining-unknown-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server Monitoring Options</title>
		<link>http://adminsgoodies.com/server-monitoring-options/</link>
		<comments>http://adminsgoodies.com/server-monitoring-options/#comments</comments>
		<pubDate>Wed, 23 May 2012 16:33:25 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[mssql-maintenance]]></category>
		<category><![CDATA[performance-monitoring]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql-server]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/server-monitoring-options/</guid>
		<description><![CDATA[I&#8217;m trying to find the best way to monitor my MS SQL server. I have been using pingdom for my web server and want to look at something else. I have done a lot of googleing but they all seem to be the same. Was hoping someone could tell me their good and bad stories that might make it easier to pick one. It is just for the MS SQL server. Just need to know [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I&#8217;m trying to find the best way to monitor my MS SQL server. I have been using pingdom for my web server and want to look at something else. I have done a lot of googleing but they all seem to be the same. Was hoping someone could tell me their good and bad stories that might make it easier to pick one.</p>
<p>It is just for the MS SQL server. Just need to know that it is up and that the queries are working. Needs to be remote!</p>
<div class="author">Asked by <a href="http://serverfault.com/users/98404/1ftw1" target="_blank">1ftw1</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>If you want something designed for monitoring, what about Nagios for free?  or maybe Whats-Up for a few bucks?</p>
<div class="author">Answered by <a href="http://serverfault.com/users/1592/mdpc" target="_blank">mdpc</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/323083/server-monitoring-options" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/server-monitoring-options/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are Previous Microsoft SQL Installations Needed After SQL 2012 Upgrade?</title>
		<link>http://adminsgoodies.com/are-previous-microsoft-sql-installations-needed-after-sql-2012-upgrade/</link>
		<comments>http://adminsgoodies.com/are-previous-microsoft-sql-installations-needed-after-sql-2012-upgrade/#comments</comments>
		<pubDate>Wed, 23 May 2012 12:33:42 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql-server]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/are-previous-microsoft-sql-installations-needed-after-sql-2012-upgrade/</guid>
		<description><![CDATA[Are the older installations of Microsoft SQL Server needed after you installed Server 2012? I&#8217;ve been doing some cleaning and noticed I&#8217;ve a whole list of SQL Server installation. When I installed Server 2012, I clicked the upgrading option but previous versions are still present. I&#8217;m guessing they are needed but I want to be sure. Asked by reaper_unique This is a hard question. Many of us keep the older instance running for some reason [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>Are the older installations of Microsoft SQL Server needed after you installed Server 2012?<br />
I&#8217;ve been doing some cleaning and noticed I&#8217;ve a whole list of SQL Server installation.</p>
<p>When I installed Server 2012, I clicked the upgrading option but previous versions are still present. I&#8217;m guessing they are needed but I want to be sure.</p>
<div class="author">Asked by <a href="http://serverfault.com/users/119593/reaper-unique" target="_blank">reaper_unique</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>This is a hard question. Many of us keep the older instance running for some reason or another.</p>
<p>The safe path is, when done with the older stuff, to:</p>
<p>1) Stop and disable the services from the older version<br />
2) Check the search path for the OS, make sure it just references the new SQL Server</p>
<p>That said, I expect it is safe to uninstall the older SQL versions.</p>
<div class="author">Answered by <a href="http://serverfault.com/users/13716/samsmith" target="_blank">samsmith</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/385237/are-previous-microsoft-sql-installations-needed-after-sql-2012-upgrade" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/are-previous-microsoft-sql-installations-needed-after-sql-2012-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL server 2005 installation SP1</title>
		<link>http://adminsgoodies.com/sql-server-2005-installation-sp1/</link>
		<comments>http://adminsgoodies.com/sql-server-2005-installation-sp1/#comments</comments>
		<pubDate>Thu, 03 May 2012 08:33:20 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/sql-server-2005-installation-sp1/</guid>
		<description><![CDATA[I have got problem with installation SP1 and SP2 to SQL server 2005 I get this text -&#62; Instances of SQL Server Express cannot be updated by using this Service Pack installer. To update instances of SQL Server Express, use the SQL Server Express Service Pack installer. I don&#8217;t understand what I have to do? I can`t select this box with SQL server 2005 to make update. Start -&#62; Menu Asked by n/a You are [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>I have got problem with installation SP1 and SP2 to SQL server 2005 I get this text -&gt; Instances of SQL Server Express cannot be updated by using this Service Pack installer. To update instances of SQL Server Express, use the SQL Server Express Service Pack installer.</p>
<p>I don&#8217;t understand what I have to do?</p>
<p>I can`t select this box with SQL server 2005 to make update. </p>
<p><img src="http://i.stack.imgur.com/WfbbV.png" alt="enter image description here"></p>
<p>Start -&gt; Menu</p>
<p><img src="http://i.stack.imgur.com/x55Fn.png" alt="enter image description here"></p>
<div class="author">Asked by <a href="http://serverfault.comhttp://serverfault.com/questions/385581/sql-server-2005-installation-sp1" target="_blank">n/a</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>You are running SQL Server Express, not the full version of SQL Server. SQL Server Express is the trimmed-down, free version of SQL Server.</p>
<p>You need to download the correct service pack installers (I suspect that you&#8217;d only need to install the latest one &#8211; SP4 &#8211; but I have no way of checking):</p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=7478" rel="nofollow">SQL Server 2005 Express SP1</a></p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=22625" rel="nofollow">SQL Server 2005 Express SP2</a></p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=15291" rel="nofollow">SQL Server 2005 Express SP3</a></p>
<p><a href="http://www.microsoft.com/en-us/download/details.aspx?id=184" rel="nofollow">SQL Server 2005 Express SP4</a></p>
<div class="author">Answered by <a href="http://serverfault.com/users/119712/weenoid" target="_blank">weenoid</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/385581/sql-server-2005-installation-sp1" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/sql-server-2005-installation-sp1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Are vCPU the same as 1 Socket, or a single Core?</title>
		<link>http://adminsgoodies.com/are-vcpu-the-same-as-1-socket-or-a-single-core/</link>
		<comments>http://adminsgoodies.com/are-vcpu-the-same-as-1-socket-or-a-single-core/#comments</comments>
		<pubDate>Wed, 02 May 2012 12:33:08 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[General Questions]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[vcpu]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://adminsgoodies.com/are-vcpu-the-same-as-1-socket-or-a-single-core/</guid>
		<description><![CDATA[Currently I have a Hyper-v VPS with 2 (vCPU) processor. I would like to install SQL Server Express 2012 that has a limitation of 1 Socket or 4 Cores, whichever the lesser. My Question: Are vCPU&#8217;s counted as a single core, or as sockets? or something completely different? Asked by TravisK Hyper-V presents one socket with multiple cores. You can verify this with a tool such as CPU-Z. Here&#8217;s a screenshot I took of a [...]]]></description>
				<content:encoded><![CDATA[<h3 class="pq"><img src="http://adminsgoodies.com/imgs/question.png" alt="Question" /></h3>
<p>Currently I have a Hyper-v VPS with 2 (vCPU) processor.  I would like to install SQL Server Express 2012 that has a limitation of 1 Socket or 4 Cores, whichever the lesser.</p>
<p><strong>My Question:</strong> Are vCPU&#8217;s counted as a single core, or as sockets? or something completely different?</p>
<div class="author">Asked by <a href="http://serverfault.com/users/119530/travisk" target="_blank">TravisK</a></div>
<h3 class="pa"><img src="http://adminsgoodies.com/imgs/answer.png" alt="Answer" /></h3>
<p>Hyper-V presents one socket with multiple cores.</p>
<p>You can verify this with a tool such as <a href="http://www.cpuid.com/downloads/cpu-z/1.60.1-64bits-en.zip">CPU-Z</a>. Here&#8217;s a screenshot I took of a 2-vCPU Hyper-V guest I have:</p>
<p><img src="http://i.stack.imgur.com/FNZ5Z.png" alt="enter image description here"></p>
<p>For what it&#8217;s worth, VMWare ESXi permits you to choose your mix of sockets/cores vCPUs.</p>
<h2>I am not a lawyer, so stop reading now</h2>
<p>Installing SQL Express on a machine that violates the license simply means (as far as I can tell) that the SQL instance will not utilise the extra power of the server. For example, it&#8217;s limited to <em>x</em> gigs of ram, but if you install it in a server with 256Gb of RAM, it will just neglect to use the rest.</p>
<div class="author">Answered by <a href="http://serverfault.com/users/7709/mark-henderson" target="_blank">Mark Henderson</a></div>
<p class="ref-link">Check <a href="http://serverfault.com/questions/385079/are-vcpu-the-same-as-1-socket-or-a-single-core" target="_blank">more discussion</a> of this question.</p>
]]></content:encoded>
			<wfw:commentRss>http://adminsgoodies.com/are-vcpu-the-same-as-1-socket-or-a-single-core/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
