Author Archive

  • Percentage of Work completed – SQL Server
    Today, I was taking a manual backup of a database through a scheduled Job. Normally this backup job takes about 1 hour to complete, but today it was still executing for almost 3 hours. I started to look up Activity monitor, dbcc commands for any lock against the database, but of no avail. After searching on internet i came across a DMV(Dynamic Management View) provided...
    by Nauman at August 24th, 2010 at 09:08 am
  • Get indexes on all tables – SQL Server
    An important ingredient in database designing is creating, maintaining and rebuilding indexes after some specified intervals. One main  aspect of database tuning is to apply indexes. Index must exist in databases otherwise their would be a lot of performance issues. While searching across internet, i came across a script that will list all the tables in my database and...
    by Nauman at August 24th, 2010 at 09:08 am
  • Migrate from MySQL to SQL Server
    Migrate from MySQL to SQL Server with ease. Microsoft has launched a small utility to migrate a database from MySQL to SQL Server. Name of the utility is SQL Server Migration Assistant for MySQL. More details can be found here
    by Nauman at August 23rd, 2010 at 08:08 am
  • Remove a Stored Procedure in Production Environment
    How to remove a Stored Procedure in SQL Server production environment? How can we be so sure that is not being used any more? You need to know every single path from where this procedure is initiating before you can actually remove it from production. Following are some ways to determine the usage of a procedure in SQL Server. Set up a trace and filter through SQL Server...
    by Nauman at August 23rd, 2010 at 08:08 am
  • Retrieve permissions on SQL Server database
      SQL Server permissions can be granted to on an object level (schema, database, database objects). In newer versions of SQL Server permissions can be given to user at a more granular level. To retrieve all the permissions granted to a specific user SQL server has a function named: fn_my_permission.  This function is only accessible to system administrator. e.g following...
    by Nauman at August 22nd, 2010 at 10:08 am
  • How to Improve I/O performance for SQL Server
      If underline I/O architecture system is working properly then every time SQL Server do some transaction (Read/Write) it can do it without waiting. But if load on the system is up, then SQL transaction have to wait for their turns for processing. This can significantly reduce SQL Server performance. There is a much greater issue when you are not in charge of the underlying...
    by Nauman at August 22nd, 2010 at 06:08 am
  • Import CSV file in SQL Server
    Importing a CSV(Comma Separated File) in SQL server is a very common task, and most of us use the Import /Export feature of SQL server to do this. Import/Export feature has SSIS (SQL Server Integration Services) as it backbone and works great with most of the Databases, file types etc. But today we are going to import a CSV file in SQL server through simple SQL queries....
    by Nauman at May 27th, 2010 at 10:05 pm
  • Migrating TFS 2005 projects to TFS 2008 system
    Is there is a solution for importing existing projects from TFS 2005 server to a new TFS 2008 instance? Yes and this solution is without upgrading original TFS 2005 server to 2008. Solution: While installing TFS 2008 on new server, when wizard prompts you to input SQL server instance for storing data, you can point to database containing TFS 2005 data, this would cause...
    by Nauman at April 8th, 2010 at 05:04 am
  • 0x8002801D Library not Registered.. Cannot create any BI project.
      An annoying error coming up while creating any Business Intelligence project from SQL studio. Error says that it cannot open a specific temp file. I have deleted all my BI settings but not good enough for creation of a BI project. Reparing SQL server installation also did not work also. Cause: Some installation/uninstallation have corrupted the msxml dll files and now...
    by Nauman at February 14th, 2010 at 09:02 am
  • Removing Duplicates through SQL Query
    Suppose we have a table in SQL Server, that has duplicates in it. CREATE TABLE T1 ( ProductName varchar(50) ) INSERT INTO T1 VALUES (‘Computer’), (‘Computer’), (‘Printer’), (‘Printer’), (‘Printer’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Scanner’), (‘Camera’), (‘Flash...
    by Nauman at February 14th, 2010 at 09:02 am
  • Informatica Admin Console not working.
      After installation of Power Center 8.xxx Cannot start Admin Console. It hangs on the following local address. http://localhost:6001/adminconsole.   and after sometime it shows the annoying error of  “Page not found”. I have checked the Informatica Services are up and running but my admin console does not come up. What to do now?   Resolution:...
    by Nauman at February 14th, 2010 at 09:02 am
  • NEXUS One – Google
    Google has unveiled an own-brand smartphone called the Nexus One. The release of the Nexus One is seen as a move to ensure Google remains relevant as people search the web using mobile phones rather than typing queries into a PC. Information and Specifications
    by Nauman at January 7th, 2010 at 09:01 am
  • Google Chrome claims third position in overall browser usage
      Google’s Chrome browser surpassed Safari for share of worldwide usage in December. Read Whole
    by Nauman at January 7th, 2010 at 09:01 am
  • Retrieving domain information through ASP.NET
    There are many  domain checking websites available that gives all the information regarding domains. WhoIs is one of them. Following is a sample asp.net code that connects to one of WhoIs servers and retrieve information of a specific website. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI;...
    by Nauman at December 24th, 2009 at 05:12 am
  • Add meta data dynamically
    Add meta-data dynamically to your page by adding a HtmlMeta control to your Header. In this example I dynamically add a keyword string to the page. string keyWords = “metatags, html, dynamic, generate”; HtmlMeta keywords = new HtmlMeta(); keywords.Name = “keywords”; keywords.Content = keyWords; Page.Header.Controls.Add(keywords);
    by Nauman at December 24th, 2009 at 04:12 am
  • Date Time string formatting in ASP.NET
    With the following code you can format a DateTime within a Databind. <%# DateTime.Parse(Eval("DateModified").ToString()).ToString("MM-dd-yyyy")%> Some more format specifiers that can change format of datetime objects the way it is required. Format specifier Name d Short date pattern D Long date pattern t Short time pattern T Long...
    by Nauman at December 24th, 2009 at 04:12 am
  • How to make XP look like Vista-Longhorn
    So, how many of us are bored of looking at user interface of XP? Most of us, because Microsoft has only released 2-3 themes for XP from its launch. There are many different websites that allows to download themes for XP that are not developed by Microsoft. But by downloading them and adding them in windows directory does not usually guarantee theme to work properly. Following...
    by Nauman at December 23rd, 2009 at 09:12 am
  • Traversing DOM using JavaScript
    The HTML DOM defines a standard way for accessing and manipulating HTML documents. The DOM presents an HTML document as a tree-structure expressed as an XML document. DOM is a language independent API, as it can be used in Java, .NET, JavaScript and many more. I will use it with JavaScript to for my sample code provided below. When talking about DOM trees , you are really...
    by Nauman at November 22nd, 2009 at 12:11 am
  • TFS Migration Guidance Document
    Team Foundation Server (TFS) product group and the Team System Rangers started a project on CodePlex called TFS Integration Platform, to facilitate the development of tools that integrate TFS with other systems. Currently, this tool allow to enable TFS to integrate with other version control and work-item/bug tracking systems, but the eventual goal of this project is to...
    by Nauman at November 21st, 2009 at 11:11 am
  • Telecom Subscriber Stats – Pakistan
    PTA has at last issued cellular subscribers’ stats for the month of August and September 2009. Stats reveal that Pakistan telecom industry is about to hit 96 million subscribers in the country – with 58.60 percent teledensity. Mobilink has touched again 30 million mark being at the top, while Telenor is bagging the second slot with 21.65 million customers at the end...
    by Nauman at November 19th, 2009 at 09:11 am