High Memory Usage in SQL – How to avoid it?
Database,When your system is short of memory, MySQL will be killed by the system itself since it can use a lot of memory. This also causes MySQL servers to face high server load. Usually when MySQL is killed, we get the message “mysqld invoked oom-killer”. In such cases it is always advisable to restart the…
Read moreSQL Server Always On Availability Group
Database,Overview: SQL server always on Availability group is a new feature developed in SQL server 2012 on the basis of SQL mirroring and Windows server failover clustering. So the environment must achieve the same requirement of the windows server failover clustering and SQL Installation. For configuration of a fail over cluster, Environment should be configured…
Read moreMssql management studio issues – DB in general
Database,Error while opening Mssql 2005 management studio MMC could not create the snap-in.MMC could not create the snap-in. The snap-in might not have been installed correctly.Name: Microsoft SQL Enterprise ManagerCLSID: {00100100-1816-11D0-8EF5-00AA0062C58F} Fix Run the following command as shown to fix this. Make sure you have installed the Msql in the path as shown or change…
Read moreShrink 2008 MSSQL database
Database,Shrinking SQL 2008 database is nowhere related to SQL 2000/2005 Method. Because SQL Server 2008 no longer allows you to truncate the transaction log using the no_log syntax But here is the special code to shrink the database: USE MASTER GO ALTER DATABASE database_name SET RECOVERY SIMPLE GO USE database_name GO DBCC SHRINKFILE (database_name_log, 1)…
Read moreSQL Server Port
Database,Scenario 1: SQL Is Not Connecting via Management Studio Locally After a Fresh Installation Step 1: Verify SQL Installation and Firewall Configuration After completing a fresh SQL installation and opening the required port in the firewall, you might still be unable to connect through SQL Management Studio.However, it’s important to note that installing SQL Server…
Read moreSteps to install SQL server 2008 with screenshot
Database,Windows General,Microsoft SQL Server 2008 Release to Manufacturing (RTM) was released in the August 2008. There are different versions of SQL Server 2008 available such as Enterprise, Standard, Workgroup, Web, Express, Compact and Developer editions. The trial version of Microsoft SQL Server 2008 can be downloaded from the following link http://www.microsoft.com/sql/2008/prodinfo/download.mspx. This article describes the steps…
Read moreRendering MySQL query results in vertical format
Database,Easily reviewing SELECT query results in a shell window can be particularly difficult when a table consists of numerous columns. Remedying this inconvenience is easily done by appending the \G switch to the query: mysql>SELECT * from users WHERE id=1\G Executing this query with the \G switch attached formats the output like so: mysql test>select…
Read moreConverting MySQL query results into a CSV file
Database,To dump data from the database into an Excel file, SELECT query can be used to convert data to CSV formatting. Converting MySQL query results into a CSV file All needs to be done is to identify how the fields and lines should be terminated. For example, to dump a table named customers to a…
Read moreHow to change the client prompt in MySQL?
Database,Change MySQL’s prompt by using the prompt command: mysql>prompt mysql (\d)> Once executed, the currently selected database will appear in the prompt, like so: mysql (mydatabase)> It’s also easy to lose track of which database server you’re logged in to, not to mention which account you’re using. To fix this, modify your prompt using the…
Read more