Monday, April 29, 2013


Using Big Data to fight crime and predict what products consumers might purchase in the future

Below Web Link


Big Data

Project Euler Problem 1 C#

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
using System;

namespace Dela.Mono.Examples
{
   public class HelloWorld
   {
      public static void Main(string[] args)
      {
         int limit = 1000;
         int counter = 0;
         int sum = 0;
         while (counter < limit)
         {
            if (counter % 3 == 0 || counter % 5 == 0)
            {
               sum = sum + counter;
            }
            
           counter++;
         }
        
         Console.WriteLine("Enter the limit " + sum);
      }
   }
}
   

Monday, December 24, 2012

Establish policies and procedures for database management, security, and utilization


 

Establish policies and procedures for database management, security, and utilization 


                                Microsoft SQL Server Daily Maintenance Reports

 
  1) Monitoring of Space in server email alerts
  2)Monitoring of successful completion of jobs- failure email. 
  3)Monitoring successful completion of backups- failure email
  4) Weekly or Monthly rebuild of indices
  5)Weekly Running of Fragmentation Reports
  6)Daily Checking of Database Integrity- DBCC CHECKDB(‘MYDATABASE’)
  7)Making sure statistics are update-auto stats-set to true.
  8) Daily checking  of error logs
  9)Daily checking if Agent is up and running
  10)  Creating a master list of all servers
       List all jobs and time they run.
  11)  Jobs for clearing all old log files
  12) Monthly deletion of old backups which you may have stored
  13)  Monitoring if Transaction log, full and differential backups are going fine.

Vendor Selection Checklist



 20 points for Vendor Selection
1)                  What kind of SDLC was followed-Waterfall, Agile
Waterfall-bugged-big ideas upfront is not a good method
2)                  Is it native to to Oracle/sql Server/DB2
3)                  Is it Portable across different os/database platforms.
4)                  What kind of support can they give.
5)                  Do they have a Dba at their end ( Developers masquerading as DBAs)
  The dbas would have been contracted and left during development
6)                  What CASE/process modeling software do they use
7)                  Do they have in house architects/designers.
8)                  Give References of previous installations- List of their clients.
9)                  Feedback from them.
10)               Do they have a full fledged development center.
11)               How long have they been doing this?
12)               Do they have a support Forum?
13)               What is the biggest size of database they installed.
14)               Any problems they faced in their previous installations-clients.
15)               How many bugs did they fix in the last install.
16)               Can they customize to our requirements.
17)               How will they troubleshoot issues-application-will they need us to send database-how will they handle security.
18)               What version do they want to sell and when is the next release coming
19)               What is the difference between this version and next version
20)               Price.

Sunday, December 23, 2012

SQL Server Interview Questions


Typical SQL Server Interview Questions

  1. What stored procedure is used to change server configuration parameters?
Sp_configure
Displays or changes global configuration settings for the current server.
Launch SSMS
Open new Query Window
Type 

          exec sp_configure



  1. What stored procedure can be used to give you a listing of databases on a SQL Server?
                Sp_databases

Lists databases that either reside in an instance of the SQL Server 2005 Database Engine or are accessible through a database gateway.
Launch SSMS
Open new Query Window
Type
            exec sp_databases

   
  1. Describe the differences between SIMPLE and FULL recovery mode?
Simple- No log backups.  Automatically reclaims log space to keep space requirements small, essentially eliminating the need to manage the transaction log space.
Full Recovery model- Requires log backups. No work is lost due to a lost or damaged data file.  Can recover to an arbitrary point in time (for example, prior to application or user error)
  1. What are two native SQL Server tools that would aid in performance tuning?
               SQL Server Profiler and SQL Server tuning Advisor

  1. What are some things that could cause a database transaction log to fill up?
  1. Full, differential, or log backups have not occurred on the database in full recovery mode, causing the log to gradually fill up.
  2. An active backup is in process (backups are treated like transactions), which fill up a portion of the log while concurrent transactions fill up the remainder.
  3. An active transaction might be long running, such as an SPID that never issues a commit. Paused or high-performance with database mirroring can cause delays. The former causes transactions to not send, while the latter will only occur if the high-performance is significantly behind in sending its transactions to the mirror server.
  4. With transactional replication, if replication is behind or failing, the transaction log will not clear because transactions are not allowed to be flushed unless they are both committed and sent to the distribution database.
  5. If a database snapshot is in process, all transactions can pile in behind it while the snapshot is created.

  1. What utility would you use to change SQL Server to listen on a static port?
            SQL Server Configuration Manager

    

    1. Why would you cluster SQL Server?
You would cluster SQL Server to ensure that users running applications will have little or no downtime when a failure happens.
    1. Does 2008 support a single node cluster?
Yes
  1. Can 2008 and 2008R2 reside on the same Operating System?
                        Yes you can install 2008 and 2008R2 on the same Operating System.