Sunday, April 11, 2010

SQL Server Metadata

Many times when you need to troubleshoot an SQL Server issue, you will need to collect metadata about the server, databases, and server resources in general. Here we will briefly review the mechanisms to collect these metadata.

System Base Tables

SQL server maintains a set of tables that store information about all the objects, data types, constraints, configuration options, and resources available to SQL Server. These tables are called the system base tables.

  • Some of these tables exist in master database –> contain system-wide information.
  • Some exist in every database –> contain database specific information.

You can access these tables names only if you are logged in as a system administrator. You can access through:

  • Run sp_help
  • Run
    use master; 
    select name from sys.objects 
    where type_desc = 'SYSTEM_TABLE';




If you tried to select data from any of these system tables, you will got 208 error indicating that the object name is invalid. The only way to access these data is through dedicated administrator connection (DAC).



Keep in mind that these system base tables are used for internal purposes only within the database engine and are not intended for general use. They are subject to change and compatibility is not guaranteed.



Compatibility Views



Although it is possible to see data in the system tables in versions of SQL Server before 2005, it wasn’t recommended. For compatibility, SQL server 2005 and 2008 provided a set of compatibility views that allow access to a subset of the SQL server 2000 system tables. These views should be used for backward compatibility only; going forward, you should use catalog views.



Catalog Views



SQL Server 2005 introduced a set of catalog views as a general interface to the persisted system metadata. All the catalog views are in the sys schema, and you must reference the schema name when access the objects like:



select name from sys.databases;


For a complete list of catalog views categories, please consult http://msdn.microsoft.com/en-us/library/ms174365.aspx.



Information Schema Views



The information schema views comply with SQL-92 standard and all of it are in a schema called INFORMATION_SCHEMA. If you need to write a portable application that access the metadata you should use these views. This compliance come with the price of limited provided information (it provide the standard defined information only). If you need metadata about non-standard features, use catalog views.



For a complete list of Information schema views and its closest map to catalog views, please consult http://msdn.microsoft.com/en-us/library/ms186778.aspx



System Functions



Give us individual property values for many SQL Server instance, objects, databases. The values returned by system functions are scalar, so they can be used as values returned by SELECT statements like:



select DATABASEPROPERTYEX('msdb','Recovery');


For a complete list of system functions and its types, review http://msdn.microsoft.com/en-us/library/ms187786.aspx



System Stored Procedures



System Stored Procedures are the original metadata access tool but it had a drawback, basically you have to accept the data that it returns. Some of the procedures allow parameters but they are very limited. Catalog views are more enhanced and flexible in controlling what data appears.



I hope this brief post gives you an overall image about SQL Server metadata access mechanisms and which one to use according to your situation. 

SQL Server Dedicated Administrator Connection

Microsoft SQL Server provides a dedicated administrator connection (DAC) which allows an administrator to access a running instance of SQL Server Database Engine to troubleshoot problems on the server—even when the server is unresponsive to other client connections. The DAC is available through the sqlcmd utility and SQL Server Management Studio. The connection is only allowed from a client running on the server. No network connections are permitted.

To use SQL Server Management Studio with the DAC, connect to an instance of the SQL Server Database Engine with Query Editor by typing ADMIN: before the server name. Object Explorer cannot connect using the DAC.

To connect to a server using the DAC

  1. In SQL Server Management Studio, with no other DACs open, on the toolbar, click Database Engine Query.

  2. In the Connect to Database Engine dialog box, in the Server name box, type ADMIN: followed by the name of the server instance. For example, to connect to a server instance named ACCT\PAYABLE, type ADMIN:ACCT\PAYABLE.

  3. Complete the Authentication section, providing credentials for a member of the sysadmin group, and then click Connect.

    The connection is made.

    If the DAC is already in use, the connection will fail with an error indicating it cannot connect.

If you are trying to that and got the following error:

Dedicated administrator connections are not supported. (ObjectExplorer)

It means that you are trying to connect Object Explorer using the DAC. Object Explorer cannot connect using the DAC; only Query Window can. That means that you cannot press the New Query button; you have to use the Database Engine Query button.


Saturday, April 10, 2010

What is the SWEBOK Guide?

SWEBOK  SWEBOK or Software Engineering Body Of Knowledge is an all-inclusive term that describes the sum of knowledge within the profession of software engineering. Since it is usually not possible to put the full body of knowledge of even an emerging discipline, such as software engineering, into a single document, there is a need for a Guide to the Software Engineering Body of Knowledge. This Guide will seek to identify and describe that subset of the body of knowledge that is generally accepted.

SWEBOK Guide is developed by the IEEE Computer Society with leaders from industry and academia. It is ratified by ISO-IEC 24773 standard as the BOK for software engineering certifications internationally. The CSDA and CSDP are the first 2 certifications to conform to the ISO-IEC standard.

Here are the SWEBOK knowledge areas, its sub areas, and it’s references and suggested books.

1. Business Practices and Engineering Economics (3-4% questions in CSDP)

    1. Engineering Economics
    2. Ethics
    3. Professional Practice
    4. Standards

No book-length references are recommended for this topic.

The following books are suggested as supplemental reading in this area:

    • Morality and Machines: Perspectives on Computer Ethics, Edgar, S. L., Sudbury, Massachusetts: Jones and Bartlett, 1997. ISBN 0763717673
    • Computer Ethics, 2d Ed., Johnson, Deborah G, Upper Saddle River, NJ: Prentice-Hall, 1994. ISBN 0130836990
    • Smith and Roberson's Business Law, 11th ed., Mann, Richard A., & Barry S. Roberts, Cincinnati, OH: West Thomson Learning, 2000. ISBN 0324121849
    • Engineering Economy, Thusen, G.J., Prentice-Hall, 2000. ISBN 013028128X

 2. Software Requirements (13-15% questions in CSDP)

    1. Requirements Engineering Process
    2. Requirements Elicitation
    3. Requirements Analysis
    4. Software Requirements Specification
    5. Requirements Validation
    6. Requirements Management

Any one of the following books is recommended in this area:

    • Software Requirements: Objects, Functions, & States, Davis, Alan. Upper Saddle River, New Jersey: Prentice Hall, 1993. ISBN 013805763X
    • Practical Software Requirements: A Manual of Content and Style, Kovitz, Benjamin L., Manning Publications Company, 1998. ISBN 1884777597
    • Mastering the Requirements Process, Robertson, James and Suzanne Robertson, New York: Dorset House, 2000. ISBN 0201360462
    • Requirements Engineering: A Good Practice Guide, Sommerville, Ian, New York: John Wiley & Sons, 1997. ISBN 0471974447
    • Software Requirements, Wiegers, Karl. Microsoft Press, 1999. ISBN 0735606315

3. Software Design (22-24% questions in CSDP)

    1. Software Design Concepts
    2. Software Architecture
    3. Software Design Quality Analysis and Evaluation
    4. Software Design Notations and Documentation
    5. Software Design Strategies and Methods
    6. Human Factors in Software Design
    7. Software and System Safety

Any one of the following books is recommended in this area:

    • Software Architecture in Practice, Bass, Len, Paul Clements and Rick Kazman. Reading, Massachusetts: Addison-Wesley, 1998. ISBN 0201199300
    • Pattern Oriented Software Architecture: A System of Patterns, Buschmann, Frank, et al, John Wiley & Sons, 1996. ISBN 0471958697
    • Fundamentals of Object-Oriented Design in UML, Page-Jones, Meilir, Addison-Wesley, 1999. ISBN 0201699946X

The following books are suggested as supplemental reading in this area:

    • Fundamentals of Database Systems, Elmasri, Ramez and Shamkant Navathe, 3d Ed., Reading, Mass.: Addison Wesley, 2000. ISBN 0805317554
    • Software Reuse: Architecture, Process and Optimization for Business Success, Jacobsen, Ivar, Martin Griss, and Patrik Jonson, Reading, Massachusetts: Addison-Wesley, 1997. ISBN 0201924765

 4. Software Construction (10-12% questions in CSDP)

    1. Construction planning
    2. Code design
    3. Data design and management
    4. Error processing
    5. Source code organization
    6. Code documentation
    7. Construction QA
    8. System integration and deployment
    9. Code tuning
    10. Construction tools

The following book is recommended on this topic:

    • Code Complete, McConnell, Steve, Microsoft Press, 1993. ISBN 1-5561-5484-4

The following books are suggested as supplemental reading in this area:

    • The Practice of Programming, Kernighan, Brian W. and Rob Pike, Reading, Mass.: Addison Wesley, 1999. ISBN 020161586X
    • The Pragmatic Programmer: From Journeyman to Master, Hunt, Andrew, David Thomas, and Ward Cunningham, Reading, Mass.: Addison Wesley, 1999. ISBN020161622X

5. Software Testing (15-17% questions in CSDP)

    1. Types of Tests
    2. Test Levels
    3. Testing Strategies
    4. Test Design
    5. Test Coverage of Code
    6. Test Coverage of Specifications
    7. Test Execution
    8. Test Documentation
    9. Test Management

Any one of the following books is recommended in this area:

    • Testing Object-Oriented Systems, Binder, Robert V. Reading, Massachusetts: Addison-Wesley, 2000. ISBN 0201809389
    • Complete Guide to Software Testing, 2nd Ed., Hetzel, Bill, New York, New York: John Wiley & Son, 1993. ISBN 0471565679
    • Software Testing : A Craftsman's Approach, Jorgensen, Paul C. CRC Press, 1995. ISBN 0849308097
    • Testing Computer Software, 2nd Ed., Kaner, Clem, Jack Falk, and Hung Quoc Nguyen, New York, New York: John Wiley and Sons, 1999. ISBN 0471358460
    • Software Testing and Continuous Quality Improvement, Lewis, William. CRC Press 2000. ISBN 0849398339
    • The Craft of Software Testing: Subsystems Testing Including Object-Based and Object-Oriented Testing, Marick, Brian. Prentice Hall, 1997. ISBN 0131774115

6. Software Maintenance (3-5% questions in CSDP)

    1. Software Maintainability
    2. Software Maintenance Process
    3. Software Maintenance Measurement
    4. Software Maintenance Planning
    5. Software Maintenance Management
    6. Software Maintenance Documentation

The following book is recommended on this topic:

    • Practical Software Maintenance, Pigoski, Thomas M. New York, Wiley Computer Publishing, 1997. ISBN 0471170011

7. Software Configuration Management (3-4% questions in CSDP)

    1. Management of SCM Process
    2. Software Configuration Identification
    3. Software Configuration Control
    4. Software Configuration Status Accounting
    5. Software Configuration Auditing
    6. Software Release Management and Delivery
    • IEEE Standards 828-1990 and 1042-1987

8. Software Engineering Management (10-12% questions in CSDP)

    1. Measurement
    2. Organizational Management and Coordination
    3. Initiation and Scope Definition
    4. Planning
    5. Software Acquisition
    6. Enactment
    7. Risk Management
    8. Review and Evaluation
    9. Project Close Out
    10. Post-closure Activities

Any one of the following books is recommended in this area:

    • Principles of Software Engineering Management, Gilb, Tom, Reading, Mass.: Addison Wesley, 1988. ISBN 0-2011-9246-2
    • Rapid Development, McConnell, Steve, Microsoft Press, 1996. ISBN 1556159005
    • Software Engineering Project Management, 2d ed, Thayer, Richard H., IEEE Computer Society Press, Los Alamitos, CA 1997. ISBN 0-8186-8000-8
    • Quality Software Management, Vol. 1, Systems Thinking, Weinberg, Gerald M.. New York: Dorset House, 1992. ISBN 0932633226

The following book is suggested as supplemental reading in this area:

    • Developing Managerial Skills in Engineers and Scientists, Badawy, Michael K. Van Hostrand, NY, 1995. ISBN 0471286346

9. Software Engineering Process (2-4% questions in CSDP)

    1. Process Infrastructure
    2. Process Measurement
    3. Process Definition
    4. Qualitative Process Analysis
    5. Process Implementation and Change

Either of the following books is recommended in this area:

    • The Capability Maturity Model: Guidelines for Improving the Software Process, Paulk, Mark, et al (Carnegie Mellon University / Software Engineering Institute). Reading, Mass.: Addison Wesley, 1995. ISBN 0201546647
    • Managing the Software Process, Humphrey, Watts S. Reading, Massachusetts, Addison-Wesley, 1989. ISBN 0201180952

10. Software Engineering Tools and Methods (2-4% questions in CSDP)

    1. Management Tools and Methods
    2. Development Tools and Methods
    3. Maintenance Tools and Methods
    4. Support Tools and Methods

11. Software Quality (6-8% questions in CSDP)

    1. Software Quality Concepts
    2. Planning for SQA and V&V
    3. Methods for SQA and V&V
    4. Measurement Applied to SQA and V&V

No book-length references are recommended for this topic:

The following books are suggested as supplemental reading in this area:

    • Software Engineering, Dorfman, M. & Thayer, R., eds. Los Alamitos, California: IEEE Computer Society Press, 1997. ISBN 0-8186-7609-4
    • Software Inspection, Gilb, Tom., and Dorothy Graham, Reading, MA, Addison-Wesley, 1994. ISBN 0-2016-3181-4
    • Practical Guide to Software Quality Management, Horch, John, Artech House, 1996. ISBN 0890068658
    • A Discipline for Software Engineering, Humphrey, Watts S. Reading, Massachusetts: Addison-Wesley, 1995. ISBN 0201546108
    • Metrics and Models in Software Quality Engineering, Kan, Stephen H. Addison Wesley, 1995. ISBN 0201729156

I’m Certified Software Development Professional:CSDP

untitledIt is my pleasure to share with you my recent achievement. Now I’m IEEE Computer Society Certified Software Development Professional CSDP.

The CSDP credential is intended for mid-career software development professionals that want to confirm their proficiency of standard software development practices and advance in their careers.

Certified Software Development Professional should:

  • Possesses fundamental knowledge and understanding of computing principles and concepts and their application to the definition, design, construction, testing of software.
  • Be able to apply design principles with technical and economic tradeoffs to modules, subsystems, and systems in accordance with standards of practice, specifications, and principles of behavior of software as required to perform the functions as stated in the software requirements.
  • Has met the IEEE CS CSDP education, experience, and examination requirements.

How to become an CSDP:

  1. Application Steps
    1. Obtain CSDP candidate brochure from IEEE Computer Society http://www.computer.org/certification/
    2. Review requirements
    3. Complete application
    4. Send completed application to IEEE CS by deadline with fee
    5. Acknowledgement of payment
    6. Review of application
    7. If accepted, authorization to test sent to candidate
  2. Requirements for Certification
    1. Education: (need at least one)
      • You have a bachelor's degree
      • You are a CSDA certificate holder
      • You are an educator at the post-baccalaureate level
      • You are a full member of the IEEE
    2. Experience: (need at least one)
      • You have an advanced degree in software engineering and at least two years (about 3,500 hrs) of experience in software engineering/development
      • You have at least four years (about 7,000 hrs) experience in software engineering/development
  3. Preparation for Examination
    1. Depends on level of expertise in areas covered by Body of Knowledge
    2. Focus on areas needing the most review
    3. Study from the suggested reference material
    4. Can take a refresher course (see CSDP website)
    5. Unless your background covers most of the Body of Knowledge, allow three months of 2-4 hours a week for study
    6. Last week: assemble test access materials
  4. Examination
    1. Length: 4 hours
    2. Closed book, computer based
    3. At a Prometric training center (in Egypt only AMIDEAST Cairo branch)
    4. Format
      • 180 multiple-choice questions that are based on concepts and experiences that should be familiar to a proficient software engineering professional with 7,000 or more hours of experience. The topic areas are grouped by question development into domains. The percentage range of questions in each area is as follows:
      • Business Practices and Engineering Economics (3–4%)
      • Software Requirements (13–15%)
      • Software Design (22–24%)
      • Software Construction (10–12%)
      • Software Testing (15–17%)
      • Software Maintenance (3–5%)
      • Software Configuration Management (3–4%)
      • Software Engineering Management (10–12%)
      • Software Engineering Process (2–4%)
      • Software Engineering Tools and Methods (2–4%)
      • Software Quality (6–8%)

General References :

  • Software Engineering: A Practitioner’s Approach, Latest ed.,
    Pressman, Roger S., New York, New York: McGraw-Hill.
  • Software Engineering, Sommerville, I., Latest ed.
    Reading, Massachusetts: Addison-Wesley.
  • SE Body of knowledge http://www.swebok.org
  • Online review course http://www.computer.org/certification/DistanceLearning/index.htm 
  • Yahoo study group http://groups.yahoo.com/group/ieee_csdp/
  • Software Engineering Vol. 1: The Development Process, 2nd Edition.
    Dorfman, M. & Thayer, R., editors,
    Los Alamitos, California: IEEE Computer Society Press, 2002.
  • Software Engineering Vol. 2: The Supporting Processes, 2nd Edition.
    Thayer, R. and M. Christensen, editors,
    Los Alamitos,California: IEEE Computer Society Press, 2002.
  • IEEE Software Engineering Collection, 1999, vols. 1-4.
    Piscataway, New Jersey: IEEE.

Comprehensive Reading List :

  1. "Goal-Question-Metric (GQM) Approach" | Software Tech News, vol. 11, no. 4, Dec. 2008
  2. A Specifier's Introduction to Formal Methods | Jeannette M. Wing | Computer, vol. 23, no. 9, Sept. 1990, pp.10-23
  3. Algebraic Structures | Alex Lopez-Ortiz | Alex-Lopez Ortiz web page
  4. Applied Statistics and Probability for Engineers, 4th Edition | Douglas C. Montgomery and George C. Runger | Wiley
  5. Applying Formal Specifications to Real-World Software Development | Girish Keshav Palshikar | IEEE Software, vol. 18, no. 6, Nov. 2001, pp. 89-9.7
  6. Balancing Agility and Discipline: A Guide for the Perplexed | Barry Boehm and Richard Turner | Addison Wesley
  7. Code Complete, 2nd Edition | Steve McConnell | Microsoft Press
  8. Computer Algorithms, 2nd Edition | Ellis Horowitz, Sartaj Sahni, and Sanguthevar Rajasekaran | Silicon Press
  9. Computer Science: An Overview, 10th Edition | J. Glenn Brookshear | Addison Wesley
  10. Computer Security: Art and Science | Matt Bishop | Addison Wesley
  11. Configuration Management Principles and Practices | Anne Mette Jonassen Hass | Addison Wesley
  12. Design Patterns: Elements of Reusable Object-Oriented Software | Erich Gamma et al | Addison Wesley
  13. Discrete Mathematics and its Applications, 6th Edition | Kenneth Rosen | McGraw-Hill
  14. Documenting Software Architectures: Views and Beyond | Paul Clements et al | Addison Wesley
  15. Engineering by Design, 2nd Edition | Gerard Voland | Prentice Hall
  16. Executable UML: A Foundation for Model-Driven Architecture | Stephen J. Mellor and Marc J. Balcer | Addison Wesley
  17. Fundamental of Object-Oriented Design in UML, 2nd Edition | Meilir Page-Jones | Addison Wesley
  18. Guide to the Software Engineering Body of Knowledge | CS Press 
  19. IEEE-CS/ACM Joint Task Force on Software Engineering Ethics and Professional Practices | IEEE/ACM
  20. Managing and Leading Software Projects | Richard E. Fairley | CS Press
  21. Metrics and Models in Software Quality Engineering, 2nd Edition | Stephen H. Kan | Addison Wesley
  22. Numerical Mathematics and Computing, 6th Edition | E. Ward Cheney and David R. Kincaid | Addison Wesley
  23. Operating System Concepts, 8th Edition | Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne | Wiley
  24. Professional Issues in Software Engineering | Frank Bott, Allison Coleman, Jack Eaton, and Diane Rowland | Taylor and Francis
  25. Return on Software: Maximizing the Return on Your Software Investment | Steve Tockey | Addison Wesley
  26. Security-Oriented Pointwise Changes to SWEBOK Guide | Samuel Redwine
  27. Software Design, 2nd Edition | David Budgen | Addison Wesley
  28. Software Engineering, 8th Edition | Ian Sommerville | Addison Wesley
  29. Software Inspection | Tom Gilb and D. Graham | Addison Wesley
  30. Software Maintenance: Concepts and Practice, 2nd Edition | Penny Grubb and Armstrong A. Takang | World Scientific Publishing
  31. Software Security Engineering: A Guide for Project Managers | Julia H. Allen, Sean Barnum, Robert J. Ellison, Gary McGraw, and Nancy R. Mead | Addison Wesley
  32. The Essentials of Computer Organization and Architecture, 2nd Edition | Linda Null and Julia Lobur | Jones & Bartlett
  33. The Road Map to Software Engineering: A Standards-Based Guide | James W. Moore | CS Press
  34. Usability Engineering | Jakob Nielsen | Morgan Kaufmann

 

Hope you all the best,