<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEYNRHw7fyp7ImA9WhRRFEk.&quot;"><id>tag:blogger.com,1999:blog-32616583</id><updated>2011-11-27T17:03:15.207-08:00</updated><category term="download latest dotnet" /><category term="Stored Procedure Generator" /><category term="Pivot" /><category term="Performance" /><category term="Music with WPF" /><category term="Youtube" /><category term="localization" /><category term="customize VS 2008" /><category term="VS 2010" /><category term="TIC-TAC-TO Game" /><category term="SQLServer" /><category term="Restore Database" /><category term="ASP.NET" /><category term="XAML" /><category term="JQuery" /><category term="DOM" /><category term="POX" /><category term="Mobile Finder" /><category term="viewState" /><category term="Minimum salary" /><category term="Thumbnail creator" /><category term="ShrinkFile" /><category term="colourful IDE" /><category term="Pivot Viewer" /><category term="PHP Code Generator" /><category term="SSIS" /><category term="Resource file reading" /><category term="Binary Serialization" /><category term="Sql server" /><category term="Threading" /><category term="LINQ" /><category term="FTP Connection" /><category term="Highest salary" /><category term="web tools" /><category term="video downloader" /><category term="XML" /><category term="Best Practices" /><category term="freelancer" /><category term="SSRS" /><category term="JASON" /><category term="BPA" /><category term="Chat Application" /><category term="Hacking" /><category term="VB.Net" /><category term="Database Design" /><category term="Simple Steps" /><category term="Recover space" /><category term="ETL" /><category term="earn money" /><category term="Multilevel Grid" /><category term="SilverLight" /><category term="ESB" /><category term="interview Question" /><category term="Replication" /><category term="html to word" /><category term="ASP.NET 4" /><category term="AJAX" /><category term="UpdateUsage" /><category term="Visual Studio 2010" /><category term="Rajat" /><category term="Code Generator" /><category term="batch files" /><category term="isqlw" /><category term="Learn WCF" /><category term="animation" /><category term="SSL" /><category term="SQL Injections" /><category term="Project List" /><category term="ShrinkDatabase" /><category term="Performance Dashboard" /><category term="OSQL" /><category term="stored procedures" /><category term="Twitter integration" /><category term="REST" /><category term="LEARN WPF" /><category term="Tips  Tricks" /><category term="Log Shipping" /><category term="RAJAT JAISWAL" /><category term="indiandotnet" /><category term="online money" /><category term="Mirroring" /><category term="Utility" /><category term="LINQ TO XML" /><category term="Customize IDE" /><category term="Reference table" /><category term="SEO" /><category term="WCF" /><category term="trick" /><category term="CleanTable" /><category term="Web Security" /><category term="Compress backup" /><category term="Disaster Recovery" /><category term="IndexDefrag" /><category term="Security information popup" /><category term="Find mobile" /><category term="WPF" /><category term="Silverlight4" /><title>Asp.net &amp; Sql server fundas with Rajat Jaiswal</title><subtitle type="html">this blog is basically for those people who want to help other and help themselves in web development.Main key feature of this blog is asp, asp.net ,Php and other web development lanaguage &amp;amp; Database</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://rajatjaiswal.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://rajatjaiswal.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>85</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/WebProgrammer" /><feedburner:info uri="webprogrammer" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUINSX44fyp7ImA9WhRSGE4.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-9217281900573662732</id><published>2011-11-20T17:06:00.000-08:00</published><updated>2011-11-20T17:06:38.037-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-20T17:06:38.037-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="html to word" /><category scheme="http://www.blogger.com/atom/ns#" term="trick" /><title>HTML to Word Document in .net with simple trick</title><content type="html">Dear Friends,&lt;br /&gt;
Recently my friend got a new task to generate a word &amp; PDF document at runtime from FCK Editor and he was in real hurry, so he told me a sample for him. I tried with a simple which I am sharing here.&lt;br /&gt;
I created a resume layout with FCK editor. Please find the below screen and code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope you will also enjoy.&lt;br /&gt;
&lt;br /&gt;
you can download code  at&lt;br /&gt;
&lt;iframe title ="Preview" scrolling="no" marginheight="0" marginwidth="0" frameborder="0" style="width:98px;height:115px;padding:0;background-color:#fcfcfc;" src="https://skydrive.live.com/embedicon.aspx/.Public/RAJAT^_INDIANDOTNET^_HTMLTOWORD.zip?cid=1eda2012469ff8ad&amp;sc=documents"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Best Regards,&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-9217281900573662732?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/C6IdrkiMzozUbnNRqmo8o4hgdnQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C6IdrkiMzozUbnNRqmo8o4hgdnQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/C6IdrkiMzozUbnNRqmo8o4hgdnQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/C6IdrkiMzozUbnNRqmo8o4hgdnQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/-wdTat_z-IY" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/9217281900573662732?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/9217281900573662732?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/-wdTat_z-IY/html-to-word-document-in-net-with.html" title="HTML to Word Document in .net with simple trick" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/11/html-to-word-document-in-net-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMMRHo4cCp7ImA9WhZXFkQ.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-1176080501639187347</id><published>2011-05-06T07:01:00.000-07:00</published><updated>2011-05-06T07:01:25.438-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T07:01:25.438-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer" /><category scheme="http://www.blogger.com/atom/ns#" term="Performance Dashboard" /><category scheme="http://www.blogger.com/atom/ns#" term="Performance" /><title>How to check your SQL Server Performance using new Utility Performance Dashboard Reports ?</title><content type="html">Hello friends,&lt;br /&gt;
I know after reading the post title you are very excited to know more, even I was excited too to know more for this topic which I like very much.&lt;br /&gt;
Microsoft Introduced Performance Dashboard Utility reports which help us in finding the cause of low performance of our SQL Server Database.&lt;br /&gt;
You can download the performance Dashboard utility reports setup from below link&lt;br /&gt;
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=1d3a4a0d-7e0c-4730-8204-e419218c1efc&lt;br /&gt;
When you install this   installer you will find a new folder is created with Performance Dashboard name in tools folder of Microsoft SQL SERVER (“C:\Program Files\Microsoft SQL Server\90\Tools\PerformanceDashboard”)&lt;br /&gt;
Now when you open this folder you will get many RDL files. &lt;br /&gt;
Next question is how to use it so here we go.&lt;br /&gt;
1) Firstly run the script  with name “setup.sql “ from Performance Dashboard folder (“C:\Program Files\Microsoft SQL Server\90\Tools\PerformanceDashboard”)&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-pP137jNaCi0/TcP_EP5CQUI/AAAAAAAAAIo/LOg0inoNLRk/s1600/PerformanceDashBoard.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="233" width="320" src="http://4.bp.blogspot.com/-pP137jNaCi0/TcP_EP5CQUI/AAAAAAAAAIo/LOg0inoNLRk/s320/PerformanceDashBoard.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
2) Now  open our SQL Server Management studio &lt;br /&gt;
3) Open object explorer &lt;br /&gt;
4) Right click on the server select reports option  then select standard reports  as shown in below fig &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-5MK9wwvMTho/TcP-9XCuC4I/AAAAAAAAAIg/x-Nua15lAHk/s1600/EnableReports.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="239" width="320" src="http://1.bp.blogspot.com/-5MK9wwvMTho/TcP-9XCuC4I/AAAAAAAAAIg/x-Nua15lAHk/s320/EnableReports.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
5) Now select Performance_dashboard _main.rdl report &lt;br /&gt;
6) When you select this report you will find following screen &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Great it means you are able to see performance dashboard report.&lt;br /&gt;
The performance dashboard report gives you following result &lt;br /&gt;
1) First graph of report shows System CPU utilization (With the help of this you can find how much CPU utilization done by SQL)&lt;br /&gt;
2) Just Below the CPU utilization graph you can see current Activity (CPU consumption time, wait time) We can see detail with two parameter either by User Session or User request (When you click on the header of the grid  you will get different report) &lt;br /&gt;
3) Below this we have miscellaneous information which will give basic information like number of database currently on server, active trace etc.&lt;br /&gt;
4) Waiting log just right side of CPU utilization  graph which shows different wait type for SQL&lt;br /&gt;
5) Below that one more tabular grid there which shows historical records of SQL according to different criteria like waits, IO Statics&lt;br /&gt;
6) Expensive SQL report with different parameters like BY CPU, BY Duration, BY Logical Reads, BY Logical Writes etc.&lt;br /&gt;
Checks out there are many more feature reports.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-uEF2atnpWPM/TcP_L0JIfwI/AAAAAAAAAIw/sA0xzTjDFlo/s1600/Performance_DashBoard_Report.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="221" width="320" src="http://1.bp.blogspot.com/-uEF2atnpWPM/TcP_L0JIfwI/AAAAAAAAAIw/sA0xzTjDFlo/s320/Performance_DashBoard_Report.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
So with these different reports we can find where we are lacking. Where is the problem?&lt;br /&gt;
&lt;br /&gt;
My personal feeling is the utility is good to finding the performance counter but it will not provide any suggestion and solution to improve performance.&lt;br /&gt;
So why are you waiting? &lt;br /&gt;
Just download and enjoy the performance dashboard.&lt;br /&gt;
Have fun with reports in weekends: D.&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1906434476&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-1176080501639187347?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/GnLp5ej93Lds0DvYdudHtmgvBgw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GnLp5ej93Lds0DvYdudHtmgvBgw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/GnLp5ej93Lds0DvYdudHtmgvBgw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/GnLp5ej93Lds0DvYdudHtmgvBgw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/d2OLIRE5XOw" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1176080501639187347?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1176080501639187347?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/d2OLIRE5XOw/how-to-check-your-sql-server.html" title="How to check your SQL Server Performance using new Utility Performance Dashboard Reports ?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-pP137jNaCi0/TcP_EP5CQUI/AAAAAAAAAIo/LOg0inoNLRk/s72-c/PerformanceDashBoard.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/05/how-to-check-your-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0UFSXo_cSp7ImA9WhZXFks.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-2278066489417837283</id><published>2011-05-06T00:00:00.000-07:00</published><updated>2011-05-06T00:00:18.449-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-06T00:00:18.449-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="BPA" /><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="Best Practices" /><title>Check Best Practices with SQL SERVER  with Best Practices Analyzer (BPA)</title><content type="html">Hello Friends,&lt;br /&gt;
We always heard that we should adopt Best Practices in SQL Server and most of the time we tried our best to adopt best practices in our work but the problem is who will analyze the best practices which we did for our database ,SQL Server.&lt;br /&gt;
Hmm, that’s the point my dear friends but don’t worry on this part also because Microsoft introduce BPA (Best Practice Analyzer).&lt;br /&gt;
I tried this tool recently it is easy to use. It scans your database, SQL SERVER and provides you the best way to adopt Best Practices with your current structure.&lt;br /&gt;
You can download the installer of this tool from http://www.microsoft.com/downloads/en/details.aspx?FamilyId=da0531e4-e94c-4991-82fa-f0e3fbd05e63&lt;br /&gt;
After install this BPA utility you can easily scan your SQL SERVER, Databases with this.&lt;br /&gt;
&lt;br /&gt;
The BPA will provide you report of scan. The scan report will give you idea about what is missing, what need to do?&lt;br /&gt;
Below are some listed options which BPA raised after scan report&lt;br /&gt;
1) Backup is latest or is it out dated?&lt;br /&gt;
2) Database having any anomalies.&lt;br /&gt;
3) Database integrity check required or not?&lt;br /&gt;
4) Check Disk IO delay problem &lt;br /&gt;
5) Backup should be on separate volume &lt;br /&gt;
6) Bulletin\Administrators in sysAdmin Role&lt;br /&gt;
7) Set Page verify option &lt;br /&gt;
8) SQL Login Password policy violation&lt;br /&gt;
9) Database is not in full recovery mode &lt;br /&gt;
Although some of the warning in the above list which we can ignore according to our business need.&lt;br /&gt;
And many more issues to make SQL Server database robust just check below report snap.&lt;br /&gt;
&lt;br /&gt;
       As per my opinion the tool is good but need some more functionality or utility to manage and apply  &lt;br /&gt;
Best practices.  So why you people waiting just download, install and use.&lt;br /&gt;
Make your database robust with best practices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy Best Practices.&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0672328240&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-2278066489417837283?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5Y4hMMjrn7GiSjGI5smsLjGrn64/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Y4hMMjrn7GiSjGI5smsLjGrn64/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5Y4hMMjrn7GiSjGI5smsLjGrn64/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5Y4hMMjrn7GiSjGI5smsLjGrn64/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/ybrLFqksr-8" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2278066489417837283?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2278066489417837283?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/ybrLFqksr-8/check-best-practices-with-sql-server.html" title="Check Best Practices with SQL SERVER  with Best Practices Analyzer (BPA)" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/05/check-best-practices-with-sql-server.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQBSX4-fip7ImA9WhZQGEQ.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-7296991514999713258</id><published>2011-04-27T02:59:00.000-07:00</published><updated>2011-04-27T02:59:18.056-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-04-27T02:59:18.056-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Recover space" /><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="CleanTable" /><category scheme="http://www.blogger.com/atom/ns#" term="ShrinkFile" /><category scheme="http://www.blogger.com/atom/ns#" term="ShrinkDatabase" /><category scheme="http://www.blogger.com/atom/ns#" term="IndexDefrag" /><category scheme="http://www.blogger.com/atom/ns#" term="UpdateUsage" /><title>Space issue of SQL Server Database how to claim free space of SQL SERVER ?</title><content type="html">Dear Friends,&lt;br /&gt;
&lt;br /&gt;
 I have faced recently database size issue. In my current project I need to add a column bit field in table and update the bit field conditionally.&lt;br /&gt;
&lt;br /&gt;
The table contains 547,173,777 rows. Before adding the column the database size in 177 GB and after adding and updating the Bit column for the table the database size increased 223 GB.&lt;br /&gt;
&lt;br /&gt;
 I am suppressed with that behavior.&lt;br /&gt;
&lt;br /&gt;
 So my main motto at that time first recovers space. I searched many articles for claim space. Firstly I am sharing the with you all the options related to space and later on I will share the steps which help me to recover space&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; 1) Shrink File:-&lt;/b&gt;&lt;br /&gt;
Shrink file is the most used option to recover space again from database it mainly used to recover space from log files.&lt;br /&gt;
&lt;br /&gt;
 &lt;b&gt;Its syntax is DBCC SHRINKFILE (Database_LogFileName, Target Size MB)&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt; 2) Shrink Database:-&lt;/b&gt; &lt;br /&gt;
Shrink Database is another option which is used to shrink Database. With this option we physically gain the size.&lt;br /&gt;
&lt;br /&gt;
 It syntax is &lt;b&gt;DBCC SHRINKDATABASE (DatabaseName, Percentage)&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) Clean Table :-&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
 Clean table option can be used in particular condition suppose you have added a VARCHAR column in table and added data also to that column now later on you want to remove the column then After removing the column you will see the table size is unchanged to recover VARCHAR column space you can use CLEANTABLE option.&lt;br /&gt;
&lt;br /&gt;
Its syntax is &lt;b&gt;DBCC CLEANTABLE (DatabaseName, TableName)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; 4) SP_SPACEUSED:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This option will provide you space used by table or database .sp space used column will return number of rows, reserved space, Data space, index space, unused.&lt;br /&gt;
&lt;br /&gt;
Its syntax is &lt;b&gt;SP_SPACEUSED ‘TableName’&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;5) UPDATEUSAGE:-&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Update usage is another most important command which update accurate Rows &amp; pages count. Its syntax is as follows DBCC UPDATEUSAGE (DATabaseName, tableName)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;6) Index Defrag:&lt;/b&gt;&lt;br /&gt;
Index Defrag is one of the main commands. It should be used in maintenance plan also this command defrag the entire index and rearrange the index.&lt;br /&gt;
&lt;br /&gt;
Its syntax is as follows &lt;b&gt;DBCC INDEXDEFRAG (DatabaseName, TableName, IndexName)&lt;/b&gt; &lt;br /&gt;
Other than this &lt;b&gt;re indexing, re organizing index &lt;/b&gt;are option which help in actual database size projection. So all the above statements are related to the space information for database.&lt;br /&gt;
&lt;br /&gt;
Now in my case I got help from INDEXDEFRAG command.&lt;br /&gt;
&lt;br /&gt;
 I did defragmentation of all the index of a table on which I have added the bit column. After running defragmentation for each index I was amazed when I run SP_SPACEUSED it recovered almost 40 GB. But the problem not ends here when I saw my disk drive it not reflect actually on disk. Then I used shrink Database command which increase my server disk free space with 40%.&lt;br /&gt;
&lt;br /&gt;
So here are the steps to recover space from a table or database&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; 1) Check current space used by table with SP_SPACEUSED command&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;2) Run Index defragment command INDEXDEFRAG for each index on table&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;3) Shrink the Log file with SHRINKFILE command&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;4) Shrink the database using SHRINKDATABASE command&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
After running above steps you will surprised. I hope these steps will help you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
&lt;br /&gt;
 Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0123820227&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-7296991514999713258?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5vEflet305QD77bihL1_PLwFQlo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5vEflet305QD77bihL1_PLwFQlo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5vEflet305QD77bihL1_PLwFQlo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5vEflet305QD77bihL1_PLwFQlo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/121dISk95Tk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7296991514999713258?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7296991514999713258?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/121dISk95Tk/space-issue-of-sql-server-database-how.html" title="Space issue of SQL Server Database how to claim free space of SQL SERVER ?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/04/space-issue-of-sql-server-database-how.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkAHRn46eyp7ImA9Wx9bEUQ.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-2226614088476516253</id><published>2011-02-20T01:38:00.000-08:00</published><updated>2011-02-20T01:38:57.013-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-20T01:38:57.013-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="isqlw" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><category scheme="http://www.blogger.com/atom/ns#" term="batch files" /><title>Create Database with isqlW command</title><content type="html">Hello friends,&lt;br /&gt;
 Batch files many times reduce our work. Many tables, stored procedures, functions times we need to create same database, tables, stored procedures, and pre pop data on multiple instances or even same environment. Then in that case we just create scripts and run again and again in SQL Management Studio. But if you are in hurry and you want to run the script on single click without opening file then the easiest way is use ” ISQLW” .isqlw is the another way and we can use it with batch file.&lt;br /&gt;
 So here are the basic steps:-&lt;br /&gt;
 Suppose I want to create friends DB database with all theand pre pop data.&lt;br /&gt;
 Then step 1:- Generate, a script file in which we will keep all the create table’s statements, create procedures statements and pre pop scripts.&lt;br /&gt;
 Step2:- create a batch file for this just open notepad and save the file with extension “.bat” then the file is saved as batch file. (A batch file is executable file)&lt;br /&gt;
 Step 3: Just write isqlw command in that as shown below&lt;br /&gt;
 IsqlW -E -i "\fdb.sql" -o "\rajat.txt"&lt;br /&gt;
 Where -I switch for input file – o for output file. With isqlw you can give credential also but my sql server is with mix mode so there is no problem.&lt;br /&gt;
 After writing isqlw statement just save it and run it will create database FriendDB with all the tables, stored procedures and prepop data.&lt;br /&gt;
 And the entire log will register in rajat.txt file.&lt;br /&gt;
 In this way you can enjoy one click database creation with all tables’ stored procedures and pre&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0079120482&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt; pop data.&lt;br /&gt;
&lt;br /&gt;
 Thanks &amp; Esteemed Regards&lt;br /&gt;
 Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-2226614088476516253?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Cbu-9mDjDQLUTZq7JPZff_Qw5zM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Cbu-9mDjDQLUTZq7JPZff_Qw5zM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Cbu-9mDjDQLUTZq7JPZff_Qw5zM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Cbu-9mDjDQLUTZq7JPZff_Qw5zM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/438HcyGG8WM" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2226614088476516253?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2226614088476516253?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/438HcyGG8WM/create-database-with-isqlw-command.html" title="Create Database with isqlW command" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/02/create-database-with-isqlw-command.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEBRH8zeSp7ImA9Wx9UGEg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-9212958360722656277</id><published>2011-02-16T03:44:00.000-08:00</published><updated>2011-02-16T03:44:15.181-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-16T03:44:15.181-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Compress backup" /><category scheme="http://www.blogger.com/atom/ns#" term="Restore Database" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Restore database from zip file in SQL SERVER</title><content type="html">Recently one of my colleagues shared a link which is very useful in many ways.&lt;br /&gt;
&lt;br /&gt;
 http://clay.lenharts.net/blog/category/mssql-compressed-backup/&lt;br /&gt;
&lt;br /&gt;
The link is very useful for restoring compressed backup. Hope this will help you also.&lt;br /&gt;
&lt;br /&gt;
trust me it saved my whole day work because my production database size is  100 GB.&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0130622982&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-9212958360722656277?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/h1cLkkjaV7xocx3MTzl-Uwh_Ukk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h1cLkkjaV7xocx3MTzl-Uwh_Ukk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/h1cLkkjaV7xocx3MTzl-Uwh_Ukk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/h1cLkkjaV7xocx3MTzl-Uwh_Ukk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/ObWYXgoctTU" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/9212958360722656277?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/9212958360722656277?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/ObWYXgoctTU/restore-database-from-zip-file-in-sql.html" title="Restore database from zip file in SQL SERVER" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/02/restore-database-from-zip-file-in-sql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEICQ3c8eip7ImA9Wx9UFU4.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-4968112450626030459</id><published>2011-02-12T10:49:00.000-08:00</published><updated>2011-02-12T10:49:22.972-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-02-12T10:49:22.972-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Pivot" /><category scheme="http://www.blogger.com/atom/ns#" term="Pivot Viewer" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight4" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Pivot Viewer "Cricket World Cup 2011"</title><content type="html">Hello friends, &lt;br /&gt;
&lt;br /&gt;
we have left the last topic with definition of Pivot Viewer now in this post we are going to make a sample which use pivot viewer. Our sample is “Cricket World Cup 2011” so here we go&lt;br /&gt;
Step 1:- First checks on your machine following things are installed if not then please installed them&lt;br /&gt;
a) Silverlight 4 (http://silverlight.codeplex.com/ )&lt;br /&gt;
b) Pivot collection tool (http://www.silverlight.net/learn/pivotviewer/collection-tools/)&lt;br /&gt;
&lt;br /&gt;
Step 2:- Once you have installed above tools then create a pivot collection first. The pivot collection can also be generate using code also (at run time) but here I am using excel pivot collection generator.&lt;br /&gt;
Step 3:- For generating collection just open excel book go to pivot collection menu when you click pivot collection just below the menu new pivot collection tools will be visible. Then just create new collection button as shown in above image.&lt;br /&gt;
 &lt;br /&gt;
Excel Pivot Collection&lt;br /&gt;
Step 4:- When you click the new collection button you will get new excel object as shown in below fig&lt;br /&gt;
 &lt;br /&gt;
Pivot Collection Template&lt;br /&gt;
Step 5:- Now add the data according to your need as I added following columns&lt;br /&gt;
a) Team&lt;br /&gt;
b) Name&lt;br /&gt;
c) Bating Style&lt;br /&gt;
d) Bowling style&lt;br /&gt;
e) Is Captain&lt;br /&gt;
f) 100’s&lt;br /&gt;
g) 50’s&lt;br /&gt;
h) Runs&lt;br /&gt;
I) Average&lt;br /&gt;
j) URL&lt;br /&gt;
k) Description&lt;br /&gt;
l) Image&lt;br /&gt;
Step 6: Just fill the data as per the filtration column as shown in below fig&lt;br /&gt;
 &lt;br /&gt;
Step 7: Now once your data is fill then just click on publish collection button on toolbar&lt;br /&gt;
It will generate a “CXML” file which is collection Xml file with  &lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ACKZbXaPEao/TVbVe_XoEXI/AAAAAAAAAHs/1UZU1UnzWD4/s1600/CricketTeamExcel.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="119" width="320" src="http://4.bp.blogspot.com/-ACKZbXaPEao/TVbVe_XoEXI/AAAAAAAAAHs/1UZU1UnzWD4/s320/CricketTeamExcel.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
 deep zoom images collection.&lt;br /&gt;
&lt;br /&gt;
Step8:- Now your collection is ready so next thing is how to use it. So first create a VS2010 Silverlight web application project.&lt;br /&gt;
 &lt;br /&gt;
Step 9: Copy CXML &amp; and images folder to your web project first&lt;br /&gt;
Step 10: Once you copied the CXML and Images then open your Silverlight project and drag drop Pivot control or if it is not exist in your tool manually add for that just add reference as shown below.&lt;br /&gt;
xmlns:pivot="clr-namespace:System.Windows.Pivot;assembly=System.Windows.Pivot"&lt;br /&gt;
Step 11:- Now in the code behind just assign the collection URL to pivot control. (The URL nothing but the CXML URL which you already copied in your web project in step 9) as shown below.&lt;br /&gt;
this.pivot.LoadCollection("http://localhost:54210/CricketWorldCup2011.cxml", "");&lt;br /&gt;
Step 12: Now run the project you will get following screen. On left side you will get filter criteria when you change t&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-lWEWUxErkbc/TVbVtY9pWAI/AAAAAAAAAH0/tBMndEtxYoU/s1600/cricketPivot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="121" width="320" src="http://3.bp.blogspot.com/-lWEWUxErkbc/TVbVtY9pWAI/AAAAAAAAAH0/tBMndEtxYoU/s320/cricketPivot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
hat your data will also change in centre.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Cricket World Cup 2011 Pivot&lt;br /&gt;
Hope the steps will be helpful and you can download code from.&lt;br /&gt;
Excel Data Cricket World Cup Team 2011 Data &lt;br /&gt;
Solution of Pivot Viewer Download Solution &lt;br /&gt;
Thanks &amp; Esteemed Regards&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-4968112450626030459?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/hOlRM_fOXheY3ioVERaUsGWQhqQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hOlRM_fOXheY3ioVERaUsGWQhqQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/hOlRM_fOXheY3ioVERaUsGWQhqQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/hOlRM_fOXheY3ioVERaUsGWQhqQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/w4EnMyM1AB8" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4968112450626030459?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4968112450626030459?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/w4EnMyM1AB8/pivot-viewer-cricket-world-cup-2011.html" title="Pivot Viewer &quot;Cricket World Cup 2011&quot;" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-ACKZbXaPEao/TVbVe_XoEXI/AAAAAAAAAHs/1UZU1UnzWD4/s72-c/CricketTeamExcel.jpg" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/02/pivot-viewer-cricket-world-cup-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUCQ3s6eCp7ImA9Wx9WGU8.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-4706222515327245459</id><published>2011-01-24T18:41:00.000-08:00</published><updated>2011-01-24T18:41:02.510-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-24T18:41:02.510-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SilverLight" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Pivot" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>What is Pivot Viewer in Silverlight ?</title><content type="html">Hi Folks,&lt;br /&gt;
&lt;br /&gt;
Sorry for such a late post. I know you were waiting for the new post from last 2 week. So here I am with a new interesting area which will help i&lt;b&gt;n data visualization. “Pivot” contr&lt;/b&gt;ol is great tool supported b&lt;b&gt;y Silverlight 4&lt;/b&gt; . &lt;br /&gt;
I know that I am bit late to explore such a great control. I really want to tha&lt;b&gt;nk Microsoft Pivot team&lt;/b&gt; for this they did such a great job. &lt;br /&gt;
&lt;br /&gt;
Again our 3 basic quest&lt;b&gt;ions WWH means&lt;/b&gt;,&lt;br /&gt;
&lt;b&gt;What is pivot viewer control? &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Why pivot viewer control? &lt;/b&gt;&lt;br /&gt;
&lt;b&gt;And lasts but not the least How we can use &amp; utilize it? &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So, we first start with &lt;b&gt;pivot viewer. &lt;/b&gt;&lt;br /&gt;
Pivot viewer is new control supported with Silverlight 4. It is a representational control you can use this control where you want a&lt;br /&gt;
&lt;b&gt; BI functionality &lt;/b&gt;. Or we can say that it provide a unique way to represent data to analyse. You can filter data on the basis of various filters which you define and the transition from one filter to another filter is so smooth you worth to watch it. You can change view from normal grid view to column view.&lt;br /&gt;
&lt;br /&gt;
Now if you are aware of &lt;b&gt; BI (Business Intelligence) &lt;/b&gt; tools then I am just saying here it is one of the BI tools which help end user to get the result by applying multiple filters. You can define  &lt;b&gt;facts &amp; fact category (facts are actual data &amp; fact categories are the fields on which you can apply filter to get desire result).&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
 Now I know you are most interested in where &amp; how can we use?  So I am taking very interesting topic which is &lt;b&gt;“Cricket World Cup 2011”. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
I will explain whole topic with exam&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__qErnTvFiSE/TT43-1-jvxI/AAAAAAAAAHc/L9WBcFBUgWY/s1600/cricketPivot.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="121" width="320" src="http://3.bp.blogspot.com/__qErnTvFiSE/TT43-1-jvxI/AAAAAAAAAHc/L9WBcFBUgWY/s320/cricketPivot.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
ple in next post.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-4706222515327245459?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/ojl68tnsxyGxA7P-6FnHmFxT4lU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ojl68tnsxyGxA7P-6FnHmFxT4lU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/ojl68tnsxyGxA7P-6FnHmFxT4lU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/ojl68tnsxyGxA7P-6FnHmFxT4lU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/kOnwQIUTZfs" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4706222515327245459?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4706222515327245459?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/kOnwQIUTZfs/what-is-pivot-viewer-in-silverlight.html" title="What is Pivot Viewer in Silverlight ?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/__qErnTvFiSE/TT43-1-jvxI/AAAAAAAAAHc/L9WBcFBUgWY/s72-c/cricketPivot.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/what-is-pivot-viewer-in-silverlight.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUFRXs5fSp7ImA9Wx9XFkU.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-7332914284352250911</id><published>2011-01-10T10:59:00.000-08:00</published><updated>2011-01-10T11:03:34.525-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-10T11:03:34.525-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SilverLight" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET 4" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Silverlight Out Of Browser Application (OOB Application)</title><content type="html">Hello friends, &lt;br /&gt;
&lt;br /&gt;
As we have seen last night&lt;b&gt; how to access Video capturing devices with Silverlight 4.0&lt;/b&gt;.&lt;br /&gt;
Now today I thought why we don’t try for &lt;b&gt;OOB Application &lt;/b&gt;means Out Of Browser Application.&lt;br /&gt;
Out of Browser application means you can run your &lt;b&gt;Silverlight application just like an EXE&lt;/b&gt; we don’t require any browser like IE, Firefox etc to run our Silverlight application. So here is the step which we have to follow to get out of Browser application.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1:-&lt;/b&gt; Check Silverlight project’s property page. On this page you will find a checkbox which is “Enable running application out of the browser” just check this checkbox as shown in below fig.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/__qErnTvFiSE/TStX1fQy_0I/AAAAAAAAAHM/dy-qfQz-RN0/s1600/outOfBrowser.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="186" width="320" src="http://1.bp.blogspot.com/__qErnTvFiSE/TStX1fQy_0I/AAAAAAAAAHM/dy-qfQz-RN0/s320/outOfBrowser.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
Step 2:-&lt;/b&gt; Click on the button “Out-Of-Browser Settings...” and you will find below screen. In this screen you set title for the application, give description for the application, define icons for application.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/__qErnTvFiSE/TStX_-fYJiI/AAAAAAAAAHU/veGEI5grfdQ/s1600/OOBSettings.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="320" width="287" src="http://1.bp.blogspot.com/__qErnTvFiSE/TStX_-fYJiI/AAAAAAAAAHU/veGEI5grfdQ/s320/OOBSettings.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
Step3:-&lt;/b&gt; Be sure if you want to access local files of computer then check “Require elevated trust when running outside the browser” checkbox.  When this checkbox is checked then you can easily access the file from my documents and local directory easily it give full trust to your application.&lt;br /&gt;
&lt;b&gt;Step4 :-&lt;/b&gt; you can  check whether the application is installed on machine or not with app.current.InstallState you can check Installation state if not installed the you can choose app.current.Install() method to install app.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__qErnTvFiSE/TStXoEjN8yI/AAAAAAAAAHE/Ve3Ew-EgRqA/s1600/OOB.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="317" width="320" src="http://3.bp.blogspot.com/__qErnTvFiSE/TStXoEjN8yI/AAAAAAAAAHE/Ve3Ew-EgRqA/s320/OOB.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Hope you will enjoy OOB application.&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1847198864&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-7332914284352250911?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2LP-8mTdPH-7Grp1768TZJU4mzY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2LP-8mTdPH-7Grp1768TZJU4mzY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2LP-8mTdPH-7Grp1768TZJU4mzY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2LP-8mTdPH-7Grp1768TZJU4mzY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/VCKEO_LZQ3U" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7332914284352250911?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7332914284352250911?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/VCKEO_LZQ3U/silverlight-out-of-browser-application.html" title="Silverlight Out Of Browser Application (OOB Application)" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/__qErnTvFiSE/TStX1fQy_0I/AAAAAAAAAHM/dy-qfQz-RN0/s72-c/outOfBrowser.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/silverlight-out-of-browser-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQNRX0-eyp7ImA9Wx9XFUw.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-1402947207171038273</id><published>2011-01-08T11:16:00.000-08:00</published><updated>2011-01-08T11:19:54.353-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-08T11:19:54.353-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SilverLight" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET 4" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Webcam or other video device access using Silverlight 4.0</title><content type="html">Hello friends,&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Microsoft Silverlight 4.0&lt;/b&gt; provided another great feature of &lt;b&gt;Audio &amp; Video capturing&lt;/b&gt;. Today I am interested in using one of these cool features which is &lt;b&gt;video capturing&lt;/b&gt;.&lt;br /&gt;
With the help of the &lt;b&gt;video &amp; audio capturing feature &lt;/b&gt;we can get all the capturing devices and use them. In current example there is only one source which is my laptop webcam.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/__qErnTvFiSE/TSi3kONOeII/AAAAAAAAAGM/2iEp-JeZzrM/s1600/videocapture.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="305" width="320" src="http://1.bp.blogspot.com/__qErnTvFiSE/TSi3kONOeII/AAAAAAAAAGM/2iEp-JeZzrM/s320/videocapture.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we are using 8 simple steps. With the help this simple we are capable of capturing webcam and stop capturing.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1:-&lt;/b&gt; Create a new project of Silverlight with version Silverlight 4 version.&lt;br /&gt;
&lt;b&gt;Step 2:- &lt;/b&gt;Draw a shape either rectangle or eclipse. The shape will hold the video.&lt;br /&gt;
&lt;b&gt;Step 3:- &lt;/b&gt; CaptureDeviceConfiguration provides GetAvailableVideoCaptureDevice &amp;   GetDefaultvideoCaptureDevice methods.&lt;br /&gt;
The GetAvailableVideoCaptureDevice list out the entire available video capture device attached with your machine and GetDefaultVideoCaptureDevice provides default video capture device.&lt;br /&gt;
&lt;br /&gt;
But before accessing any device from any machine we need to request device access and need to determine whether the device access is allowed or not. For determining the permission or request a device access we have following 2 methods&lt;br /&gt;
&lt;blockquote&gt;CaptureDeviceConfiguration.AllowedDeviceAccess   CaptureDeviceConfiguration.RequestDeviceAccess&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
It will prompt message for accessing the capturing device when you run the program.&lt;br /&gt;
&lt;br /&gt;
var webCam = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/__qErnTvFiSE/TSi304b-scI/AAAAAAAAAGU/7Cyg4tvkRsk/s1600/permission.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="124" width="320" src="http://4.bp.blogspot.com/__qErnTvFiSE/TSi304b-scI/AAAAAAAAAGU/7Cyg4tvkRsk/s320/permission.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Step 4:-&lt;br /&gt;
Once you determine the &lt;b&gt;capture device configuration &lt;/b&gt;then you need to assign it to assign as a &lt;b&gt;video capture source &lt;/b&gt;device of capturesource.&lt;br /&gt;
captureSource = new CaptureSource();&lt;br /&gt;
&lt;br /&gt;
Step 5:- Once you assign the capture source’s video capture device then use a new brush utility provided by Silverlight which is &lt;b&gt;Video Brush&lt;/b&gt;.  You just need to set source of video Brush which will be your capture source.&lt;br /&gt;
var videoBrush = new VideoBrush();&lt;br /&gt;
videoBrush.SetSource(captureSource);&lt;br /&gt;
&lt;br /&gt;
Step 6:- Once the video Brush’s source is set then you can fill any shape with video brush.&lt;br /&gt;
rectangle1.Fill = videoBrush;&lt;br /&gt;
ellipse1.Fill = videoBrush;&lt;br /&gt;
&lt;br /&gt;
Step 7:- now to start capturing from video source you need to call start method of capture source.&lt;br /&gt;
&lt;blockquote&gt;captureSource.Start();&lt;br /&gt;
&lt;/blockquote&gt;Step 8:- you can stop capturing video by stop method.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;captureSource.Stop();&lt;br /&gt;
&lt;/blockquote&gt;From the above description you can capture video from Webcam or any other video device which attached with your machine using Silverlight video capture facility. One more advantage is that you can take image also means image capturing is also possible. For this you have to define &lt;b&gt;asynchronous image capture event.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;In this way you can access video capture device.  More than this you can download code from &lt;br /&gt;
&lt;a href="http://cid-1eda2012469ff8ad.office.live.com/self.aspx/.Public/RajatJaiswal%5E_IndiandotnetVideoCaptureSilverlight4.0.zip"&gt;download source code&lt;br /&gt;
&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Enjoy Silverlight.&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat  Jaiswal&lt;br /&gt;
&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=073563887X&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-1402947207171038273?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/raNPjO9mMmJZz9gDNMIf4oCcdOk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/raNPjO9mMmJZz9gDNMIf4oCcdOk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/raNPjO9mMmJZz9gDNMIf4oCcdOk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/raNPjO9mMmJZz9gDNMIf4oCcdOk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/Ko_Wvaq8pFw" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1402947207171038273?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1402947207171038273?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/Ko_Wvaq8pFw/webcam-or-other-video-device-access.html" title="Webcam or other video device access using Silverlight 4.0" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/__qErnTvFiSE/TSi3kONOeII/AAAAAAAAAGM/2iEp-JeZzrM/s72-c/videocapture.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/webcam-or-other-video-device-access.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cFRHozeip7ImA9Wx9XEk4.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-5711944315117586304</id><published>2011-01-05T05:43:00.000-08:00</published><updated>2011-01-05T05:43:35.482-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-05T05:43:35.482-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tips  Tricks" /><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>how to find column or text in entire stored procedure?</title><content type="html">Hello Friends,&lt;br /&gt;
Sometime we want to &lt;b&gt;search a particular column or some text in entire stored procedures&lt;/b&gt;. For this we can utilize following two simple approaches&lt;br /&gt;
Approach 1:-&lt;br /&gt;
BEGIN TRY &lt;br /&gt;
  DECLARE @strColumn VARCHAR(1000)&lt;br /&gt;
  SET @strColumn ='Rajat'&lt;br /&gt;
  SELECT DISTINCT o.name&lt;br /&gt;
  FROM sys.syscomments c&lt;br /&gt;
  INNER JOIN sys.objects o ON o.object_Id = c.Id&lt;br /&gt;
                 AND o.type ='P'&lt;br /&gt;
  WHERE text like '%' + @strColumn +'%'&lt;br /&gt;
  ORDER BY o.NAME&lt;br /&gt;
END TRY&lt;br /&gt;
BEGIN CATCH&lt;br /&gt;
  SELECT ERROR_LINE(),ERROR_NUMBER(),ERROR_MESSAGE()&lt;br /&gt;
END CATCH&lt;br /&gt;
Approach 2:-&lt;br /&gt;
BEGIN TRY &lt;br /&gt;
  DECLARE @strColumn VARCHAR(1000)&lt;br /&gt;
  SET @strColumn ='Rajat'&lt;br /&gt;
&lt;br /&gt;
  SELECT SPECIFIC_NAME &lt;br /&gt;
  FROM INFORMATION_SCHEMA.ROUTINES&lt;br /&gt;
  WHERE ROUTINE_TYPE= 'PROCEDURE'&lt;br /&gt;
  AND ROUTINE_DEFINITION LIKE '%' + @strColumn +'%'&lt;br /&gt;
  ORDER BY SPECIFIC_NAME&lt;br /&gt;
END TRY&lt;br /&gt;
BEGIN CATCH&lt;br /&gt;
  SELECT ERROR_LINE(),ERROR_NUMBER(),ERROR_MESSAGE()&lt;br /&gt;
END CATCH &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope this will helpful to you somewhere.&lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0764584332&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-5711944315117586304?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2CEKjza7EEn4P7CveZuJwl41Y8c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2CEKjza7EEn4P7CveZuJwl41Y8c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2CEKjza7EEn4P7CveZuJwl41Y8c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2CEKjza7EEn4P7CveZuJwl41Y8c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/EusL0etvhPg" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5711944315117586304?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5711944315117586304?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/EusL0etvhPg/how-to-find-column-or-text-in-entire.html" title="how to find column or text in entire stored procedure?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/how-to-find-column-or-text-in-entire.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYDSH84eip7ImA9Wx9XEEs.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-4668131537896643311</id><published>2011-01-03T06:49:00.000-08:00</published><updated>2011-01-03T06:49:39.132-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-03T06:49:39.132-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer" /><category scheme="http://www.blogger.com/atom/ns#" term="SSRS" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Call SQL Server Reporting Services in ASP.NET by 5 easy steps</title><content type="html">&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=B001FA0P04&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;b&gt;Hello friends,&lt;br /&gt;
Wish you Happy New Year.&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
Today I am going to share a simple way to use &lt;b&gt;SQL Server Reporting Services &lt;/b&gt;locally. I am trying to &lt;b&gt;share simple steps for creating report.&lt;br /&gt;
&lt;/b&gt;I am using North wind database and try to create a sample report which shows customer information.&lt;br /&gt;
Here we go&lt;br /&gt;
Step 1:- Create a project in my case I am using web project you can choose either web/window. In the project add a &lt;b&gt;typed dataset &lt;/b&gt;and drag drop customers table on&lt;b&gt; XSD&lt;/b&gt;. (You can customize schema according to your need) as shown in below fig.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhLzOkwMI/AAAAAAAAAFk/1Sdi05YyC4U/s1600/MyDs.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="173" width="320" src="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhLzOkwMI/AAAAAAAAAFk/1Sdi05YyC4U/s320/MyDs.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Step2:- Now add a report &lt;b&gt;(.RDLC&lt;/b&gt;)  &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/__qErnTvFiSE/TSHhS7uXFnI/AAAAAAAAAFs/uJuiInGvh8g/s1600/MyReportRDLC.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="187" width="320" src="http://2.bp.blogspot.com/__qErnTvFiSE/TSHhS7uXFnI/AAAAAAAAAFs/uJuiInGvh8g/s320/MyReportRDLC.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Step 3:-  When you add  report then on right side a screen(Just like solution explore) will appear with name “ &lt;b&gt;Web Site Data source &lt;/b&gt;“  in this you will find  the &lt;b&gt;typed dataset &lt;/b&gt;which we have added and  when you expand the &lt;b&gt; typed dataset &lt;/b&gt;object you will find all the table schema as show in fig.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhaKp3qLI/AAAAAAAAAF0/xCdmNwB1L_k/s1600/DragDropColumn.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="96" width="320" src="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhaKp3qLI/AAAAAAAAAF0/xCdmNwB1L_k/s320/DragDropColumn.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Step 4: Now just &lt;b&gt;drag drop &lt;/b&gt;a table from toolbars’ report item. And &lt;b&gt;drag drop column&lt;/b&gt; from data source (type data set which shown in step3) to table column which you need to show in report. &lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/__qErnTvFiSE/TSHhfydlzqI/AAAAAAAAAF8/0RNRzoHWZeI/s1600/DragDropColumn.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="96" width="320" src="http://4.bp.blogspot.com/__qErnTvFiSE/TSHhfydlzqI/AAAAAAAAAF8/0RNRzoHWZeI/s320/DragDropColumn.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Step 5:- Once you done with step4 now next step to call report from “Asp.net”. For this just drag drop &lt;b&gt;Microsoft reporting viewer &lt;/b&gt;and do following code.&lt;br /&gt;
Below is the code&lt;br /&gt;
Dim sqlcon As New SqlConnection(ConfigurationManager.ConnectionStrings("connectionString").ConnectionString.ToString())&lt;br /&gt;
            sqlcon.Open()&lt;br /&gt;
            Dim sqlcmd As New SqlCommand&lt;br /&gt;
            sqlcmd.CommandText = "SELECT * FROM Customers"&lt;br /&gt;
            sqlcmd.CommandType = CommandType.Text&lt;br /&gt;
            sqlcmd.Connection = sqlcon&lt;br /&gt;
            Dim sda As New SqlDataAdapter&lt;br /&gt;
            Dim ds As New myDs&lt;br /&gt;
            sda.SelectCommand = sqlcmd&lt;br /&gt;
            sda.Fill(ds, ds.Customers.TableName)&lt;br /&gt;
‘clearing report viewer&lt;br /&gt;
            Me.ReportViewer1.LocalReport.DataSources.Clear()&lt;br /&gt;
‘Create datasource for report &lt;br /&gt;
            Dim rds As New ReportDataSource()&lt;br /&gt;
            rds.Name = "myDs_Customers"&lt;br /&gt;
            rds.Value = ds.Customers&lt;br /&gt;
            Me.ReportViewer1.LocalReport.DataSources.Add(rds)&lt;br /&gt;
‘assigning report path.&lt;br /&gt;
            Me.ReportViewer1.LocalReport.ReportPath = "myReport.rdlc"&lt;br /&gt;
            Me.ReportViewer1.LocalReport.Refresh()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now run the page and you will get report as shown below.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhpco-OuI/AAAAAAAAAGE/ucAfsuKe8tw/s1600/Report.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="106" width="320" src="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhpco-OuI/AAAAAAAAAGE/ucAfsuKe8tw/s320/Report.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks&lt;br /&gt;
Rajat &lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0735622507&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-4668131537896643311?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3qCYpLTXoVVvAv763SY0M6AE7gA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3qCYpLTXoVVvAv763SY0M6AE7gA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3qCYpLTXoVVvAv763SY0M6AE7gA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3qCYpLTXoVVvAv763SY0M6AE7gA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/Lujd4JOwjpE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4668131537896643311?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4668131537896643311?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/Lujd4JOwjpE/call-sql-server-reporting-services-in.html" title="Call SQL Server Reporting Services in ASP.NET by 5 easy steps" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/__qErnTvFiSE/TSHhLzOkwMI/AAAAAAAAAFk/1Sdi05YyC4U/s72-c/MyDs.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/call-sql-server-reporting-services-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04NRnczfCp7ImA9Wx9QGU0.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-1475409239574836492</id><published>2011-01-01T11:26:00.000-08:00</published><updated>2011-01-01T11:26:37.984-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-01T11:26:37.984-08:00</app:edited><title>Happy New Year</title><content type="html">Wish you all happy new year.&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Almost-Midnight-Holiday-Cards-envelopes/dp/B000VUPITC?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Almost Midnight - New Year Holiday Cards, Box of 10 cards and envelopes" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=B000VUPITC&amp;tag=indiandotnet-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B000VUPITC" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;
&lt;br /&gt;
Hope we all do best of the best in the life.Try to put our self best in all the fields.&lt;br /&gt;
&lt;a imageanchor="1" target="_blank"  href="http://www.amazon.com/Hope-Holiday-Cards-cards-envelopes/dp/B0048LX35Q?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969"&gt;&lt;img alt="Hope - New Year Holiday Cards, Box of 10 cards and envelopes" src="http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=B0048LX35Q&amp;tag=indiandotnet-20" /&gt;&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B0048LX35Q" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;br /&gt;
God Bless :) Jai mata di&lt;br /&gt;
&lt;br /&gt;
thanks&lt;br /&gt;
&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=B0048LX35Q&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-1475409239574836492?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/KX_FswRsnqVNQqc2hLfAbAjMNew/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KX_FswRsnqVNQqc2hLfAbAjMNew/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/KX_FswRsnqVNQqc2hLfAbAjMNew/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/KX_FswRsnqVNQqc2hLfAbAjMNew/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/2DdAhI3HHJE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1475409239574836492?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/1475409239574836492?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/2DdAhI3HHJE/happy-new-year.html" title="Happy New Year" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2011/01/happy-new-year.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYzfyp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-430070169521626928</id><published>2010-12-28T03:27:00.000-08:00</published><updated>2010-12-28T09:04:09.887-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.887-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>How to write an insert statement for a table which has only single column and that column is auto incremented?</title><content type="html">Hello friends,&lt;br /&gt;
Recently a question asked to my friend in an interview “&lt;b&gt;How to write an insert statement for a table which has only single column and that column is auto incremented?”&lt;br /&gt;
&lt;/b&gt;So here is the answer for it with sample &lt;br /&gt;
DECLARE @tblTest AS TABLE (id INT IDENTITY)&lt;br /&gt;
INSERT INTO @tblTest DEFAULT VALUES&lt;br /&gt;
INSERT INTO @tblTest DEFAULT VALUES&lt;br /&gt;
INSERT INTO @tblTest DEFAULT VALUES&lt;br /&gt;
INSERT INTO @tblTest DEFAULT VALUES&lt;br /&gt;
INSERT INTO @tblTest DEFAULT VALUES&lt;br /&gt;
SELECT * FROM @tblTest&lt;br /&gt;
But I don’t know what will be the use of this table?&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
Enjoy Query &lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal &lt;br /&gt;
&lt;/b&gt;&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1590599586&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-430070169521626928?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/r7F1b-166Omhgb2yNNZbLQ9kUNg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7F1b-166Omhgb2yNNZbLQ9kUNg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/r7F1b-166Omhgb2yNNZbLQ9kUNg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/r7F1b-166Omhgb2yNNZbLQ9kUNg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/izUDvnB0Vvs" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/430070169521626928?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/430070169521626928?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/izUDvnB0Vvs/how-to-write-insert-statement-for-table.html" title="How to write an insert statement for a table which has only single column and that column is auto incremented?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/12/how-to-write-insert-statement-for-table.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08HSHw9fSp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-3311022150942053588</id><published>2010-12-27T00:50:00.000-08:00</published><updated>2010-12-28T09:03:59.265-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:03:59.265-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Thumbnail creator" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Generate thumbnail image in asp.net</title><content type="html">Dear All,&lt;br /&gt;
Many times we require thumbnail image on the fly.&lt;br /&gt;
ASP.Net provides an easy way by which we can create thumbnail. I am showing basic steps by which we can create thumbnail.&lt;br /&gt;
Asp.net provides “System.Drawing.Image “namespace which having property “GetThumbnailImage” by which we can get Thumbnail image.&lt;br /&gt;
It’s a simplest way to get a thumbnail.&lt;br /&gt;
Below is the code written in VB.NET by which we upload an image, save image &amp; create thumbnail and save thumbnail with thumbnail prefix.&lt;br /&gt;
&lt;br /&gt;
Protected Sub Unnamed1_Click(ByVal sender As Object, ByVal e As EventArgs)&lt;br /&gt;
Try&lt;br /&gt;
If Me.FileUpload1.FileName.Trim &lt;&gt; String.Empty AndAlso Me.FileUpload1.FileContent.Length &gt; 0 Then&lt;br /&gt;
Dim strUploadPath As String = Server.MapPath("images")&lt;br /&gt;
Dim strFileName As String = Me.FileUpload1.FileName&lt;br /&gt;
FileUpload1.SaveAs(strUploadPath &amp; "\" &amp; strFileName)&lt;br /&gt;
Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(strUploadPath &amp; "\" &amp; strFileName)&lt;br /&gt;
Dim thumbNail As System.Drawing.Image = img1.GetThumbnailImage(100, 100, Nothing, IntPtr.Zero)&lt;br /&gt;
thumbNail.Save(strUploadPath &amp; "\thubmnail_" &amp; strFileName)&lt;br /&gt;
Me.imgActual.ImageUrl = "~/images/" &amp; strFileName&lt;br /&gt;
Me.imgThumb.ImageUrl = "~/images/" &amp; "thubmnail_" &amp; strFileName&lt;br /&gt;
End If&lt;br /&gt;
Catch ex As Exception&lt;br /&gt;
&lt;br /&gt;
End Try&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/__qErnTvFiSE/TRhTM8hk1NI/AAAAAAAAAFI/B7G5Tj0h4Ek/s1600/ThumbNail.png" imageanchor="1" style="clear:left; float:left;margin-right:1em; margin-bottom:1em"&gt;&lt;img border="0" height="251" width="320" src="http://2.bp.blogspot.com/__qErnTvFiSE/TRhTM8hk1NI/AAAAAAAAAFI/B7G5Tj0h4Ek/s320/ThumbNail.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enjoy programming. &lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-3311022150942053588?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oSJuP42F_G-cKNAt-C6R_EKwfxQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oSJuP42F_G-cKNAt-C6R_EKwfxQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oSJuP42F_G-cKNAt-C6R_EKwfxQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oSJuP42F_G-cKNAt-C6R_EKwfxQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/uTwfnHOcD6c" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/3311022150942053588?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/3311022150942053588?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/uTwfnHOcD6c/generate-thumbnail-image-in-aspnet.html" title="Generate thumbnail image in asp.net" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/__qErnTvFiSE/TRhTM8hk1NI/AAAAAAAAAFI/B7G5Tj0h4Ek/s72-c/ThumbNail.png" height="72" width="72" /><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/12/generate-thumbnail-image-in-aspnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYzcCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-8874238493469296080</id><published>2010-12-25T11:44:00.000-08:00</published><updated>2010-12-28T09:04:09.888-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.888-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="WPF" /><category scheme="http://www.blogger.com/atom/ns#" term="SilverLight" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Project List" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Project List On which i have to work</title><content type="html">&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0307590615&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;Dear Friends,&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt; Merry Christmas!&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
I Hope you are enjoying  the holidays.&lt;br /&gt;
&lt;br /&gt;
 After seeing the market trend and requirements I am interested in making following projects which will help me and other friends to understand basic project development and use latest technologies with some productive output.&lt;br /&gt;
&lt;br /&gt;
 In coming up sessions i am going to use this project topic and create sample with latest technologies like Silverlight, Windows phone 7, VS 2010 etc.&lt;br /&gt;
&lt;br /&gt;
 So here we go&lt;br /&gt;
&lt;br /&gt;
 1) &lt;b&gt;College Management&lt;br /&gt;
&lt;br /&gt;
 2) School Management &lt;br /&gt;
&lt;br /&gt;
3) Job Portal&lt;br /&gt;
&lt;br /&gt;
 4) Forums &lt;br /&gt;
&lt;br /&gt;
5) Blog&lt;br /&gt;
&lt;br /&gt;
6) Employee Management &lt;br /&gt;
&lt;br /&gt;
7) Bug Tracker &lt;br /&gt;
&lt;br /&gt;
8) Time Sheet &lt;br /&gt;
&lt;br /&gt;
9) Address Book &lt;br /&gt;
&lt;br /&gt;
10) Project Management &lt;br /&gt;
&lt;br /&gt;
11) Survey engine&lt;br /&gt;
&lt;br /&gt;
 12) Stock Manager &lt;br /&gt;
&lt;br /&gt;
13) Property Broker &lt;br /&gt;
&lt;br /&gt;
14) Shop Management &lt;br /&gt;
&lt;br /&gt;
15) Matrimonial&lt;br /&gt;
&lt;br /&gt;
 16) Social Networking &lt;br /&gt;
&lt;br /&gt;
17) Hotel Management&lt;br /&gt;
&lt;br /&gt;
 18) Inventory Management &lt;br /&gt;
&lt;br /&gt;
19) Accounting &lt;br /&gt;
&lt;br /&gt;
20) Transport Management &lt;br /&gt;
&lt;br /&gt;
21) Hospital Management &lt;br /&gt;
&lt;br /&gt;
22) Ecommerce &lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;Etc are the project list on which I will work in future to enhance my knowledge with productive work. &lt;br /&gt;
&lt;br /&gt;
I will share code base and case study also in future&lt;br /&gt;
&lt;br /&gt;
Hope you like it Once again wish you Merry Christmas.&lt;br /&gt;
&lt;br /&gt;
 Thanks&lt;br /&gt;
&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-8874238493469296080?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TfLyPoO5jDGd0AZ6aDdolVrIZNQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TfLyPoO5jDGd0AZ6aDdolVrIZNQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TfLyPoO5jDGd0AZ6aDdolVrIZNQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TfLyPoO5jDGd0AZ6aDdolVrIZNQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/JMER3P8s_TQ" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/8874238493469296080?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/8874238493469296080?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/JMER3P8s_TQ/project-list-on-which-i-have-to-work.html" title="Project List On which i have to work" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/12/project-list-on-which-i-have-to-work.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08HSHw9cCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-7594180310754015732</id><published>2010-12-03T05:25:00.000-08:00</published><updated>2010-12-28T09:03:59.268-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:03:59.268-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Database Design" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Best Practices in  database design  (SQL Server)</title><content type="html">Hello friends,&lt;br /&gt;
Designing database is one of the most interesting works but on the same time it should be proper because it is base of any business application. We should follow Microsoft best practices while designing the database. Here I am with a simple database design (Address book) concept. I will try to put my best to use Microsoft best practices while designing database. I know you are thinking Address book is so much easy to design, so my answer is yes you are right you can design database easily but using Microsoft best practices it bit more important and I am trying for those best practices.&lt;br /&gt;
So first best practice is &lt;br /&gt;
&lt;b&gt;1)Define proper  data type :-&lt;br /&gt;
&lt;/b&gt;Most of the time we design database but we ignore proper database but it should not because when you talking for very large scale database application (VLSDB)  then wrong data type will give you space problem. According to best practices choose smallest data type first (if it fit in your requirement).We understand this by an example suppose you designed a table with name “seed Data” in which column with name lngId having data type float and float consume 8 bytes and if the seed data cannot exceed more than 10 rows then we should use Tinyint data type instead of float data type because tinyint consume only 1 byte.&lt;br /&gt;
&lt;b&gt;2)Define proper Primary &amp; Foreign key:-&lt;br /&gt;
&lt;/b&gt;According to best practices we should make database normalized and for normalized database we should create proper Primary &amp; Foreign keys. By creating proper primary &amp; foreign keys we get two advantage 1) data anomalies chances reduce we get fast response as well after defining primary key (because cluster index created on primary key) &lt;br /&gt;
&lt;b&gt;3)Define proper constraints :-&lt;br /&gt;
&lt;/b&gt;Microsoft best practices also suggest defining proper constraints for column like not null, unique key constraint on columns so that data anomalies will reduce and we get proper data.&lt;br /&gt;
&lt;b&gt;4)Define partition :-&lt;br /&gt;
&lt;/b&gt;If your database is going to be very large then define proper partition both horizontally &amp; vertically. &lt;br /&gt;
&lt;b&gt;5)Normalization: -&lt;/b&gt; Database should be proper normalized.&lt;br /&gt;
In our Address Book database example we have categorized the data table in 3 categories  &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1)Lookup table having prefix “lku”&lt;br /&gt;
&lt;/b&gt;The lookup table is mainly for seed value or we can say this table contains all the data which just act like pre pop data. We have following tables for our Address book&lt;br /&gt;
lkuCountryMaster,lkuStateMaster,lkuCityMaster,lkuPhoneType,lkuAddressType,lkuPrefixMaster,lkuURLType,lkuDesignationType,lkuRelationShipType&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2)Link table having prefix “lnk”&lt;br /&gt;
&lt;/b&gt;By the name it is clear that its main purpose is making relation between main data record and other data. We have used following tables lnkPhoneToPerson,lnkAddressToPerson,lnkAddressToCompany,lnkURLToPerson,lnkPersonToCompany,lnkPersonRelations,lnkPhoneToCompany&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3)Main table which start with prefix “tbl”&lt;br /&gt;
&lt;/b&gt;The main table indicates by “tbl” in our Address book database we have used following tables tblPerson, tblAddresses, tblPhotos and tblCompany.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the entire lookup table we have preferred tiny int &amp; Small int data type because we know the value in look up table could not go beyond the tiny int &amp; small int max limit.&lt;br /&gt;
In similar way we have applied all the not null constraint to require field provide proper data type.&lt;br /&gt;
Please see fig below.&lt;br /&gt;
&lt;br /&gt;
For more detail you can download script for Address book.&lt;br /&gt;
&lt;br /&gt;
Thanks &amp; Esteemed Regards&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-7594180310754015732?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kJecucoAa7cRHcsAk2QuHDoBQ2M/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kJecucoAa7cRHcsAk2QuHDoBQ2M/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kJecucoAa7cRHcsAk2QuHDoBQ2M/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kJecucoAa7cRHcsAk2QuHDoBQ2M/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/FPp4ueivOjE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7594180310754015732?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/7594180310754015732?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/FPp4ueivOjE/best-practices-in-database-design-sql.html" title="Best Practices in  database design  (SQL Server)" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/12/best-practices-in-database-design-sql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYyeCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-3333804904314302754</id><published>2010-11-14T09:18:00.000-08:00</published><updated>2010-12-28T09:04:09.890-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.890-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="PHP Code Generator" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>PHP Code Generator Using  Dotnet</title><content type="html">Hello Friend,&lt;br /&gt;
if you are new to PHP and expert in ASP.NET the don't worry just download the &lt;b&gt;PHP Code Generator&lt;/b&gt;.&lt;br /&gt;
And enjoy the PHP to.&lt;br /&gt;
&lt;br /&gt;
Please download the code from &lt;a href="http://cid-1eda2012469ff8ad.office.live.com/self.aspx/.Public/Rajat%5E_INDIANDOTNET%5E_phpCodeGenerator.zip"&gt;PHP Code Generator &lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For more detail visit &lt;a href="http://www.indiandotnet.wordpress.com"&gt;Indiandotnet.wordpress.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Thanks &amp; Esteemed Regards&lt;br /&gt;
Rajat Jaiswal&lt;/b&gt;&lt;br /&gt;
&lt;a target="_blank"  href="http://www.amazon.com/Practical-Code-Generation-NET-Addison-Wesley/dp/0321606787?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Practical Code Generation in .NET: Covering Visual Studio 2005, 2008, and 2010 (Addison-Wesley Microsoft Technology Series)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=0321606787" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-3333804904314302754?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NenrZ3bwlzwe5aMpdjp5RY_CmE0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NenrZ3bwlzwe5aMpdjp5RY_CmE0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NenrZ3bwlzwe5aMpdjp5RY_CmE0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NenrZ3bwlzwe5aMpdjp5RY_CmE0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/ltHtuEQA4SQ" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/3333804904314302754?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/3333804904314302754?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/ltHtuEQA4SQ/php-code-generator-using-dotnet.html" title="PHP Code Generator Using  Dotnet" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/11/php-code-generator-using-dotnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYyeip7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-5658882246004796944</id><published>2010-10-13T22:31:00.000-07:00</published><updated>2010-12-28T09:04:09.892-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.892-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Security" /><category scheme="http://www.blogger.com/atom/ns#" term="SQL Injections" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Hacking" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Hack SQL Injection with prevention (Secure your web site )</title><content type="html">Dear All,&lt;br /&gt;
I am always curios about hacking not in destructive manner but how to prevent my sites from hacking.&lt;br /&gt;
So one of the thing which I want to share with you is “SQL Injection “. SQL Injection is a unique way by which you can play with database of the site.&lt;br /&gt;
Firstly I give you a brief introduction about SQL injection and then I will provide you information how to prevent your site by SQL injection.&lt;br /&gt;
So SQL injections are just like SQL statements or we can say combination of SQL statements which can be used as destructive manner by hackers.&lt;br /&gt;
And you cannot believe how SQL Server is powerful. With the help of” xp_cmdShell “command then end user (hacker) can crash your server too. With the help of “xp_cmdShell” you can do many things like delete file, delete dir, shutdown even format too.&lt;br /&gt;
So first let me show you basic example&lt;br /&gt;
Suppose you have login screen&lt;br /&gt;
&lt;br /&gt;
on which you have done following code to validate user on&lt;br /&gt;
protected void btnLogin_Click(object sender, EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
String connectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;&lt;br /&gt;
SqlConnection sqlcon = new SqlConnection(connectionString);&lt;br /&gt;
SqlCommand sqlcmd = new SqlCommand();&lt;br /&gt;
sqlcmd.CommandText = “SELECT * FROM tblUser WHERE strUserName =’” + txtUserName.Text + “‘ AND strPassword =’” + txtPassword.Text + “‘”;&lt;br /&gt;
sqlcmd.CommandType = CommandType.Text;&lt;br /&gt;
sqlcmd.Connection = sqlcon;&lt;br /&gt;
SqlDataAdapter sda = new SqlDataAdapter();&lt;br /&gt;
sda.SelectCommand = sqlcmd;&lt;br /&gt;
DataSet ds = new DataSet();&lt;br /&gt;
sda.Fill(ds);&lt;br /&gt;
if (ds.Tables[0].Rows.Count &gt; 0)&lt;br /&gt;
{&lt;br /&gt;
Response.Write(“Valid user”);&lt;br /&gt;
}else{&lt;br /&gt;
Response.Write(“Invalid user”);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Now if you see here we have directly used txtUserName, and txtPassword value here.&lt;br /&gt;
&lt;br /&gt;
Now if end user enters following value as shown your screen.&lt;br /&gt;
&lt;br /&gt;
Now put break point on your sqlcommand statement and see what value going on.&lt;br /&gt;
You will find following SQL command.&lt;br /&gt;
SELECT * FROM tblUser WHERE strUserName =’Rajat’ OR ‘1’ =’1’ AND password =’test’ OR ‘1’ =’1’&lt;br /&gt;
Now when you run this command in your SQL Browser you will be surprised that it returns all the Records. So this is power of SQL injection with just “OR “statement.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now if you have aware of SQL Server than you understand “;” (semicolon) &amp; — (dash dash) means.&lt;br /&gt;
“;” semicolon means current statement is completed and — (dash dash) means comment.&lt;br /&gt;
So suppose, if I enter semicolon combination with update command on my username password screen then what happen&lt;br /&gt;
SELECT * FROM tblUser WHERE strUserName =’RAJAT’ OR ‘1’=’1’ ; update tblUser set password =’’; –&lt;br /&gt;
&lt;br /&gt;
Other than this a hacker can user various combination like this.&lt;br /&gt;
&lt;br /&gt;
Now question came in your mind how to prevent this.&lt;br /&gt;
So here are the basic things by which you can prevent your site by SQL injections&lt;br /&gt;
1) Apply check for special character on login form textbox&lt;br /&gt;
2) Use storedprocedures&lt;br /&gt;
3) Use encrypted password&lt;br /&gt;
I hope you will be more secure programmer now so enjoy secure sites.&lt;br /&gt;
&lt;br /&gt;
In future i will provide you how a hacker can hack your site and how can you prevent your site.&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=B000JQU1VS&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;br /&gt;
Thanks&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-5658882246004796944?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/epieDW9bS6FxOg0E0oWBfsu7IJA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/epieDW9bS6FxOg0E0oWBfsu7IJA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/epieDW9bS6FxOg0E0oWBfsu7IJA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/epieDW9bS6FxOg0E0oWBfsu7IJA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/AjP9yADqw6s" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5658882246004796944?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5658882246004796944?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/AjP9yADqw6s/hack-sql-injection-with-prevention.html" title="Hack SQL Injection with prevention (Secure your web site )" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/10/hack-sql-injection-with-prevention.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYyfCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-2326829781566248968</id><published>2010-10-13T22:29:00.001-07:00</published><updated>2010-12-28T09:04:09.894-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.894-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedure Generator" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Stored Procedure Generator using vb.net</title><content type="html">Dear All,&lt;br /&gt;
I hope you have great time.   Sometimes it happens that you have lot of work load and you have to deliver within time limits on the same time you have to make your coding consistency.  If I think about me then I can say I am not going to compromise at least my coding style while the work load is high. So I just got idea to write some useful programs or tools which help me in finishing work as fast as possible.&lt;br /&gt;
So I created different utilities which generate following things&lt;br /&gt;
1) SQL Server Stored Procedure Generator&lt;br /&gt;
2) Dot net Code Generator  (Three tire architecture using typed Dataset)&lt;br /&gt;
3) Dot net Code Generator ( Three tire architecture  using Entity class)&lt;br /&gt;
4) PHP   Code generator &lt;br /&gt;
&lt;br /&gt;
In future I am interested in WCF &amp; WPF &amp; Silverlight code generator according to my coding style.&lt;br /&gt;
In this post I am giving SQL server Stored Procedure Code. It is basically a web application and you have to setup this web application and it will work as per your need.&lt;br /&gt;
Here is some screenshots take a look&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can download code from&lt;br /&gt;
&lt;br /&gt;
http://cid-1eda2012469ff8ad.office.live.com/browse.aspx/.Public/StoredProcedureCodeGenerator&lt;br /&gt;
&lt;br /&gt;
In Next   post I will share dot net code generator till than b bye.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Rajat Jaiswal&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-2326829781566248968?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3jiWUGuck_Rn2C1CdzYpEV_zdOI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3jiWUGuck_Rn2C1CdzYpEV_zdOI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3jiWUGuck_Rn2C1CdzYpEV_zdOI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3jiWUGuck_Rn2C1CdzYpEV_zdOI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/eyXLuvBi4mE" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2326829781566248968?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2326829781566248968?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/eyXLuvBi4mE/stored-procedure-generator-using-vbnet.html" title="Stored Procedure Generator using vb.net" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/10/stored-procedure-generator-using-vbnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYyfip7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-4818503147958931929</id><published>2010-10-13T22:28:00.001-07:00</published><updated>2010-12-28T09:04:09.896-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.896-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Code Generator" /><category scheme="http://www.blogger.com/atom/ns#" term="VB.Net" /><category scheme="http://www.blogger.com/atom/ns#" term="SQLServer" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Three tire code Generator using VB.NET</title><content type="html">Hello Friends,&lt;br /&gt;
Today I am sharing vb.net code generator.  Its   interface is simple same as our stored procedure code generator. (**Important   I am using Microsoft Application block for Data Access Layer**)&lt;br /&gt;
You need to give user credential as shown in below fig.&lt;br /&gt;
&lt;br /&gt;
Once the credential is successful you will get below screen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just select the table for which you want to generate code.    Now if you want dataset as entity then just check the use dataset checkbox.&lt;br /&gt;
Then press Generate button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will   generate y our windows form, Business manager class, Data Access layer class.&lt;br /&gt;
Just copy and paste in your project it will work fine with some minor changes.&lt;br /&gt;
You can download the code from below link&lt;br /&gt;
Download code&lt;br /&gt;
Enjoy coding!!&lt;br /&gt;
Thanks &amp; Regards&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;iframe src="http://rcm.amazon.com/e/cm?t=indiandotnet-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=B0021L8V1Q&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr" style="align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;"align="left" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-4818503147958931929?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aoG5xBuE6Yyr7vsnr3hruQPPmRU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aoG5xBuE6Yyr7vsnr3hruQPPmRU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aoG5xBuE6Yyr7vsnr3hruQPPmRU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aoG5xBuE6Yyr7vsnr3hruQPPmRU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/sbR_ta8XRjo" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4818503147958931929?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/4818503147958931929?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/sbR_ta8XRjo/three-tire-code-generator-using-vbnet.html" title="Three tire code Generator using VB.NET" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/10/three-tire-code-generator-using-vbnet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHYycCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-5094270935158391908</id><published>2010-09-14T10:59:00.000-07:00</published><updated>2010-12-28T09:04:09.898-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.898-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="localization" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Asp.net website in hindi or other native language with simple steps</title><content type="html">Dear all,&lt;br /&gt;
For Indian its great news that you can now create web site in your native language like Hindi, Marathi, Punjabi, Urdu, Tamil etc.&lt;br /&gt;
Kudos to Microsoft for introducing “Microsoft Indic Language” with help of this we can easily create web site in any language without doing much efforts.&lt;br /&gt;
So here we go  with the sample  and things to remember with simple step&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 1:- Add following line in your html page&lt;br /&gt;
&lt; 

input type=”hidden” id=”MicrosoftILITWebEmbedInfo” attachMode=”optout” value=”"

/&gt;&lt;br /&gt;
&lt;script type=”text/javascript” src=”http://ilit.microsoft.com/bookmarklet/script/hindi.js” defer=”defer”&gt;&lt;/script&gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
Remember here:  I am using hindi here that’s why i used hindi.js you can use your own choice.&lt;br /&gt;
Step 2:- Add new attribute with each input control which is “MicrosoftILITWebAttach” as shown in below.&lt;br /&gt;
&lt;    asp:TextBox ID=”txtPost” runat=”server” MicrosoftILITWebAttach=”true”             &gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
&lt;br /&gt;
Step 3:- If you want to store this value in database the just remember all the field which contain string data type should be “NVARCHAR”&lt;br /&gt;
Otherwise your searching will not work and all the data will be change to question mark instead of actual data.&lt;br /&gt;
&lt;br /&gt;
Step 4:- for searching in database hindi text or text which you insert you have to use following syntax&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM tblPost where postName =N’प्रोफेसर’&lt;br /&gt;
So Enjoy&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Rajat&lt;br /&gt;
&lt;a target="_blank"  href="http://www.amazon.com/Story-Four-Disc-Blu-ray-Combo-Digital/dp/B003XKPPOU?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Toy Story 3 (Four-Disc Blu-ray/DVD Combo + Digital Copy)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B003XKPPOU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-5094270935158391908?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/JvEE9y05Qm4TegUkSaAzVkJAvsE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JvEE9y05Qm4TegUkSaAzVkJAvsE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/JvEE9y05Qm4TegUkSaAzVkJAvsE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/JvEE9y05Qm4TegUkSaAzVkJAvsE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/ELMekMebPMA" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5094270935158391908?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/5094270935158391908?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/ELMekMebPMA/aspnet-website-in-hindi-or-other-native.html" title="Asp.net website in hindi or other native language with simple steps" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/09/aspnet-website-in-hindi-or-other-native.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHc7eCp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-2799913026573298200</id><published>2010-09-14T10:56:00.000-07:00</published><updated>2010-12-28T09:04:09.900-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.900-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Log Shipping" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>How to resolve Log Shipping Error “Exclusive access could not be obtained because the database is in use.RESTORE LOG is terminating abnormally”?</title><content type="html">Hello Friends,&lt;br /&gt;
This error normally came when you did log shipping on your database and  your secondary server database in stand by  mode.&lt;br /&gt;
In this error your secondary server database restore job will not work. To resolve this error you just need to change the log shipping setting.&lt;br /&gt;
When you configure secondary server database mode   there is check box which says disconnect all collection at the time of restore database so just check that check box and you will find your log shipping is working.&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
Rajat&lt;br /&gt;
&lt;br /&gt;
Leave a Comment &lt;br /&gt;
How to shrink Log File when Log shipping is implemented on database ?&lt;br /&gt;
Filed under: Sql server — indiandotnet @ 7:29 pm &lt;br /&gt;
Tags: Log Shipping, Rajat, Sql server&lt;br /&gt;
&lt;br /&gt;
To shrink Log file you have to run following command.&lt;br /&gt;
DBCC SHRINKFILE (  ‘Database_log’ , NOTRUNCATE)&lt;br /&gt;
So here we used  NOTRUNCATE option because in log shipping  transaction log  sequence important if  you run the normal  Shrink file or with truncate file option then log shipping will be failed.&lt;br /&gt;
So run Shrink File with NOTRUNCATE option. Although many DBA &amp; Sql Server experts   gave suggestion to avoid shrink Log file.&lt;br /&gt;
But we can do shrink file in log shipping with NOTRUNCATE option if database Log size too much large and you have space issue.&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
Rajat&lt;br /&gt;
&lt;a target="_blank"  href="http://www.amazon.com/Story-Four-Disc-Blu-ray-Combo-Digital/dp/B003XKPPOU?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Toy Story 3 (Four-Disc Blu-ray/DVD Combo + Digital Copy)&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B003XKPPOU" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-2799913026573298200?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5sZc25fwQpwfsSvEHxoVNZD-8xU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5sZc25fwQpwfsSvEHxoVNZD-8xU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5sZc25fwQpwfsSvEHxoVNZD-8xU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5sZc25fwQpwfsSvEHxoVNZD-8xU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/ecBSVWjUrYg" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2799913026573298200?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/2799913026573298200?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/ecBSVWjUrYg/how-to-resolve-log-shipping-error.html" title="How to resolve Log Shipping Error “Exclusive access could not be obtained because the database is in use.RESTORE LOG is terminating abnormally”?" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/09/how-to-resolve-log-shipping-error.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHc7eip7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-8624950730736101050</id><published>2010-09-14T10:54:00.000-07:00</published><updated>2010-12-28T09:04:09.902-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.902-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SSIS" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="ETL" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Learn Simple SQL Server Integration Service example database to text file transformation in 5 minutes</title><content type="html">Dear Friends,&lt;br /&gt;
Today we are going to create simple SSIS task which we will create a text file output using ETL (Extract Transform Loading) of SSIS.&lt;br /&gt;
For this first basic this which we need to know&lt;br /&gt;
1) Source Database&lt;br /&gt;
2) Output file name &amp; path&lt;br /&gt;
&lt;br /&gt;
Step 1:- Open SQL Server Business Intelligence Development Studio (BIDS) and create a new Integration project as shown in below fig.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2:- Now drag and drop Data Flow Task from control flow item’s toolbar as shown in below fig.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step3:- Once you done with this just double click on Data flow task and you will get a new screen for data flow. Now we have to choose data source for our ETL process for this just drag drop data source from data flow source tool bar.&lt;br /&gt;
Step 4:- configure source database. In this example we are using OLEDB data source and SQL server Database. You can choose other database source too.  To configure OLEDB data source just right click the OLEDB data source and click on Edit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will get OLEDB Source Editor as shown in fig.&lt;br /&gt;
Just click on new button as highlighted in above fig set database. Once database source is done we can choose any data mode like table or view, SQL Command as shown in fig.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I am choosing table employees of North wind database here.  After doing this just choose desire column which you want to export in file. You can choose this column by selecting columns option.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 5:- Now Drag drop destination control as we require flat file destination and configure it. We can configure destination same as we did for data source. Just right click on flat file destination control and edit it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step6: – Once you done with configuration of file click on mapping and map the columns. As shown in below fig.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 7:- Now all set just run using”F5” &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If everything is green then our SSIS package is done successfully.&lt;br /&gt;
In next session we will learn how to deploy it, how to use configuration for it.&lt;br /&gt;
Till than enjoy SSIS.&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
Rajat Jaiswal&lt;br /&gt;
&lt;a target="_blank"  href="http://www.amazon.com/Triple-Exposure-ebook/dp/B002FDLNVK?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Triple Exposure&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B002FDLNVK" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-8624950730736101050?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/TKGPL96i3oPGcndyBFUi0NRdPgs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TKGPL96i3oPGcndyBFUi0NRdPgs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/TKGPL96i3oPGcndyBFUi0NRdPgs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/TKGPL96i3oPGcndyBFUi0NRdPgs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/9mgNJEd3C8Q" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/8624950730736101050?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/8624950730736101050?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/9mgNJEd3C8Q/learn-simple-sql-server-integration.html" title="Learn Simple SQL Server Integration Service example database to text file transformation in 5 minutes" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/09/learn-simple-sql-server-integration.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08ASHc7eyp7ImA9Wx9QFUg.&quot;"><id>tag:blogger.com,1999:blog-32616583.post-701150239694448600</id><published>2010-09-14T10:53:00.000-07:00</published><updated>2010-12-28T09:04:09.903-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-28T09:04:09.903-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Replication" /><category scheme="http://www.blogger.com/atom/ns#" term="Sql server" /><category scheme="http://www.blogger.com/atom/ns#" term="RAJAT JAISWAL" /><category scheme="http://www.blogger.com/atom/ns#" term="Disaster Recovery" /><category scheme="http://www.blogger.com/atom/ns#" term="Rajat" /><title>Replication – A way of disaster management</title><content type="html">What is Replication?&lt;br /&gt;
&lt;br /&gt;
     Replication is another way of disaster recovery with the help of this we can recover our database and we do not need to do much manual efforts.&lt;br /&gt;
&lt;br /&gt;
Replication is the way by which you can transfer data or database object from one server to another server, synchronize them, and maintain them identical.&lt;br /&gt;
&lt;br /&gt;
The interesting part is you can implement replication for any location like LAN, WAN, Internet without much effort.&lt;br /&gt;
&lt;br /&gt;
What is the initial requirement for Replication?&lt;br /&gt;
&lt;br /&gt;
 The replication can work on SQL server 2000 2005, 2008.&lt;br /&gt;
&lt;br /&gt;
What are the good points of Replication?&lt;br /&gt;
&lt;br /&gt;
  There are many advantage of replication&lt;br /&gt;
&lt;br /&gt;
•High availability solution &lt;br /&gt;
◦Minimum error&lt;br /&gt;
◦Easy to implement&lt;br /&gt;
 What are the points which we would not like for replication?&lt;br /&gt;
&lt;br /&gt;
•Main server overhead increase&lt;br /&gt;
•If there is failover  occurs then  we have to handle that manually&lt;br /&gt;
 What are the terminologies we used in Replication?&lt;br /&gt;
&lt;br /&gt;
We used following terminologies in replication&lt;br /&gt;
&lt;br /&gt;
1)   Publisher:-&lt;br /&gt;
&lt;br /&gt;
The publisher is main database source which publish data or other data object to different server or we can say subscriber.&lt;br /&gt;
&lt;br /&gt;
2)    Subscriber :-&lt;br /&gt;
&lt;br /&gt;
The Subscriber by name it is clear that it subscribe the database from publisher server.&lt;br /&gt;
&lt;br /&gt;
 3)   Distributor :-&lt;br /&gt;
&lt;br /&gt;
The distribution is the server which manages flow of the data. It not mandatory to have distributor always.  A publisher sever can manage role of both (publisher &amp; distributor).&lt;br /&gt;
&lt;br /&gt;
4)   Article:-&lt;br /&gt;
&lt;br /&gt;
An article can be any data object like data table, Rows, Store procedure or view. A publisher can be published number of article.&lt;br /&gt;
&lt;br /&gt;
What are the different types of Replication?&lt;br /&gt;
&lt;br /&gt;
 We can implement 3 type of replication&lt;br /&gt;
&lt;br /&gt;
Snapshot Replication, Transactional Replication, Merge Replication.&lt;br /&gt;
&lt;br /&gt;
Snapshot Replication:-&lt;br /&gt;
&lt;br /&gt;
      By the name it is clear that in this publisher take snap shot of entire database and publish to the subscriber.   And when its take full snap shot obviously it taking it consumes more resource. Or we can say its resource intensive process.  It also known as simple replication. It used where database changes are rarely.&lt;br /&gt;
&lt;br /&gt;
Transactional Replication:  It also known as dynamic replication.&lt;br /&gt;
&lt;br /&gt;
In this the publisher and subscriber are always synchronized. It used where we need exact same copy on subscriber with immediate effect. It can be useful when subset of database or table is required.&lt;br /&gt;
&lt;br /&gt;
Merge Replication:- &lt;br /&gt;
&lt;br /&gt;
   It’s very interesting replication by the name it’s clear that it use merge method. In this both publisher and subscriber has freedom to work without network and when they connect the replication agents check both the database and merge each other’s changes. In merging if any conflict occurs than preference is given to publisher.&lt;br /&gt;
&lt;br /&gt;
Later on in the post we will get a brief  introduction how to implement  replication tillthan enjoy definition  .&lt;br /&gt;
&lt;br /&gt;
 Thanks &amp; Regards&lt;br /&gt;
&lt;br /&gt;
Rajat&lt;br /&gt;
&lt;a target="_blank"  href="http://www.amazon.com/Triple-Exposure-ebook/dp/B002FDLNVK?ie=UTF8&amp;tag=indiandotnet-20&amp;link_code=btl&amp;camp=213689&amp;creative=392969"&gt;Triple Exposure&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=indiandotnet-20&amp;l=btl&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=B002FDLNVK" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important; padding: 0px !important" /&gt;&lt;div class="blogger-post-footer"&gt;Be the best&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32616583-701150239694448600?l=rajatjaiswal.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-54qChhCNUzu5fi3LRaBj7fzkDY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-54qChhCNUzu5fi3LRaBj7fzkDY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-54qChhCNUzu5fi3LRaBj7fzkDY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-54qChhCNUzu5fi3LRaBj7fzkDY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/WebProgrammer/~4/UPsJtOVEZpk" height="1" width="1"/&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/701150239694448600?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/32616583/posts/default/701150239694448600?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/WebProgrammer/~3/UPsJtOVEZpk/replication-way-of-disaster-management.html" title="Replication – A way of disaster management" /><author><name>Rajat Jaiswal</name><uri>http://www.blogger.com/profile/10272758489608834274</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="24" src="http://1.bp.blogspot.com/__qErnTvFiSE/TI7oFW_zk-I/AAAAAAAAAEQ/0MI430z50s4/S220/rajat1.jpg" /></author><feedburner:origLink>http://rajatjaiswal.blogspot.com/2010/09/replication-way-of-disaster-management.html</feedburner:origLink></entry></feed>

