May 28, 2011

Shrink 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 more
May 28, 2011

SQL 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 more
May 7, 2011

Steps 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

Read more
March 13, 2010

Rendering 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 more
December 26, 2009

Converting 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...

Read more
December 26, 2009

How 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