Monday, 10 December 2012

Who is Hacker

What is an Ethical Hacker





Ethical Hacker uses his skills to fight a perceived ethical battle against Cracker and Ethical hacker is a computer and network expert who attacks a security system on behalf of its owners, seeking vulnerabilities that a Cracker could exploit.

Hacker Vs Cracker



1. Hacker :- You Will be surprise to know that Hacker is a good person, as Hacker is someone who is able to manipulate the inner working of Computers,Information and Technology.
But because of media, name of Hacker is Spoiled
2. Cracker :-In security Community, a cracker is someone who breaks encryption and copy protection Schemes. They are mailicious programmers.

Similarity of both is that both are very smart people who have in depth-understanding of computer systems and can accurately analyse a difficulty to solve problem.

Friday, 7 December 2012

MS-SQL - Create Job in Sql Server 2008




MS-SQL - Create Job in Sql Server 2008
In this article i will show you how to create a Job in Sql Server 2008.

Step 1
Download Northwind database from the following link.
http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en

Step 2
Attach a Northwind database into MS-SQL server.

Step 3
Expand the SQL Server Agent. You will see a Jobs folder over there. Right click on jobs and choose Add New. 



Step 4

Create a New Sql Server Agent Job.




New Job creation window shown above. Fill in the Name field with a unique name for your job. Specfy the account that you wish to be the owner of the job in the Owner text box. The job will run with the permissions of this account and may only be modified by the owner or sysadmin role members. 


Once you've specified a name and owner, choose one of the predefined job categories from the drop-down list. For example, you might choose the"Database Maintenance" category for routine maintenance jobs but for this example select only Uncategorized [local] only.


Finally, ensure that the Enabled box is checked.


Step 5

Enter the SQL Server Agent Job Steps Screen.




Next click on the ‘Steps’ pane on the left and you’ll be presented with this screen.  It’s blank because you haven’t created any steps yet.  So go ahead and click on the ‘New’ button at the bottom.


Step 6

Add SQL Server Agent Job Steps.



After Clicking  the New button to create a new job step and you will see the New Job Step window shown above.


Use the Step Name textbox to provide a descriptive name for the Step. 


Use the Database drop-down box to select the database that the job will act upon. 


Finally, use the Command textbox to provide the Transact-SQL syntax corresponding to the desired action for this job step. Once you have completed entering the command, click the Parse button to verify the syntax and then click on OK button.


In this job i am taking backup Northwind database to the disk.



       BACKUP DATABASE Northwind  
       TO DISK = 'd:\NorthwindBackUp.bak'  

Step 7

Create Schedule the SQL Server Agent Job.

To schedule your job, just click on ‘Schedules’ on the left and then choose the schedule that’s right for you then click on new button.

Step 8
Add Schedule the SQL Server Agent Job.



After Clicking  the New button to create a new job schedule and you will see the New Job Schedule window shown above.

Provide a name for the schedule in the Name text box and choose a schedule type (One-time, Recurring, Start when SQL Server Agent Starts or Start When CPUs Become Idle) from the drop-down box. Then use the frequency and duration sections of the window to specify the job's parameters. When you are finished click OK to close the Schedule window and OK to create the job.

Your job is ready now.

Step 9
For the testing purpose execute job first time. 


Right Click on the Job and click on Start job at Step and you will see the Start Jobs window will open. 

Tuesday, 4 December 2012

Reverse Printing


Reverse Printing

         
 
            // Reverse Printing


            Console.WriteLine("Enter some digits to get there reverse");
            int a = int.Parse(Console.ReadLine());

            for (; a != 0; a = a / 10)
            {

                Console.Write(a % 10);

            }
            Console.ReadLine();

Prime Numbers till user defined Number


Prime Numbers till user defined Number

            // Prime Numbers till user defined Number

            Console.WriteLine("Enter a number to print prime number till");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("2");

            for (int a = 3; a <= b; a++)
            {
                for (int i = 2; i <= a; i++)
                {

                    if (a % i == 0)
                    {
                        Console.Write("");
                        break;
                    }


                    if (i > a / 2)
                    {
                        Console.WriteLine(a);
                        break;
                    }

                }
            }

            Console.ReadLine();

Prime Numbers


Prime Numbers


            // Prime Numbers


            Console.WriteLine("Enter a number to check wheater is it Prime number or not");
            int a = int.Parse(Console.ReadLine());

            int i = 2;
            while (i <= a - 1)
            {

                if (a % i == 0)
                {
                    Console.WriteLine("It's a  not a Prime number");
                    break;
                }
                i++;
                if (a == i)
                {
                    Console.WriteLine("It's Prime number");
                }

            }
            Console.ReadLine();