Posts

Showing posts from April, 2018

sql server experienced interview questions Different Companies

http://udayarumilli.com/interview-questions/

Complex Queries !

https://www.c-sharpcorner.com/article/most-asked-sql-queries-in-interview-questions/ Sample tables are listed to visualize the data and associate with query answers given. ==================    Consider below tables   ==================    EMPLOYEE empid   empname managerid   deptid  salary  DOB   1       emp 1       0       1       6000    1982-08-06 00:00:00.000   2       emp 2       0       5       6000    1982-07-11 00:00:00.000   3       emp 3       1       1       2000    1983-11-21 00:00:00.000   13      emp 13      2       5       2000    1984-03-09 00:00:00.000   11      emp 11      2       1       2000    1989-07-23 00:00:00.000   9       emp 9       1       5       3000    1990-09-11 00:00:00.000   8       emp 8       3       1       3500    1990-05-15 00:00:00.000   7       emp 7       2       5        NULL      NULL    3       emp 3       1       1       2000    1983-11-21 00:00:00.000      --DEPARTMENT TABLE    deptid  deptname   1  

Using SQL Server DMVs to Identify Missing Indexes

Image
https://www.mssqltips.com/sqlservertip/1634/using-sql-server-dmvs-to-identify-missing-indexes/ Problem In a previous tip, Deeper insight into unused indexes for SQL Server , we discussed how to identify indexes that have been created but are not being used or used rarely.  Now that I know which indexes I can drop, what is the process to identify which indexes I need to create.  I can run the Database Tuning Advisor or examine the query plans, but is there any easier way to determine which indexes may be needed? Solution As with a lot of the new features we have seen with SQL Server 2005 and now with SQL Server 2008, Microsoft introduced a few more dynamic management views to also assist with identifying possible index candidates based on query history. The dynamic management views are: sys.dm_db_missing_index_details - Returns detailed information about a missing index sys.dm_db_missing_index_group_stats   - Returns summary information about missing index groups sys

Filegroups - Creating a new file group and making it the default

Image
Ref-1 https://blog.sqlauthority.com/2009/05/31/sql-server-create-multiple-filegroup-for-single-database/ https://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/07/11/881.aspx https://www.sqlshack.com/database-table-partitioning-sql-server/ https://blog.sqlauthority.com/2013/08/15/sql-server-sql-basics-what-are-filegroups-day-9-of-10/ Filegroups - Creating a new file group and making it the default There are many occaisons where you may want to use multiple filegroups, especially if dealing with large tables and fragmentation is a worry. The script below shows a complete end-to-end example of how to create a file group and mark it as the default so all newly created objects are placed on there. Note, there is nothing you can do about [PRIMARY] so if you have creation scripts or drop / recreate index scripts with [PRIMARY] in them then that data will always go on the [PRIMARY] file group. -- Create the database CREATE DATABASE te

How to Use the Telnet Client in Windows

Image
https://www.lifewire.com/what-is-telnet-2626026 For telnet Command https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-xp/bb491013%28v=technet.10%29 How to Use the Telnet Client in Windows An Explanation of the Telnet Protocol Share Pin Email Top of Form Print Bottom of Form © Kris Connor / Getty Images Entertainment / Getty Images Internet & Network Key Concepts Basics Guides & Tutorials Installing & Upgrading Tips & Tricks What Are Bitcoins? Telnet (short for TE rminal NET work) is a network protocol used to provide a command line interface for communicating with a device. Telnet is used most often for remote management but also sometimes for the initial setup for some devices, especially network hardware like switches , access points, etc. Managing files on a website is also something Telnet is sometimes used for. Note:  Telnet is sometimes written in uppercase as TELNET and may also