Sie sind auf Seite 1von 4

Tell me about yourself

Been working with sql server for last 6 years. Just like any development life cycle we do : Requirement gathering Analysis gathering Design Development Implementation Testing Push to production DBA duties: Setup the servers in production and non-production (testing etc) Needs hardware specifications (DBA works with sys admin to figure out) Installation (standalone or cluster installation) in non prod and productions Non production mostly was in standalone and production was in clustered environment Some scenarios we set up transactional replication to testing environment How we have given permissions Speak about replication Set up of log shipping

Unique index under primary key Both primary and unique are constraints Unique- tells uniqueness of a row but will allow null values Primary key will now allow null values.

Primary keys creates clustered index Unique key created non-clustered index. These can be changed at the time of creating. Scenarios where we can have unique key and primary key Have you used temp tables? Select *into table 1 from table 2.. this will create temporary tables #temp table See data in query window and another person can also see the temp table in another window in same server global temp table Read temp table and temp table variable Put H1 as visa status and put expiry 2 years from today When did u come to US 4 years back

Cluster environment High availability: company 2 locations Dallas, Stanford, same server available on same server Disaster recovery: users are kept in a second location so that if they lose the server in first location then the server is accessible in second location How to write data to database? Application has config files which have connection string which has mainly server, database and user.Configuring the application with the SQL server. Example: logging into an online shopping system Configuration file contains server name, database name, User account web page uses to connect to database .. All these 3 comprise connection string. If somebody is using How is db interaction done using interactions? Interactions using inline SQL and many other applications

Every company has a domain (like a last name) Register any new machine into the domain controller. SQL name will also be assigned SQL clustering installing Put CD on node 1 or 2. It will ask you if installation is failover then specify the second node name It will ask the SQL cluster name It takes one node as active and other as inactive. The first installed node is considered active. Keep master model and tempdb databases in any drive except C drive since C drive is not shared failover will not work DTC installer. Very important For clustering to work there has to be 2 nodes. Windows heartbeat. Both machines checking on each other making sure one of them is always up. Its part of windows clustering SQL clustering requires windows clustering Failover cluster manager..

Union n union all difference Used for selecting data from table Union all does not give duplicates of values Union will only give distinct values Number and datatypes in the select statement should match the union statement

Differences between clustered and non-clustered indexes Clustered index: resides where data resides like a textbook indexdata page proportional to index page

Non-clustered index: index to an index. Pointer is pointing to index which points to where data is placed non clustered the data page is not proportional to index page Non clustered index is created on secondary filegroup also.this one can be made on a secondary drive for example data in D drive while index in E drive. That is to say that they can be put on different filegrups. Clustered index is on the same drive as the data. Clustered is itself is pointer. While non-clustered is a pointer which points to the index.

What kind of index do u create on which column Multiple lookups on a specific value then use clustered index.. for eg, if look up is asking for inputs on certain date has t be distinct values Non clustered: if one customer has multiple order IDs.. then use non-clustered Distinct values then clustered index and if non distinct values then non-clustered

One query/stored procedure is running slow. How do u work with that Figure out what that query is.. either user tells r use profiler Put filters on the profiler Check the tables involved in query Check the statistics of the table ( sql server updates stats on a table ) very important. Creates execution plan (SQL servers holds only 10 execution plan) Use sp_autostats.. tells when the table was last updated Figure out the query and then check the updates ( execttion plans) on the table using sp_autostats

For table characteristics: sp_help tablename

Das könnte Ihnen auch gefallen