December 4, 2016

SQL insert query validation constraints to limit number of records


This is sample of query for  SQL insert query validation constraints to limit number of records lets you want to insert only 1000 records in table .

We can restrict number of rows, but need to add a column on which we can add some constraint ... check below example.!

CREATE TABLE TAB_1000_ROWS
AS SELECT ROWNUM COL1 FROM DUAL CONNECT BY ROWNUM <1001;

ALTER TABLE TAB_1000_ROWS
ADD CONSTRAINT CHECK_CONST CHECK (COL1 BETWEEN 1 AND 1000);

ALTER TABLE TAB_1000_ROWS
MODIFY COL1 NUMBER NOT NULL;

ALTER TABLE TAB_1000_ROWS
ADD CONSTRAINT UNIQUE_COL1 UNIQUE (COL1); -- or we can also use sequence with max as 100 and no-cycle!


after insertion of 100 values it wont allow any new values to get inserted! will throw check or unique constraint! 

November 21, 2016

Azure Management Tools,characteristics,Service Type,Subscription



Azure characteristics

  1. Cloud
  2. Virtualized
  3. Pay per use
  4. Scalable (Elastic)
  5. Self Service Provisioning.(Automation)


Azure service type-

  • SOFTWARE AS A SERVICE(Saas)
  • Platform-as-a-Service (PaaS) 
  • INFRASTRUCTURE AS A SERVICE(IAAS)




Azure management tools

  • Azure portal
  • Windows power shell
  • Azure automation
  • Azure CLI
  • visual Studio


Subscription->Service Admin & Co-Admin & Role base access

October 20, 2016

How to Fix Issue "0xc000000e: Windows Failed to Start" boot error(Solved)

How to fix the bootmgr Windows Boot Manager error "0xc000000e Windows Failed to Start: The boot selection failed because a required device is inaccessible".

Without a Windows setup DVD or if the Windows setup DVD fails to repair the problem.You can get idea from below steps to resolve or fix this error.

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

0xc000000e windows error

October 19, 2016

Students Project ACKNOWLEDGEMENT format

ACKNOWLEDGEMENT

It is our pleasure to present this project report on Abc
First of all, let us thank Mr. TDN, the principal of XYZ Institute , for his  kind consideration.

I express my deep gratitude and sincere thanks to the Head of the Department of Computer Technology of XYZ Institute ,Prof. TTT for his encouragement and support throughout the project.

 I express my profound  gratitude to our project guide Mrs. yyy for her support given to us.
We would like to give our sincere thanks to our ABC Technology staff of XTZ who lead us to satisfactory and timely completion of the project with their great technical support.

We hope our work would be taken as a step towards the improvement of the
present  condition.

Interview Cracking Steps and common questions

Interview Cracking Steps

1) Resume: Mention all the skills and achievements. Be true to yourself and do not exaggerate. Develop good command on all the topics which you have mentioned in the resume.  Review your resume thoroughly and make sure it is error free and properly formatted.
2) List down the topics which you are strong at. Leverage this point to highlight your skills during your interview. Show your contributions as a team member which help to perform tasks easier.
3) List down the topics which you are weak at
4) Make a note of your recent achievements like issues, new implementations, automation, standardization and documenting. Make sure you have some stories to tell. This will help in giving a good idea about your skills and the interview would be held in these areas mostly.

Interview:

Common questions
1) Tell me about yourself- Make sure you are well prepared for this. This gives and idea about yourself as well as you communication skills.
2) Tell me the day to day activities and tasks you perform-This is an important question which will tell the interviewer about your way of work and how will you handle your production servers. Response given by you will navigate your interview. Make sure you never utter your weakest area topics in your response.
3) Make room to tell about your recent achievements.
4) Do not try to bluff the interviewer. Be true if you do not know the answer and convey that you have only minimal knowledge in this area. Show them a positive attitude that you can learn.  
5) Show an attitude that you try to troubleshoot the issues with a never give up attitude.

SQL Queries from Multiple tables and Questions

Question -Employee_Details
EmpID
NVARCHAR(10)
Emp_FirstName
NVARCHAR(100)
Emp_LastName
NVARCHAR(100)
DateOfJoining
Datetime
Employee_Salary
EmpID
NVARCHAR(10)
Refers to Employee Details
PayPeriodId
INT
Refers to Master_PayPeriod
SalaryAmount
Money

DateofSalaryCreditedtoAccount
Datetime


Master_PayPeriod


PayPeriodID
INT

PayMonthYear
Datetime


Employee Details
Sample Data



000001
ABC
XYZ
01-Jan-2000

000002
Rahul
Y
13-Dec-2000

000003
Amit
S
12-Apr-2000

000004
Shobit
K
01-Jan-2000

000005
Harshit
J
13-Dec-2001

000006
Amrit
C
12-Apr-2002


Employee_Salary




000001
1
20000
02-May-12

000002
1
25000
02-May-12

000003
1
12000
02-May-12

000004
1
90000
02-May-12

000005
1
27000
02-May-12

000006
1
23000
02-May-12


Master_PayPeriod
Sample Data

1
Apr-12

2
May-12

3
Jun-12

4
Jul-12

5
Aug-12

6
Sep-12

7
Oct-12

8
Nov-12

9
Dec-12

10
Jan-13

11
Feb-13


12
Mar-13


a) Write a query to show salary of each employee for Month September ‘12
b) Write a query to show every Employees’ total Earned Salary for Financial Year 2012-13
c) Write a query to show Rahul’s monthly Earned Salary for Financial Year 2012-13

d) Write a query to show names of employees who has drawn annual salary more than 25000/-



1. What is SQL Server Agent?
2. How do you refresh a database?
3. Which TCP/IP port does SQL Server run on? How can it be changed?
4. What are the main requirements to install SQL Server 2012?
5. What are the authentication modes in SQL Server? How can it be changed?
6. How does the database recovery model impact database backups?
7. Is the native SQL Server 2005 backups are in clear text or in encrypted?
8. How can I verify that backups are occurring on a daily basis?
9. How do you know if your database backups are restorable?
10. How do you migrate a database from SQL Server 2005 to 2008 R2?
11. What are some common reasons why database restores fail?
12. What are the permissions required to perform backup and Restore?
13. How can you be notified if a native SQL Server database backup or restore fails via the native tools?
14. What are some common post restore processes?
15. How can full backups be issued without interrupting the LSN’s?
16. What is the database that has the backup and restores system tables?  
17. What are the backup and restore system tables?
18. How is a point in time recovery performed?
19. What are your recommendations to design a backup and recovery solution? Simply what is Backup Check list?
20. What options/arguments can be specified in a BACKUP LOG statement to keep inactive log records from being truncated?
21. What are all of the backup options?
22. What are all of the Restore options?
23. How much time does it take for full backup and restore of 500 GB database?
24. What are the issues you faced in backup and restore process?
25. How to perform the tail log backup?
26. What is piecemeal Restore?


October 13, 2016

Error code 9002 Log file is full in SQ 2012

This is sample of queries to check in MS SQL 2012 How to Fix Error "ERROR 9002 LOG FILE IS FULL"

You can check following way.

MS SQL 2012 How to Fix Error ERROR 9002 LOG FILE IS FULL

September 29, 2016

Fixed Microsoft SQL Server Error 18456 Login Failed for User sa

If you are getting Microsoft SQL Server Error 18456 Login Failed for User sa error to connect with system admin (SA) Login.

sa


Then you can apply below step to resolve this issue

Go to SQL Server Properties - Security - Server Authentication section- check Sql Server and Windows authentication mode

Mixed mode

After that restart SQL server services then it will work fine.

PMP Eligibility-Project Management Professional Certification

PMP
PMP

PMP