Sql server database interview questions pdf




















The distributor is responsible for distributing the database objects to one or more destinations. Replication can be configured in any topology depending on keeping in view the complexity and the workload of the entire Replication.

It can be any of the following:. That is, in SQL Server , the Installation process itself installs on all of the nodes be it 2 nodes or 3 nodes. In or above this has changed, we would need to install separately on all the nodes. An Active-Passive cluster is a failover cluster configured in a way that only one cluster node is active at any given time. An Active-Active cluster is a failover cluster configured in a way that both the cluster nodes are active at any given point in time.

That is, one Instance of SQL Server is running on each of the nodes always; when one of the nodes has a failure, both the Instances run on only one node until the failed node is brought up after fixing the issue that caused the node failure. The instance is then failed over back to its designated node.

Drop database deletes the database along with the physical files, it is not possible to bring back the database unless you have a backup of the database. When you take a database offline, the database is not available for users, it is not deleted physically, it can be brought back online.

List of Related Microsoft Certification Courses:. Ravindra Savaram is a Content Lead at Mindmajix. You can stay up to date on all these technologies by following him on LinkedIn and Twitter. Open Menu. Course Categories. AI and Machine Learning. API Management and Testing. Big Data. Business Intelligence and Analytics. Cloud Computing. Data Science.

Programming and Frameworks. Software and Automation Testing. Close Menu. Get Trained And Certified. What is DCL? What is Replication? Why would you use SQL Agent?

What is DBCC? What are the recovery models for a database? What is the importance of a recovery model? What is Transparent Data Encryption? Relational DB Management System. Before we go ahead and do that, we would have to create another table that would have the same structure as the above-given table.

The values may be numbers, text, or dates. To search for values within a given range of values, the IN condition operator is used. If we have more than one value to choose from, we use the IN operator. Below are the SQL scripts for generating the sample data:.

The SQL query above will delete the rows, where the name fields are duplicated, and it will retain only those unique rows in which the names are unique and the ID fields are the lowest.

That is, rows with IDs 5 and 6 are deleted, whereas rows with IDs 1 and 2 are retained. Consider the below Employee table. Below is a simple query to find out the employee who has the third-highest salary. The white box test method mainly deals with the internal structure of a particular database, where users hide specification details. The white box testing method involves the following:.

The black box test method generally involves interface testing, followed by database integration. It includes:. If we want to delete the rows tuples of this table, we can use the delete command. When we run the following command, it will delete all the rows. The truncate command is also used to delete the rows. However, in truncate, we cannot delete a specific row. Thus, when we run the following command, it will delete all the rows of the table. In the case of delete, we can perform rollback before committing the changes.

Hence, with the delete command, we have the option of recovering the original. Want to get certified in SQL! These are some basic but very essential questions an Sql professional should know. Thanks for sharing. Indeed it helps to do a self evaluatio. Excellent questions. Some of them do have multiple ways to answer. I guess if you know SQL Server you can find many ways to figure things out. I follow best practice, best performance method.

What about all the new functionality available with SQL Server ? Thank you for sharing. Thank You for sharing these interview questions. These are really helpful and essential questions for interview. Leave a Reply Cancel reply. Your email address will not be published. Read More. Become a Certified Professional. This blog on SQL Interview Questions and answers can be categorized into the following three types: 1. Basic Interview Questions 2. Intermediate Interview Questions 3. Master Most in Demand Skills Now!

Career Transition. Courses you may like. Parameters Clustered Index Non-clustered Index Used for Sorting and storing records physically in memory Creating a logical order for data rows. Pointers are used for physical data files Methods for storing Stores data in the leaf nodes of the index Never stores data in the leaf nodes of the index Size Quite large Comparatively, small Data accessing Fast Slow Additional disk space Not required Required to store indexes separately Type of key By default, the primary key of a table is a clustered index It can be used with the unique constraint on the table that acts as a composite key Main feature Improves the performance of data retrieval Should be created on columns used in Joins.

ID Name Salary 2 Anand 1, Department Total Marketing Production Testing Department Total Production Testing These questions are really amazing, to preapre for an interview.. These questions are very much helpful… please upload more questions related to this. Thanks for the questions. Only some members are allowed to access the database D. Only the system admin and some members are allowed to access the database Ans: A What is the difference between adhoc queries from stored procedures?

Adhoc queries are placed embedded in the business logic code B. Stored procedures are placed embedded in the business logic code C. There is no difference as both are fired on the databases D.

None of the above Ans: A False Ans: B. Posted on by Leave a comment. SQL Server supports recursive stored procedure which calls by itself. Recursive stored procedure can be defined as a method of problem solving wherein the solution is arrived repetitively. It can nest up to 32 levels.

What are the differences between local and global temporary tables? A CHECK constraint can be applied to a column in a table to limit the values that can be placed in a column. Check constraint is to enforce integrity. A sub-query is a query which can be nested inside a main query like Select, Update, Insert or Delete statements. This can be used when expression is allowed. Properties of sub query can be defined as.

What are the types of sub query? Scheduled tasks or jobs are used to automate processes that can be run on a scheduled time at a regular interval. This scheduling of tasks helps to reduce human intervention during night time and feed can be done at a particular time.

User can also order the tasks in which it has to be generated. This function is used to return a non-null from more than one column in the arguments. FLOOR function is used to round up a non-integer value to the previous least integer.



0コメント

  • 1000 / 1000