<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>PSINGH Blog RSS Feeds  | Admanya.com</title>
    <link>http://consumer.admanya.com</link>
    <description>Admanya.com | http://consumer.admanya.com</description>
    <dc:creator>Admanya.com</dc:creator>
    <item>
      <title>A Fast and Easy Way to Create a System Repair Disc in Windows 7</title>
      <link>http://consumer.admanya.com/blog_a_fast_and_easy_way_to_create_a_system_repair_disc_in_windows_7-2683.html</link>
      <description>&lt;p&gt;&lt;img src="http://images2.admanya.com/blog_imgs/blog_2683-07-12-2012-14-04-07.gif" align="left" vspace="15" hspace="15" /&gt;Windows 7 offers an easy way to create a System Repair DiscÂand you can often do this without even using an installation disc. This is a great option for situations when you dont have an installation disc or the original system manufacturer discs readily available. Click the Start button and then in the Search programs and filesÂ box, type system repair disc and press enter. This launches a simple tool that will create a bootable recovery disc. Note that if all the necessary files are not available on your system, the tool may ask for a Windows 7 installation disc. But in many scenarios, this will not be required.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;-----How to upgrade Java version from 1.6 to 1.7 in Ubuntu ---&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 1: First download the tar file of java ( jre-7u5-linux-i586.tar.gz) using below URL&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;http://www.java.com/en/download/linux_manual.jsp&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 2: tar -zxvf /Path to 'jre-7u5-linux-i586.tar.gz'/ &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;  &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 3: Move extracted folder to /usr/lib/jvm&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;#sudo cp -r jre1.7.0_05 /usr/lib/jvm/ &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 4: Install java now &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;#sudo update-alternatives Âinstall /usr/bin/java java /usr/lib/jvm/jre1.7.0_05/bin/java 3 &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 5: Now choose the upgraded java version from :- &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;#sudo update-alternatives Âconfig java&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;We have to select 4 for my system.. choose :- /usr/lib/jvm/jdk1.7.0_04/bin/java&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 6: Now create a soft link:- &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;#sudo ln -s /usr/lib/jvm/jre1.7.0_05/lib/i386/libnpjp2.so ~/.mozilla/plugins/&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 7: Now check java version with the below command&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;#sudo java -version&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;you should get 1.7 java version in the output.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_a_fast_and_easy_way_to_create_a_system_repair_disc_in_windows_7-2683.html</guid>
    </item>
    <item>
      <title>Using Standby Servers in SQL server</title>
      <link>http://consumer.admanya.com/blog_using_standby_servers_in_sql_server-2682.html</link>
      <description>&lt;p&gt;&lt;img src="http://images2.admanya.com/blog_imgs/blog_2682-06-12-2012-20-31-44.jpg" align="left" vspace="15" hspace="15" /&gt;A standby server is a second server that can be brought online if the primary production server fails. The standby server contains a copy of the databases on the primary server. A standby server can also be used when a primary server becomes unavailable due to scheduled maintenance. For example, if the primary server needs a hardware or software upgrade, the standby server can be used.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;A standby server allows users to continue working with databases if the primary server becomes unavailable. When the primary server becomes available again, any changes to the standby server's copies of databases must be restored back to the primary server. Otherwise, those changes are lost. When users start using the primary server again, its databases should be backed up and restored on the standby server again.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Implementing a standby server involves these phases: &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Creating the database and ongoing transaction log backups on the primary server.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Setting up and maintaining the standby server by backing up the database on the primary server and restoring them on the standby server.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Bringing the standby server online if the primary server fails. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Important  All user processes must log in to the standby server and restart any tasks they were performing when the primary server became unavailable. User processes are not switched automatically to the standby server and transactions are not maintained between the primary server and the standby server. If the primary server is taken off the network or renamed manually, and the standby server is renamed, then the standby server will have a network name and address different from the server the users were using previously. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Periodically, transaction log backups from the databases on the primary server are applied on the standby to ensure that the standby remains synchronized with the primary server. In the event of the primary server failing, or even if just a single database fails, the databases on the standby server are made available to user processes. Any user processes that cannot access the primary server should use the standby server instead.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;A standby server configuration is not the same as the virtual server configuration used in MicrosoftÂ SQL ServerÂ 2000 failover clustering. A standby server contains a second copy of the SQL Server databases. In a virtual server configuration, a single copy of the databases, loaded on a shared cluster disk, is shared by the primary and secondary physical servers that underlie the virtual server.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Creating the Backups on the Primary Server&#xD;&lt;br/&gt;On the primary server: &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;1.Create a full database backup of each database to be duplicated. For more information, see Database Backups.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;2.Periodically, create a transaction log backup of each database to be duplicated. For more information, see Transaction Log Backups. &#xD;&lt;br/&gt;The frequency of transaction log backups created on the primary server depends on the volume of transaction changes of the production server database. If the transaction frequency is high, it may be useful to back up the transaction log frequently to minimize the potential loss of data in the event of failure.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Important  When restoring a copy of master from a production server to a standby server, you cannot back up the transaction log of master. Only a database backup and restore of master is possible.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Setting Up and Maintaining the Standby Server&#xD;&lt;br/&gt;A standby server is set up and maintained as follows: &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;1.Restore the database backups from the primary server onto the standby server in standby mode, specifying an undo file (one undo file per database). &#xD;&lt;br/&gt;When a database or transaction log is restored in standby mode, recovery needs to roll back any uncommitted transactions so that the database can be left in a logically consistent state and used, if necessary, for read-only purposes. Pages in the database affected by the uncommitted, rolled back transactions are modified. This undoes the changes originally performed by the uncommitted transactions. The undo file is used to save the contents of these pages before recovery modifies them to prevent the changes performed by the uncommitted transactions from being lost. Before a subsequent transaction log backup is next applied to the database, the uncommitted transactions that were previously rolled back by recovery must be reapplied first. The saved changes in the undo file are reapplied to the database, and then the next transaction log is applied.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Note  There must be enough disk space for the undo file to grow so that it can contain all the distinct pages from the database that were modified by rolling back uncommitted transactions.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;2.Periodically, apply each subsequent transaction log, created on the primary server, to the databases on the standby server. Apply each transaction log in standby mode, specifying the same undo file used when previously restoring the database. &#xD;&lt;br/&gt;The frequency of transaction log backups applied to the standby server depends on the frequency of transaction log backups of the primary production server database. Frequently applying the transaction log reduces the work required to bring the standby server online in the event of a production system failure.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;In standby mode, the database is available for read-only operations, such as database queries that do not attempt to modify the database. This allows the database to be used for decision-support queries or DBCC checks.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Bringing the Standby Server Online&#xD;&lt;br/&gt;When the primary server initially becomes unavailable, it is unlikely that all the databases on the standby server are in complete synchronization. Some transaction log backups created on the primary server may not have been applied to the standby server yet. Additionally, some changes to the databases on the primary server are likely to have occurred since the transaction log on those databases were last backed up, especially in heavily used systems. Before the users use the standby copies, it is possible to synchronize the primary databases with the standby copies and bring the standby server online by: &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;1.Applying to the standby server in sequence any transaction log backups created on the primary server that have not yet been applied. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;2.Creating a backup of the active transaction log on the primary server and applying the backup to the database on the standby server. The backup of the active transaction log when applied to the standby server allows users to work with an exact copy of the primary database as it was immediately prior to failure (although any noncommitted transactions will have been permanently lost). For more information, see Transaction Log Backups. &#xD;&lt;br/&gt;If the primary server is undamaged, as in the case of planned maintenance or upgrades, you can back up the active transaction log with NORECOVERY. This will leave the database in the restoring state and allow you to update the primary server with transaction log backups from the secondary server. Then you can switch back to the primary server without creating a complete database backup of the secondary server. For more information, see BACKUP.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;3.Recover the databases on the standby server. This recovers the databases without creating an undo file, making the database available for users to modify.&#xD;&lt;br/&gt;A standby server can contain backups of databases from several instances of SQL Server. For example, a department could have five servers, each running a mission-critical database system. Rather than having five separate standby servers, a single standby server can be used. The database backups from the five primary systems can be loaded onto the single backup system, reducing the number of resources required and saving money. It is unlikely that more than one primary system would fail at the same time. Additionally, the standby server can be of higher specification than the primary servers to cover the remote chance that more than one primary system is unavailable at a given time.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_using_standby_servers_in_sql_server-2682.html</guid>
    </item>
    <item>
      <title>SQL Server Data Tools Connected Database Development</title>
      <link>http://consumer.admanya.com/blog_sql_server_data_tools_connected_database_development-2681.html</link>
      <description>&lt;p&gt;SQL Server Data Tools (SSDT) comes with SQL Server 2012 and is the replacement for Business Intelligence Development Studio (BIDS). In the earlier tip Introduction to SQL Server Data Tools I covered what is referred to as "Project-Oriented Offline Database Development" in the MSDN documentation.  As the name implies you work on database objects in an offline mode then publish your changes to a SQL Server database.  In this tip I am going to cover what is referred to as "Connected Database Development" in the MSDN documentation. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;You can think of the connected database development capabilities in SSDT as a subset of what you get in SQL Server Management Studio (SSMS).  With these new capabilities it is possible that you can do everything you need with SSDT in terms of developing a database; i.e. creating tables, views, stored procedures, etc.  I emphasize "possible" because you may still wind up using SSMS for some things.  However, SSDT provides a good bit of the capability that you need as well as some useful things that are not provided in SSMS.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;SSDT provides the following capabilities to enable connected database development:&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;SQL Server Object Explorer &#xD;&lt;br/&gt;Transact-SQL Editor &#xD;&lt;br/&gt;Schema Compare&#xD;&lt;br/&gt;I will walk through each of these capabilities in the following sections. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;SQL Server Object Explorer&#xD;&lt;br/&gt;SQL Server Object Explorer provides a subset of the functionality that you get in the Object Explorer in SQL Server Management Studio (SSMS) and some new capabilities as well.  Click View, SQL Server Object Explorer from the top-level menu in SSDT to launch SQL Server Object Explorer and you will see something similar to what I have in my development environment&#xD;&lt;br/&gt;Table Designer&#xD;&lt;br/&gt;The table designer allows you to create a new table as well as unique keys, check constraints, indexes, foreign keys, and triggers. To launch the table designer, first click the icon next to the database to show the nodes beneath the database&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_sql_server_data_tools_connected_database_development-2681.html</guid>
    </item>
    <item>
      <title>If Anna a foreign hand, what about Sonias NAC?</title>
      <link>http://consumer.admanya.com/blog_if_anna_a_foreign_hand_what_about_sonias_nac-2615.html</link>
      <description>&lt;p&gt;For all of UPA ministers shenanigans, this must surely take the cake.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; In the last two days, V Narayanswamy, MoS in the PMO and the Union Minister of Overseas Indian Affairs Vayalar Ravi, have launched a broadside against Anna and his team, apparently as a response to their questioning Prime Minister Manmohan Singhs role in the so-called Coalgate. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;"How the three persons Anna Hazare, Kiran Bedi and this (Arvind) Kejriwal all three got this award. What is their contribution? What is their contribution to get a prestigious international award or the Magsaysay award, what is the purpose? So, it all kind of a (sic), I suspect there is a conspiracy to destabilize Indian politics," Ravi thundered. &#xD;&lt;br/&gt;American Trusts, Rockefeller Foundation as well as the Ford Foundation finance these award committees. The money comes from the American foundations, he added in good measure.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Earlier, Narayanswami had charged that Hazare was surrounded by "anti-national elements" and those supported by "foreign forces". &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Apparently, the ministers logic is that as Kiran Bedi (1994) and Arvind Kejriwal (2006) have been awarded  Magsaysay, which funded by American Foundations , who presumably act to destabilise India, which can only  mean that  Team Anna is a proxy for bringing India to its knees. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Only problem with this formulation of the esteemed ministers is that Sonia Gandhis National Advisory Council (NAC), the body that sets the tone and tenor for socio-economic mandate for the government actually has three members  Aruna Roy (2000), Deep Joshi (2009), M S Swaminathan (1971). &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;So by the ministers logic it stands to reason that the NAC itself stands infiltrated by anti-national elements funded and backed by foreign forces to bring India to its knees.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Surely, they are not questioning the judgement and integrity of their own party president!&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Moreover, by the logic of the Narayanswami-Ravi duo, the following are those who should be suspect in their eyes, for they are among those Indians who have been awarded the American funded Magsaysay Award. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Vinod Bhave (1958), Verghese Kurien (1963),  Jayaprakash Narayan (1965), Ravi Shankar (1992), Arun Shourie (1982), R K Laxman (1984), Baba Amte (1985), Ela Bhatt (1994), M S Subalakshmi (1994), T N Seshan (1996), Mahasweta Devi (1997), J M Lyngdoh (2003). &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Just another small point, Minister Ravi did not even get his facts right. Anna Hazare has never been given the Magsaysay Award, though he has been awarded both the Padma Sri and the Padma Vibhushan.) &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Of course, not a word on the fate of the Jan Lokpal bill from the ministers. But, anti-nationals, foreign forces it is!&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_if_anna_a_foreign_hand_what_about_sonias_nac-2615.html</guid>
    </item>
    <item>
      <title>Monday Blues</title>
      <link>http://consumer.admanya.com/blog_monday_blues-2614.html</link>
      <description>&lt;p&gt;&lt;img src="http://images2.admanya.com/blog_imgs/blog_2018-10-2012 13-01-09.jpg" align="left" vspace="15" hspace="15" /&gt;Lets be honest, a job is never really just a job. For those of us who go to an office, for gainful employment, our workplaces are an integral part of our lives. It is here that we spend one third (and sometimes more) of our daily lives. The other parts are divided over getting a good nights sleep and just getting on with life. So what happens if this important one third of our day is always rotten? Lots, says a recent study, which indicates that sticking to a job one hates can result into mental and physical health problems. Read about it here &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Having said that, is there really a perfect job? My first job was the one that I enjoyed the most. I learned all my professional chops while at it. I met some brightest and best co-workers, got a platform which groomed me professionally and as an individual. The downer? It paid peanuts. I remember staring into an empty bank account for the first year and a half of my work life. All the good things that the job offered simply faded away, as I scrounged for survival each month. (Its only now, when I look back, I realize the good things)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;My second job, paid well. Only it took my life away. Subsequent jobs followed. Each with its own set of problems. Each left me with a new learning. Over this period, I have developed a never-to-go-away back problem, thanks to hours and hours spent sitting at my desks, a capacity to absorb reasonable amounts of stress, a knack to deal with deadlines and not to forget some considerable weight gain because most of my earlier jobs never left me enough time, so that I could keep myself fit and fine. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;I often wonder if theres light at the end of the tunnel. Will there ever be a job that comes clean on all my professional and personal objectives. Hopefully one day, I will land into that utopian, elusive, exists-only-in-my-fantasy office, one that lets me get my pet to work.  Till then, I guess I am just going to have to deal with those Monday blues.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_monday_blues-2614.html</guid>
    </item>
    <item>
      <title>Script to create dynamic PIVOT queries in SQL Server</title>
      <link>http://consumer.admanya.com/blog_script_to_create_dynamic_pivot_queries_in_sql_server-2613.html</link>
      <description>&lt;p&gt;&lt;img src="http://images2.admanya.com/blog_imgs/blog_2613-17-10-2012-14-04-51.jpg" align="left" vspace="15" hspace="15" /&gt;In these cases it may make sense to construct a dynamic pivot. Let's assume the following simple schema:&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;STEP 1 --&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;USE tempdb;&#xD;&lt;br/&gt;GO&#xD;&lt;br/&gt;CREATE TABLE dbo.Products&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  ProductID INT PRIMARY KEY,&#xD;&lt;br/&gt;  Name      NVARCHAR(255) NOT NULL UNIQUE&#xD;&lt;br/&gt;  /* other columns */&#xD;&lt;br/&gt;);&#xD;&lt;br/&gt;INSERT dbo.Products VALUES&#xD;&lt;br/&gt;(1, N'foo'),&#xD;&lt;br/&gt;(2, N'bar'),&#xD;&lt;br/&gt;(3, N'kin');&#xD;&lt;br/&gt;CREATE TABLE dbo.OrderDetails&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  OrderID INT,&#xD;&lt;br/&gt;  ProductID INT NOT NULL&#xD;&lt;br/&gt;    FOREIGN KEY REFERENCES dbo.Products(ProductID),&#xD;&lt;br/&gt;  Quantity INT&#xD;&lt;br/&gt;  /* other columns */&#xD;&lt;br/&gt;);&#xD;&lt;br/&gt;INSERT dbo.OrderDetails VALUES&#xD;&lt;br/&gt;(1, 1, 1),&#xD;&lt;br/&gt;(1, 2, 2),&#xD;&lt;br/&gt;(2, 1, 1),&#xD;&lt;br/&gt;(3, 3, 1);&#xD;&lt;br/&gt;===========================================&#xD;&lt;br/&gt;A query to obtain each product's total quantity ordered would look something like this (ignoring details about order date, etc.):&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Step 2 ----&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;SELECT p.Name, Quantity = SUM(o.Quantity)&#xD;&lt;br/&gt;  FROM dbo.Products AS p&#xD;&lt;br/&gt;  INNER JOIN dbo.OrderDetails AS o&#xD;&lt;br/&gt;  ON p.ProductID = o.ProductID&#xD;&lt;br/&gt;  GROUP BY p.Name;&#xD;&lt;br/&gt;And in this case the results would look like this:&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;But what if the results needed to look like this?&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;We could write a hard-coded PIVOT query, but only if we know all of the potential product names:&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;STEP 3 ---&#xD;&lt;br/&gt;SELECT p.[foo], p.[bar], p.[kin]&#xD;&lt;br/&gt;FROM&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SELECT p.Name, o.Quantity&#xD;&lt;br/&gt;   FROM dbo.Products AS p&#xD;&lt;br/&gt;   INNER JOIN dbo.OrderDetails AS o&#xD;&lt;br/&gt;   ON p.ProductID = o.ProductID&#xD;&lt;br/&gt;) AS j&#xD;&lt;br/&gt;PIVOT&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SUM(Quantity) FOR Name IN ([foo],[bar],[kin])&#xD;&lt;br/&gt;) AS p;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;=====================================&#xD;&lt;br/&gt;If we add a new product, this PIVOT query no longer gives us the complete story. And we certainly don't want to have to go back and edit these queries every time we add a product (never mind when a product's name is changed). So consider some new data:&#xD;&lt;br/&gt;INSERT dbo.Products SELECT 4, N'blat';&#xD;&lt;br/&gt;INSERT dbo.OrderDetails SELECT 4,4,5;&#xD;&lt;br/&gt;Obviously the hard-coded PIVOT query is not going to pick up this new product:&#xD;&lt;br/&gt;SELECT p.[foo], p.[bar], p.[kin]&#xD;&lt;br/&gt;FROM&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SELECT p.Name, o.Quantity&#xD;&lt;br/&gt;   FROM dbo.Products AS p&#xD;&lt;br/&gt;   INNER JOIN dbo.OrderDetails AS o&#xD;&lt;br/&gt;   ON p.ProductID = o.ProductID&#xD;&lt;br/&gt;) AS j&#xD;&lt;br/&gt;PIVOT&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SUM(Quantity) FOR Name IN ([foo],[bar],[kin])&#xD;&lt;br/&gt;) AS p;&#xD;&lt;br/&gt;Results are the same as before:&#xD;&lt;br/&gt; ==========================================&#xD;&lt;br/&gt;Enter dynamic SQL. Typically frowned upon, this is one of the scenarios where you are likely to make a strong case for its use. We can simply build the output / pivot column list at runtime, and append it to the rest of the query:&#xD;&lt;br/&gt;DECLARE @columns NVARCHAR(MAX), @sql NVARCHAR(MAX);&#xD;&lt;br/&gt;SET @columns = N'';&#xD;&lt;br/&gt;SELECT @columns += N', p.' + QUOTENAME(Name)&#xD;&lt;br/&gt;  FROM (SELECT p.Name FROM dbo.Products AS p&#xD;&lt;br/&gt;  INNER JOIN dbo.OrderDetails AS o&#xD;&lt;br/&gt;  ON p.ProductID = o.ProductID&#xD;&lt;br/&gt;  GROUP BY p.Name) AS x;&#xD;&lt;br/&gt;SET @sql = N'&#xD;&lt;br/&gt;SELECT ' + STUFF(@columns, 1, 2, '') + '&#xD;&lt;br/&gt;FROM&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SELECT p.Name, o.Quantity&#xD;&lt;br/&gt;   FROM dbo.Products AS p&#xD;&lt;br/&gt;   INNER JOIN dbo.OrderDetails AS o&#xD;&lt;br/&gt;   ON p.ProductID = o.ProductID&#xD;&lt;br/&gt;) AS j&#xD;&lt;br/&gt;PIVOT&#xD;&lt;br/&gt;(&#xD;&lt;br/&gt;  SUM(Quantity) FOR Name IN ('&#xD;&lt;br/&gt;  + STUFF(REPLACE(@columns, ', p.[', ',['), 1, 1, '')&#xD;&lt;br/&gt;  + ')&#xD;&lt;br/&gt;) AS p;';&#xD;&lt;br/&gt;PRINT @sql;&#xD;&lt;br/&gt;EXEC sp_executesql @sql;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;This is a fairly trivial example, but I hope it demonstrates one approach you could use to achieve dynamic PIVOT.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_script_to_create_dynamic_pivot_queries_in_sql_server-2613.html</guid>
    </item>
    <item>
      <title>SQL</title>
      <link>http://consumer.admanya.com/blog_sql-2611.html</link>
      <description>&lt;p&gt;&lt;img src="http://images2.admanya.com/blog_imgs/blog_2611-16-10-2012-16-17-49.jpg" align="left" vspace="15" hspace="15" /&gt;The transaction log plays a critical role in a SQL Server database: it maintains an ongoing record of database activity crucial for the restoration of recent data in the event of a disaster. However, this benefit comes at a cost: the transaction log can consume a substantial amount of space in an active database. SQL Server provides two actions designed to counterbalance these large space requirements: transaction log truncation and log file shrinking. &#xD;&lt;br/&gt;Log Truncation&#xD;&lt;br/&gt;Transaction log truncation removes entries from the transaction log file. Normally, SQL Server handles truncation automatically and no administration intervention is necessary. The frequency of truncation depends upon the recovery model used in your database. SQL Server truncates the transaction log every time you back it up under the full or bulk&amp;#45;logged recovery model. If youre using the simple recovery model (which provides no transaction log recovery), SQL Server truncates the log at every transaction checkpoint. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;You may force SQL Server to truncate the transaction log through a roundabout process. You need to run a backup, but instruct SQL Server that the only action you would like to take is truncation of the transaction log. You can do this with the following Transact&amp;#45;SQL command: &#xD;&lt;br/&gt;BACKUP LOG &amp;lt;database_name&amp;gt; WITH TRUNCATE_ONLY;&#xD;&lt;br/&gt;Log Shrinking&#xD;&lt;br/&gt;Log truncation does remove transactions from the log file, but it doesnt actually reduce the amount of space reserved for the file. SQL Server expects that your transaction log will eventually grow to its pre&amp;#45;truncation size, so it doesnt release the disk space allocated to the log. This can be problematic if your log grows to an artificially large size at one point in time and never reaches that size again. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;In that case, youll need to manually shrink the transaction log file to reclaim the disk space for other uses. You may shrink your log file using the following Transact&amp;#45;SQL command: &#xD;&lt;br/&gt;DBCC SHRINKFILE(&amp;lt;filename&amp;gt;,&amp;lt;desired_shrink_size&amp;gt;)&#xD;&lt;br/&gt;Where desired_shrink_size is the amount of space, in megabytes, that you would like to reclaim. For obvious reasons, you can reclaim the most disk space immediately following a transaction log truncation operation.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_sql-2611.html</guid>
    </item>
    <item>
      <title>MS SQL Server</title>
      <link>http://consumer.admanya.com/blog_ms_sql_server-2610.html</link>
      <description>&lt;p&gt;The transaction log plays a critical role in a SQL Server database: it maintains an ongoing record of database activity crucial for the restoration of recent data in the event of a disaster. However, this benefit comes at a cost: the transaction log can consume a substantial amount of space in an active database. SQL Server provides two actions designed to counterbalance these large space requirements: transaction log truncation and log file shrinking. &#xD;&lt;br/&gt;Log Truncation&#xD;&lt;br/&gt;Transaction log truncation removes entries from the transaction log file. Normally, SQL Server handles truncation automatically and no administration intervention is necessary. The frequency of truncation depends upon the recovery model used in your database. SQL Server truncates the transaction log every time you back it up under the full or bulk&amp;#45;logged recovery model. If you&amp;#39;re using the simple recovery model (which provides no transaction log recovery), SQL Server truncates the log at every transaction checkpoint. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;You may force SQL Server to truncate the transaction log through a roundabout process. You need to run a backup, but instruct SQL Server that the only action you would like to take is truncation of the transaction log. You can do this with the following Transact&amp;#45;SQL command: &#xD;&lt;br/&gt;BACKUP LOG &amp;lt;database_name&amp;gt; WITH TRUNCATE_ONLY;&#xD;&lt;br/&gt;Log Shrinking&#xD;&lt;br/&gt;Log truncation does remove transactions from the log file, but it doesn&amp;#39;t actually reduce the amount of space reserved for the file. SQL Server expects that your transaction log will eventually grow to its pre&amp;#45;truncation size, so it doesn&amp;#39;t release the disk space allocated to the log. This can be problematic if your log grows to an artificially large size at one point in time and never reaches that size again. &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;In that case, you&amp;#39;ll need to manually shrink the transaction log file to reclaim the disk space for other uses. You may shrink your log file using the following Transact&amp;#45;SQL command: &#xD;&lt;br/&gt;DBCC SHRINKFILE(&amp;lt;filename&amp;gt;,&amp;lt;desired_shrink_size&amp;gt;)&#xD;&lt;br/&gt;Where desired_shrink_size is the amount of space, in megabytes, that you would like to reclaim. For obvious reasons, you can reclaim the most disk space immediately following a transaction log truncation operation.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_ms_sql_server-2610.html</guid>
    </item>
    <item>
      <title>Power play in Prithvi theatre</title>
      <link>http://consumer.admanya.com/blog_power_play_in_prithvi_theatre-2399.html</link>
      <description>&lt;p&gt;For all the avid fans and followers of theatre, the news related to Sanjana Kapoor to quit the Prithvi Theatre came as a shock. The graceful daughter of Shashi Kapoor was taking care of the affairs of the Mecca of experimental theatre in Mumbai for the last many years.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Post her exit from her life and soul, her brother, Kunal, would take care of the affairs of Prithvi. Sanjana  now wants to focus on her new organisation, ÃÂ¢ÃÂÃÂJunoonÃÂ¢ÃÂÃÂ. While it can not be said categorically, it looks that due to some rift within her family,Sanjana made her mind to move on. The Prithvi Theatre Company was set up by Kapoor and her brother Kunal in 1993. It was named after their grandfather, actor-director Prithviraj Kapoor.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Prithvi was came into existence under the watchful eyes of her mother,Jeniffer. Shashi Kapoor also worked in third grade films in order to earn enough money to realise the dreams of her wife, who was also a theatre personality. It is said that even though her parents too were involved in theatre, she decided to establish a theatre in the memory of her father-in-law,Prithivi Raj Kapoor. Notwithstanding her English background, she was vegetarian and did not touch liqour.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Scared of wifeÃÂ¢ÃÂÃÂs dislike for cigrette, Shashi used to smoke outside the four walls of his home. She used to present gifts to her in-laws on the birthday of her husband. After her demise in England from deadly cancer, she was cremated according to her wishes.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;While Sanjana made a debut in film ÃÂ¢ÃÂÃÂHero HeeralalÃÂ¢ÃÂÃÂ directed by Ketan Mehta, but she was more inclined towards theatre. After all, theatre was in her blood. Her Dada,Dadi,Nana and Nani were all ace theatre actors. After taking over the reigns of Prithvi, she was working overtime in order to popularize theatre in India. And now, Kunal Kapoor to handle Prithvi. It is  difficult to speculate as why ailing Shashi did not support his daughter in the power struggle within the family. One has to believe that before taking her call to quit the Prithvi which was part of her life, the kids of Shashi would have fought.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Sadly, Sanjana is leaving Prithvi when her father is not at all well. More than any ailment, once lifeline of Kapoor clan,Shashi, is leading a life of a very depressed person. Sense of  negativism has badly gripped him. Yash Chopra had offered him a wonderful role in ÃÂ¢ÃÂÃÂVeer ZaraÃÂ¢ÃÂÃÂ, which he declined. For close to one decade,Shashi has snapped his ties with Bollywood. He does not attend any function at all. He is spending his life quietly and lonely. This is his own decision.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Avid film buffs would always  remember ShashiÃÂ¢ÃÂÃÂs films like Jab Jab Phool Khile, Kanyadaan, Pyar Ka Mausam , Ek Shriman Ek Shrimati , Haseena Maan Jayegi, Sharmeelee, Aa Gale Lag Jaa, Fakira, Phaansi, Chor Machaye Shor, Mukti, Satyam Shivam Sundaram, Heeralal Pannalal , Junoon, Swayamvar and many such films, including ones he starred in with Pran like Chori Mera Kaam, Phaansi, Shankar Dada, Chakkar Pe Chakkar and with Amitabh Bachchan, such as Deewar, Namak Halaal. He has also played leading roles in a number of English-speaking Indian films, including the very first Merchant Ivory production The Householder followed by such as Shakespeare-Wallah, Bombay Talkie, Heat and Dust, etc.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Amitabh Bachchan was shocked to see Shashi Kapoor, his co-star of Trishul, Deewar and so many other hits, confined to a wheelchair. Amitabh was supposed to present the Filmfare Lifetime Achievement Award to the 71-year-old actor, but could not attend. However, Amitabh saw pictures of the event later and was shocked -- just like so many of his other fans.&#xD;&lt;br/&gt;Seeing him confined to a wheel chair, was something I could never associate with Shashi ji," the 67-year-old said.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;"Shashi Kapoor, that handsome gentle man. A smile on his face forever. A considerate calling on each meeting, now in this condition? Never," he added.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;While his filmi family always like to give him work, it is he who is distancing from one and all. He has also not turned seer or Sadhu. While ShashiÃÂ¢ÃÂÃÂs elder brother, Shammi remained extremely jovial and active till his last breath and he also worked in Ranbir KapoorÃÂ¢ÃÂÃÂs Rockstar. However, the younger sibling opted the of life of recluse without any apparent reason. It seems that the life of father has also impacted daughter.&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_power_play_in_prithvi_theatre-2399.html</guid>
    </item>
    <item>
      <title>Benefits of Chocolate Milk After Your Workout</title>
      <link>http://consumer.admanya.com/blog_benefits_of_chocolate_milk_after_your_workout-2366.html</link>
      <description>&lt;p&gt;To get the best results from your training, ensure that your post-workout drink or meal is up to par. After your workout, your body is most receptive to using amino acids to repair muscle tissue, while using carbohydrates to restore muscle glycogen.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;One of the best post-workout options is chocolate milk. Most prepared chocolate milk beverages are made with 1% or 2% milk, but you could also create your own fat-free chocolate milk by adding some chocolate syrup to regular skim milk. This will provide you with the benefits of carbohydrates, while giving you the optimal protein source found in milk.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Do make note, though, that different brands will vary in total calorie content, so even across the 1% varieties, the fat content may be the same, but total calorie content (typically ranging from 90 to 200 per 250 ml) will differ.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;HereÃÂ¢ÃÂÃÂs why post-workout chocolate milk tops the list when it comes to fueling yourself after a hard session at the gym.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Protein Content)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Post-workout chocolate milk is beneficial because of its protein content. Every cup contains between eight and 11 grams of protein, with the Clover and Bravo Foods brands containing the most. Ideally, youÃÂ¢ÃÂÃÂll want to consume between 15 and 25 grams of protein after a workout, which equates to 500 to 750 ml of chocolate milk.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Also, a study in the American Journal of Clinical Nutrition found that, when taken immediately after exercise, milk-based proteins promote greater muscle protein synthesis than soy-based proteins.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Finally, another reason why post-workout chocolate milk is beneficial is because cowÃÂ¢ÃÂÃÂs milk contains about 80 percent casein protein content and 20 percent whey protein content. This is ideal because the whey protein is fast-acting, allowing amino acids to get right into the muscle tissue, while the casein protein is digested slower, providing a steady stream of amino acids over a lengthier period of time.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Carbohydrate Content)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Turning to post-workout chocolate milk immediately following your lifting sessions is a smart move because of the types of carbohydrates it provides. The total carbohydrate count will vary depending upon the brand you choose, with most coming in around 20 to 25 grams of carbohydrates. The highest carb count is found in HersheyÃÂ¢ÃÂÃÂs 2% Chocolate Milk, which rings in at 31 grams, while HoodÃÂ¢ÃÂÃÂs Calorie Countdown 2% Chocolate Milk has the lowest carb count (5 grams).&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;This sugar will cause a spike in insulin levels, driving the glucose molecules into the muscle tissue and replenishing the energy stores for your next workout. Without this insulin spike, youÃÂ¢ÃÂÃÂre going to be looking at a slower recovery period, which could mean more time out of the gym.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;A study by the International Journal of Sports Nutrition had subjects perform three interval-style, exhaustion workout sessions on separate days, and then monitored the recovery that was demonstrated. The subjects consumed either chocolate milk or a carbohydrate replacement fluid post-workout.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Chocolate Milk)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;It was seen that after the recovery period was over, those who were drinking post-workout chocolate milk showed enhanced performance between the interval sessions, indicating that the carbohydrates in chocolate milk were doing a better job in recovery than the carbohydrates in the replacement beverage.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Calcium Content)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Finally, drinking post-workout chocolate milk is a smart move because of its calcium content. Calcium is one of the minerals that plays a critical role in the ÃÂ¢ÃÂÃÂpower strokeÃÂ¢ÃÂÃÂ ÃÂ¢ÃÂÃÂ when the individual muscle fibers generate tension through a cross-bridge cycling pattern, causing contraction to take place. The calcium ions are what bind to the plasma membrane and send one of the first signals to stimulate the power stroke. So, without enough calcium ions in the body, this process will not take place optimally.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;By drinking post-workout chocolate milk you will increase your daily calcium intake, and increase the likelihood of an optimal power stroke. Most brands average between 300 and 400 mg of calcium, but if you opt for HersheyÃÂ¢ÃÂÃÂs Chocolate Milk, youÃÂ¢ÃÂÃÂll get 500 mg per cup.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt; &#xD;&lt;br/&gt;&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Milk it)&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;Chocolate milk has a bad rep for being full of sugar, but perception is quickly changing and people are turning to it after their workout sessions. So, thereÃÂ¢ÃÂÃÂs no need to spend tons of money on mixing up some fancy post-workout beverage ÃÂ¢ÃÂÃÂ consider using simple chocolate milk instead.&#xD;&lt;br/&gt;&#xD;&lt;br/&gt;(Courtesy : FoxNews)&lt;/p&gt;&lt;hr/&gt;</description>
      <guid>http://consumer.admanya.com/blog_benefits_of_chocolate_milk_after_your_workout-2366.html</guid>
    </item>
  </channel>
</rss>

