<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Interviews &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/interviews/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 18 Jul 2016 19:30:01 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>SQL Server: Database Security Interview Questions and Answers  (Day-1)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1/</link>
					<comments>https://www.dbrnd.com/2016/07/sql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 18 Jul 2016 19:28:52 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Data Masking]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Decryption]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[orphaned user]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[secure socket layer]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3364</guid>

					<description><![CDATA[What do you mean by Database Security? Database security refers to the collective measures used to protect and secure a database or database management software from illegitimate use and malicious threats and attacks. It is a broad term that includes a multitude of processes, tools and methodologies that ensure security within a database environment. What [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&amp;linkname=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1%2F&#038;title=SQL%20Server%3A%20Database%20Security%20Interview%20Questions%20and%20Answers%20%20%28Day-1%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1/" data-a2a-title="SQL Server: Database Security Interview Questions and Answers  (Day-1)"></a></p><p><strong>What do you mean by Database Security?</strong></p>
<blockquote><p>Database security refers to the collective measures used to protect and secure a database or database management software from illegitimate use and malicious threats and attacks. It is a broad term that includes a multitude of processes, tools and methodologies that ensure security within a database environment.</p></blockquote>
<p><strong>What is Data Masking?</strong></p>
<blockquote class="wp-embedded-content" data-secret="JnDNNa5P6s"><p><a href="https://www.dbrnd.com/2015/11/database-theory-what-is-a-data-masking-2/">Database Theory: What is a Data Masking ?</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2015/11/database-theory-what-is-a-data-masking-2/embed/#?secret=JnDNNa5P6s" data-secret="JnDNNa5P6s" width="600" height="338" title="&#8220;Database Theory: What is a Data Masking ?&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>What is Data Theft?</strong></p>
<blockquote><p>Data theft is the act of stealing computer-based information from an unknowing victim with the intent of compromising privacy or obtaining confidential information. Data theft is increasingly a problem for individual computer users, as well as big corporate firms.</p>
<p>Data must be stored and transmitted securely, so that information such as credit card numbers cannot be stolen. Over the Internet and Wide Area Network (WAN) environments, both public carriers and private network owners often route portions of their network through insecure landlines, extremely vulnerable microwave and satellite links, or a number of servers.</p></blockquote>
<p><strong>What are the different types of Security levels?</strong></p>
<ul>
<li>Physical</li>
<li>Human</li>
<li>Operating System</li>
<li>Network</li>
<li>Database System</li>
</ul>
<p><strong>What does Database Encryption and Decryption mean?</strong></p>
<blockquote><p>Database encryption is the process of converting data, within a database, in plain text format into a meaningless cipher text by means of a suitable algorithm.</p>
<p>Database decryption is converting the meaningless cipher text into the original information using keys generated by the encryption algorithms.</p>
<p>Database encryption can be provided at the file or column level.</p></blockquote>
<p><strong>What is SQL injection?</strong></p>
<blockquote><p>SQL injection is an attack by malicious users in which malicious code can be inserted into strings that can be passed to an instance of SQL server for parsing and execution. All statements have to checked for vulnerabilities as it executes all syntactically valid queries that it receives.</p>
<p>Even parameters can be manipulated by the skilled and experienced attackers.</p></blockquote>
<p><strong>What are the methods used to protect against SQL injection attack?</strong></p>
<p>Following are the methods used to protect against SQL injection attack:</p>
<ul>
<li>Use Parameters for Stored Procedures</li>
<li>Filtering input parameters</li>
<li>Use Parameter collection with Dynamic SQL</li>
<li>In like clause, user escape characters</li>
</ul>
<p><strong>How can SQL Server instances be hidden?</strong></p>
<blockquote><p>To hide a SQL Server instance, we need to make a change in SQL Server Configuration Manager.</p>
<p>To do this launch SQL Server Configuration Manager and do the following:</p>
<p>select the instance of SQL Server, right click and select Properties. After selecting properties you will just set Hide Instance to &#8220;Yes&#8221; and click OK or Apply.</p>
<p>After the change is made, you need to restart the instance of SQL Server to not expose the name of the instance.</p></blockquote>
<p><strong>What are Orphaned Users?</strong></p>
<p>A database user for which the corresponding SQL Server login is undefined or is incorrectly defined on a server instance cannot log in to the instance. Such a user is said to be an orphaned user of the database on that server instance.</p>
<ul>
<li>A database user can become orphaned if the corresponding SQL Server login is dropped.</li>
<li>A database user can become orphaned after a database is restored or attached to a different instance of SQL Server.</li>
<li>Orphaning can happen if the database user is mapped to a SID that is not present in the new server instance.</li>
</ul>
<p><strong>Would you please describe any five server role with its permission?</strong></p>
<ul>
<li>bulkadmin: Granted &#8211; ADMINISTER BULK OPERATIONS</li>
<li>dbcreator: Granted &#8211; CREATE ANY DATABASE</li>
<li>diskadmin: Granted &#8211; ALTER RESOURCES</li>
<li>processadmin: Granted &#8211; ALTER ANY CONNECTION, ALTER SERVER STATE</li>
<li>securityadmin: Granted &#8211; ALTER ANY LOGIN</li>
<li>serveradmin: Granted &#8211; ALTER ANY ENDPOINT, ALTER RESOURCES, ALTER SERVER STATE, ALTER SETTINGS, SHUTDOWN, VIEW SERVER STATE</li>
<li>setupadmin: Granted &#8211; ALTER ANY LINKED SERVER</li>
<li>sysadmin: Granted with GRANT option &#8211; CONTROL SERVER</li>
</ul>
<p><strong>Which authentication mode is more secured?</strong></p>
<blockquote><p>Windows authentication is definitely more secure as it’s controlled and authenticated by Active Directory policies.</p></blockquote>
<p><strong>What is a Symmetric key in Data encryption process?</strong></p>
<blockquote><p>In Symmetric cryptography system, the sender and the receiver of a message share a single, common key that is used to encrypt and decrypt the message. This is relatively easy to implement, and both the sender and the receiver can encrypt or decrypt the messages.</p></blockquote>
<p><strong>What is a Asymmetric key in Data encryption process?</strong></p>
<blockquote><p>Asymmetric cryptography, also known as Public-key cryptography, is a system in which the sender and the receiver of a message have a pair of cryptographic keys – a public key and a private key – to encrypt and decrypt the message. This is a relatively complex system where the sender can use his key to encrypt the message but he cannot decrypt it. The receiver, on the other hand, can use his key to decrypt the message but he cannot encrypt it.</p></blockquote>
<p><strong>What Secure Socket Layer (SSL) with SQL Server and can we enable it?</strong></p>
<blockquote><p>Yes: We can enable SSL with SQL Server</p>
<p>Microsoft SQL Server can use Secure Sockets Layer (SSL) to encrypt data that is transmitted across a network between an instance of SQL Server and a client application. Enabling SSL encryption increases the security of data transmitted across networks between instances of SQL Server and applications.</p></blockquote>
<p><strong>What are basic steps to configure SSL for SQL Server?</strong></p>
<blockquote><p>Install a certificate in the Windows certificate store of the server computer.</p>
<p>Click Start, in the Microsoft SQL Server program group, point to Configuration Tools, and thenclick SQL Server Configuration Manager.</p>
<p>Expand SQL Server Network Configuration, right-click the protocols for the server you want, and then click Properties.</p>
<p>On the Certificate tab, configure the Database Engine to use the certificate.</p>
<p>On the Flags tab, view or specify the protocol encryption option. The login packet will always be encrypted.</p></blockquote>
<p><strong>What are the built-In Schemas?</strong></p>
<ul>
<li>dbo</li>
<li>guest</li>
<li>sys</li>
<li>INFORMATION_SCHEMA</li>
</ul>
<p><strong>Are you agree with User-Schema Separation in SQL Server?</strong></p>
<blockquote><p>Yes: User-schema separation allows for more flexibility in managing database object permissions. A schema is a named container for database objects, which allows you to group objects into separate namespaces.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/07/sql-server-database-security-interview-questions-and-answers-data-mask-encryption-decrption-ssl-orphand-user-sql-injection-day-1/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-9)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9/</link>
					<comments>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 17 Jul 2016 07:39:14 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[fragmentation]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[Service Broker]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3352</guid>

					<description><![CDATA[What is the use of Service Broker? Service Broker helps developers build asynchronous, loosely coupled applications in which independent components work together to accomplish a task. These application components exchange messages that contain the information that is required to complete the task. Service Broker can be useful for any application that needs to perform processing [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-9%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-9)"></a></p><p><strong>What is the use of Service Broker?</strong></p>
<blockquote><p>Service Broker helps developers build asynchronous, loosely coupled applications in which independent components work together to accomplish a task. These application components exchange messages that contain the information that is required to complete the task.</p>
<p>Service Broker can be useful for any application that needs to perform processing asynchronously, or that needs to distribute processing across a number of computers.</p></blockquote>
<p><strong>What are the main components of Service Broker?</strong></p>
<ul>
<li><strong>Conversation components:</strong> Conversation groups, conversations, and messages form the run-time structure of a Service Broker application. Applications exchange messages as part of a conversation.</li>
<li><strong>Service definition components:</strong> These are design-time components that specify the basic structure of the conversations that the application uses.</li>
<li><strong>Networking and security components:</strong> These components define the infrastructure used to exchange messages between instances of the Database Engine. To help database administrators manage</li>
<li><strong>Changing environments:</strong> Service Broker lets administrators configure these components independently of the application code.</li>
</ul>
<p><strong>What are the advantages of Service Broker?</strong></p>
<blockquote><p>Database integration enhances application performance and simplifies administration.</p>
<p>Message ordering and coordination for simplified application development</p>
<p>Loose application coupling provides workload flexibility.</p>
<p>Related message locking allows more than one instance of an application to process messages from the same queue without explicit synchronization.</p>
<p>Automatic activation allows applications to scale with the message volume.</p></blockquote>
<p><strong>I have a database which has several tables that have very heavy write operations. These table are very large and some are over a hundred gigabytes. I noticed performance of this database is getting slower and after some investigation we suspect that the Auto Update Statistics function is causing a performance degradation.</strong></p>
<p><strong>What should be your solution of this problem?</strong></p>
<blockquote><p>Statistics are objects which contain information about the distribution of values in one or more columns of a table or indexed view. The query optimizer uses this statistical data to estimate the number of rows in the query result. In the case where the statistics are invalid or outdated then the query optimizer is likely to choose a wrong execution plan and query performance will decrease. Therefore keeping statistics up to date is an essential part of SQL Server maintenance.</p>
<p>If we experience problems due to statistics automatically being updated then the solution might be to disable the Auto Update Statistics option. However, we cannot live with outdated statistics on large databases, so if you turn this option off you should create a scheduled job which explicitly updates the statistics during off-peak periods. To do this, we can use the sp_updatestats procedure.</p></blockquote>
<p><strong>What are the different type of Fragmentations?</strong></p>
<ul>
<li>Logical/Phsical Disk Fragmentation</li>
<li>Extent Fragmentation</li>
<li>File Fragmentation</li>
<li>Page Fragmentation</li>
<li>Index Fragmentation</li>
</ul>
<p><strong>What are the index statistics?</strong></p>
<blockquote><p>Index statistics contain information about the distribution of index key values. By distribution, I mean the number of rows associated with each key value. SQL Server uses this information to determine what kind of execution plan to use when processing a query.</p></blockquote>
<p><strong>When are index statistics updated?</strong></p>
<blockquote><p>The AUTO_UPDATE_STATISTICS database setting controls when statistics are automatically updated.  Once statistics have been created, SQL Server then determines when to update those statistics based on how out-of-date the statistics might be.</p>
<p>SQL Server identifies out of date statistics based on the number of inserts, updates, and deletes that have occurred since the last time statistics were updated, and then recreates the statistics based on a threshold. The threshold is relative to the number of records in the table. (Enable the properties – “auto create statistics” and “auto update statistics” for OLTP)</p></blockquote>
<p><strong>Explain database options “Auto Update Statistics” and “Auto Update Statistics Asynchronous”?</strong></p>
<blockquote><p>Auto Update Statistics: If there is an incoming query but statistics are stale then sql server first update the statistics before building the execution plan.</p>
<p>Auto Update Statistics Asynchronous: If there is an incoming query but statistics are stale then sql servers uses the stale statistics, builds the execution plan and then update the statistics.</p></blockquote>
<p><strong>How to update statistics manually?</strong></p>
<blockquote><p>If you want to manually update statistics, you can use either sp_updatestats or UPDATE STATISTICS &lt;statistics name&gt;</p></blockquote>
<p><strong>What are the various types of statistics available?</strong></p>
<p>There are three different types of statistics available.</p>
<ul>
<li>Statistics created due to index creation.</li>
<li>Statistics created by optimizer.</li>
<li>User defined statistics created from “CREATE STATISTICS”</li>
</ul>
<p><strong>What are the various options to be considered while designing a new execution plan?</strong></p>
<blockquote><p>There are a number of factors that influence the decision in choosing the proper execution plan. One of the most important ones are cardinality estimations, the process of calculating the number of qualifying rows that are likely after filtering operations are applied.</p>
<p>A query execution plan selected with inaccurate cardinality estimates can perform several orders of magnitude slower than one selected with accurate estimates. These cardinality estimations also influence plan design options, such as join-order and parallelism. Even memory allocation, the amount of memory that a query requests, is guided by cardinality estimations.</p></blockquote>
<p><strong>How to find out when statistics updated last time?</strong></p>
<blockquote><p>A simple logic is, run the query and observe the values for both “estimated rows” and “actual rows”, if they both are close to each other you need not worried about the statistics. If you find big difference between them then you need to think about updating statistics.</p>
<p>In general we can find out last statistics updated info from below query</p><pre class="crayon-plain-tag">select object_name(object_id) as table_name
,name as stats_name
,stats_date(object_id, stats_id) as last_update
from sys.stats
where objectproperty(object_id, ‘IsUserTable’) = 1
order by last_update</pre><p>
</p></blockquote>
<p><strong>What are the statistics in SQL Server?</strong></p>
<blockquote><p>Statistics determine the selectivity of the indexes. If an indexed column has unique values then the selectivity of that index is more, as opposed to an index with non-unique values. Query optimizer uses these indexes in determining whether to choose an index or not while executing a query.</p></blockquote>
<p><strong>In which situation you should update statistics?</strong></p>
<blockquote><p>If there is significant change in the key values in the index</p>
<p>If a large amount of data in an indexed column has been added, changed, or removed (that is, if the distribution of key values has changed), or the table has been truncated using the TRUNCATE TABLE statement and then repopulated</p>
<p>Database is upgraded from a previous version.</p></blockquote>
<p><strong>What are the steps to improve the performance of a query?</strong></p>
<ul>
<li>Number of joins and use of complex views/cursors have to be reduced.</li>
<li>The use of the stored procedures and indexes have to be maximized.</li>
<li>The optimized use of the complex conditional checks and computer columns have to be in place.</li>
<li>Tracking of performance analysis for the query helps us in identifying the right aspects to optimize.</li>
</ul>
<p><strong>Could you please give some Optimization Tips in writing SQL Queries ?</strong></p>
<ul>
<li>Always try to use views and stored procedures instead of doing work with heavy queries.</li>
<li>Make a habit to use constraints instead of triggers whenever it is possible.</li>
<li>When you need n number of row from database try to use top keyword or SET ROWCOUNT statement</li>
<li>Always use table variables in place of temporary tables.</li>
<li>Avoid Union and try to use UNION ALL statement.</li>
<li>Always avoid using the DISTINCT clause, whenever possible.</li>
<li>Always try to avoid using SQL Server cursors.</li>
<li>Always try to avoid the HAVING clause.</li>
<li>Do not use select count(*) to get number of rows</li>
<li>Try to include SET NOCOUNT ON statement into your stored procedures to stop the message indicating the number of rows affected by a T-SQL statement.</li>
<li>Always use file system to store large binary objects and use the file path in database.</li>
<li>Sometimes we may have to apply more than one sub queries in our main query. Try to minimize the number of sub query block in your query</li>
</ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-service-broker-performance-statistics-fragmentations-day-9/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-8)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 16 Jul 2016 07:33:51 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[cpu affinity]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbcc]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[Resource Database]]></category>
		<category><![CDATA[Shrinking database]]></category>
		<category><![CDATA[SQL Injection]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3348</guid>

					<description><![CDATA[&#160; Does SQL Server reuses space to accommodate new data, When we delete variable length column or rows? Whenever rows or columns are deleted from a table, SQL Server reuses space to accommodate new data. However, this is not the case when a variable length column is deleted. The space used by this type of [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-8%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-shrink-resource-database-sql-injection-cpu-affinity-dbcc-day-8/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-8)"></a></p><p>&nbsp;</p>
<p><strong>Does SQL Server reuses space to accommodate new data, When we delete variable length column or rows?</strong></p>
<blockquote><p>Whenever rows or columns are deleted from a table, SQL Server reuses space to accommodate new data.</p>
<p>However, this is not the case when a variable length column is deleted.</p>
<p>The space used by this type of column is not reclaimed automatically.</p>
<p>Variable length columns can be of data types varchar, nvarchar, varchar(max), nvarchar(max), varbinary, varbinary(max), text, ntext, image, sql_variant, and xml.</p></blockquote>
<p><strong>As a DBA, what should be your daily checklist for Database Server?</strong></p>
<ul>
<li>Check status of backups</li>
<li>Review the nightly run processes</li>
<li>Check the error log files</li>
<li>Check the windows error log files</li>
<li>Check the status of SQL Agent jobs</li>
<li>Review the performance related report of SQL Server</li>
<li>Check the storage information</li>
<li>Review the configured Service broker</li>
<li>Indentify the different type of fragmentations</li>
</ul>
<p><strong>How to recycle SQL Server Agent Error logs?</strong></p>
<blockquote><p>We can use sp_cycle_agent_errorlog system procedure to recycle SQL Server Agent Error logs.</p>
<p>When we cycle the error logs it is easier to open up a SQL Server Agent Error Log file when it is smaller in size.</p></blockquote>
<p><strong>What is a Scheduled Jobs or What is a Scheduled Tasks?</strong></p>
<blockquote><p>Scheduled tasks let user automate processes that run on regular or predictable cycles. User can schedule administrative tasks, such as cube processing, to run during times of slow business activity.</p>
<p>User can also determine the order in which tasks run by creating job steps within a SQL Server Agent job. E.g. back up database, Update Stats of Tables. Job steps give user control over flow of execution. If one job fails, user can configure SQL Server Agent to continue to run the remaining tasks or to stop execution.</p></blockquote>
<p><strong>What should be your recommendations for Shrinking a database?</strong></p>
<blockquote><p>Shrink the file by using Truncate Only: First it removes the inactive part of the log and then perform shrink operation.</p>
<p>Rebuild / Reorganize the indexes once the shrink is done so the Fragmentation level is decreased.</p></blockquote>
<p><strong>What are the different type of log files?</strong></p>
<ul>
<li>SQL Server Error Log</li>
<li>SQL Server Agent Log</li>
<li>Windows Event Log</li>
<li>SQL Server Setup Log</li>
<li>SQL Server Profiler Log</li>
</ul>
<p><strong>How many datafiles I can put in Tempdb? What is the effect of adding multiple data files?</strong></p>
<blockquote><p>The most effective configuration is to set tempdb on its own separate fast drive away from the user databases. I would set the number of files based on # of cpu’s divided by 2.</p></blockquote>
<p><strong>Which trace flag is used to find log record for SQL Server connection?</strong></p>
<blockquote><p>trace flag number: 4013</p></blockquote>
<p><strong>What do you know about the resource database?</strong></p>
<blockquote><p>All sys objects are physically stored in resource database and logically available on every database.</p>
<p>Resource database can faster the service packs or upgrades.</p></blockquote>
<p><strong>Why can&#8217;t I view the list of databases, tables, views in the SQL ServerManagement Studio Object Explorer?</strong></p>
<blockquote><p>This issue is due to not having VIEW DEFINITION permission on the specific object.</p>
<p>To resolve this issue, you need to grant VIEW DEFINITION permission on the object to the user which is mapped to the login you used.</p>
<p>You can perform this by running the following Transact-SQL.</p><pre class="crayon-plain-tag">USE database_name;
GO
GRANT VIEW DEFINITION ON [object_name] TO
[database_user/database_role]</pre><p>
</p></blockquote>
<p><strong>Can we initiate a external COM object from within SQL?</strong></p>
<blockquote><p>Yes: we can use the stored procedure sp_OACreate to initiate the external COM object from the T-SQL.</p></blockquote>
<p><strong>What sp_MSforeachtable  does ?</strong></p>
<blockquote><p>You can use sp_MSforeachtable undocumented stored procedure to rebuild all indexes in your database.</p>
<p>Try to schedule it to execute during CPU idle time and slow production periods.</p></blockquote>
<p><strong>What will you do if you lost rights of your SQL Server instance?</strong></p>
<blockquote><p>We can use the below options:</p>
<ul>
<li>Dedicated Administrator Connection</li>
<li>BUILIN\Administrator Group (Incase its rights are not revoked)</li>
<li>Final Option is to change the registry value</li>
<li>You can change authentication mode via registry</li>
</ul>
</blockquote>
<p><strong>What is SQL Injection?</strong></p>
<blockquote><p>SQL Injection is developed where unhandled\unexpected SQL commands are passed to SQL Server in a malicious manner. It is a problem because unknowingly data can be stolen, deleted, updated, inserted or corrupted.</p></blockquote>
<p><strong>What is CPU Affinity?</strong></p>
<blockquote><p>CPU Affinity sometimes refers as CPU pinning enables a particular process or a thread to use one or more Central Processing Unit, it depends upon the number of CPU configured in your system. It enables particular thread or process to use only configured CPU rather than any CPU that&#8217;s configured in your Operating system.</p></blockquote>
<p><strong>As a part of your job, what are the DBCC commands that you commonly use for database maintenance?</strong></p>
<ul>
<li>DBCC CACHESTATS &#8211; Displays information about the objects currently in the buffer cache.</li>
<li>DBCC CHECKDB &#8211; This will check the allocation of all pages in the database as well as check for any integrity issues.</li>
<li>DBCC CHECKTABLE &#8211; This will check the allocation of all pages for a specific table or index as well as check for any integrity issues.</li>
<li>DBCC DBREINDEX &#8211; This command will reindex your table. If the indexname is left out then all indexes are rebuilt. If the fillfactor is set to 0 then this will use the original fillfactor when the table was created.</li>
<li>DBCC PROCCACHE &#8211; This command will show you information about the procedure cache and how much is being used. Spotlight will also show you this same information.</li>
<li>DBCC MEMORYSTATUS &#8211; Displays how the SQL Server buffer cache is divided up, including buffer activity.</li>
<li>DBCC SHOWCONTIG &#8211; This command gives you information about how much space is used for a table and indexes. Information provided includes number of pages used as well as how fragmented the data is in the database.</li>
<li>DBCC SHOW_STATISTICS &#8211; This will show how statistics are laid out for an index. You can see how distributed the data is and whether the index is really a good candidate or not.</li>
<li>DBCC SHRINKFILE &#8211; This will allow you to shrink one of the database files. This is equivalent to doing a database shrink, but you can specify what file and the size to shrink it to. Use the sp_helpdb command along with the database name to see the actual file names used.</li>
<li>DBCC SQLPERF &#8211; This command will show you much of the transaction logs are being used.</li>
<li>DBCC TRACEON &#8211; This command will turn on a trace flag to capture events in the error log. Trace Flag 1204 captures Deadlock information.</li>
<li>DBCC TRACEOFF &#8211; This command turns off a trace flag.</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-7)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 15 Jul 2016 07:31:03 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[archive table]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[DBCC CHECKPRIMARYFILE]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Dedicated Connection]]></category>
		<category><![CDATA[Instance Aware]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[Multiple file groups]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3345</guid>

					<description><![CDATA[What is the Instance-aware and Instance-unaware services in SQL Server? Instance-aware services are associated with a specific instance of SQL Server. SQL Server SQL Server Agent Analysis Services Reporting Services Full-text search Instance-unaware services are shared among all installed SQL Server instances. Integration Services SQL Server Browser SQL Server Active Directory Helper SQL Writer What [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-7%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-instance-aware-archive-option-dbcc-checkprimaryfile-dedicated-connection-day-7/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-7)"></a></p><p><strong>What is the Instance-aware and Instance-unaware services in SQL Server?</strong></p>
<p>Instance-aware services are associated with a specific instance of SQL Server.</p>
<ul>
<li>SQL Server</li>
<li>SQL Server Agent</li>
<li>Analysis Services</li>
<li>Reporting Services</li>
<li>Full-text search</li>
</ul>
<p>Instance-unaware services are shared among all installed SQL Server instances.</p>
<ul>
<li>Integration Services</li>
<li>SQL Server Browser</li>
<li>SQL Server Active Directory Helper</li>
<li>SQL Writer</li>
</ul>
<p><strong>What should be your priliminary questions for Data Archive in SQL Server?</strong></p>
<ul>
<li>What types of data are we storing?</li>
<li>Most effective storage approach for our users &#8211; how often are they accessing/needing these data?</li>
<li>Most effective storage approach for our environment &#8211; what is our environments bottlenecks, limitations and weaknesses and strengths in structure?</li>
<li>Most effective storage approach when considering legal restrictions and requirements.</li>
<li>Most effective storage approach when we consider costs; for an example, do we need an Enterprise license for our data archived server?</li>
</ul>
<p><strong>What are your different suggestions for archiving data?</strong></p>
<blockquote><p><strong>If the data needs to reside in the same database:</strong></p>
<p>Move the archive data to separate table(s) with a prefix to denote the tables are archive related such as &#8216;arc_&#8217;.</p>
<p>Create the table(s) in separate filegroups on separate disks to improve IO performance.</p>
<p>Use a view to join the old and new data if the users continue to need to access the data.</p>
<p>Modify the front end code to use the view rather than the base table.</p>
<p><strong>If the data does not need to reside in the same database:</strong></p>
<p>Move (insert and delete) the archive data to separate table(s) in another database on the server or to a separate database on another server.</p>
<p>Have users request access to the data for specific queries or change the application to use a linked server to access the archived data.</p>
<p><strong>If the data is just not needed:</strong></p>
<p>Back up the data, verify the backup is restorable, note the date of the last backup with the archived data and just delete the data.</p>
<p><strong>Automation options:</strong></p>
<p>Based on the application find out if the vendor has already implemented an archiving feature that just needed to be enabled.</p>
<p>If an automated option is not available, build a process with DTS or SSIS to move the data from the source system to the archive system.</p></blockquote>
<p><strong>What is the use of DBCC CHECKPRIMARYFILE?</strong></p>
<blockquote><p>DBCC CHECKPRIMARYFILE is one of the many undocumented SQL Server commands that we can use to do our job as DBAs.</p>
<p>This command is used only for reading meta data from the primary database data file on disk and to return information that is very useful, such as the database name, logical names, physical file names and more without having to attach it to an instance of SQL Server.</p></blockquote>
<p><strong>When you attach a database in SQL Server 2008R2 which was detached by a user with a different login you may get this error:</strong></p>
<p><strong>CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file&#8230;</strong></p>
<p><strong>The question is, why this is occured and what is the solution of this?</strong></p>
<blockquote><p>You get this error because two different logins did the detach and attach operations. So the files, when detached, were owned by the first login, but the attach failed because the login that was used was not the owner of the mdf and ldf files.</p>
<p>When we detach database files, the owner becomes the person who did the detach command, so to resolve the issue we need to change or add the other login as the owner of the mdf and ldf files.</p></blockquote>
<p><strong>Can we make dedicated connection for Database Administrator?</strong></p>
<blockquote><p>Yes: using Dedicated Administrator Connection (DAC).</p>
<p>SQL Server Database Administrator can connect to a SQL Server Instance when the database engine is not responding to regular connections. During such a scenario a DBA can connect to the SQL Server Instance to troubleshoot and to kill any of the SQL Server Processes which are causing the issues.</p></blockquote>
<p><strong>Can we move data files between filegroups?</strong></p>
<blockquote><p>we cannot move data files between filegroups, it is a common practice to move data for a table between filegroups in a database.</p>
<p>This is a straight forward method of moving data from a table from one filegroup to another. We can recreate\create the clustered index on the new filegroup thereby moving the data from one filegroup to another.</p></blockquote>
<p><strong>When should I start thinking about using multiple file groups?</strong></p>
<ul>
<li>When disk queuing is causing application and user experience issues.</li>
<li>When particular tables are 10% or more of the database.</li>
<li>When non clustered index and data space are equal on large tables.</li>
<li>When an almost equal percentage of read-only and read-write data exist in the database.</li>
<li>When insufficient time is available to perform database maintenance.</li>
<li>When the business or application will be changing significantly and the data is going to grow at a much higher rate.</li>
<li>When archived data resides in the same database as the production data.</li>
</ul>
<p><strong>How to determine the service pack currently installed on SQL Server?</strong></p>
<blockquote><p>The global variable @@Version stores the build number of the sqlservr.exe, which is used to determine the service pack installed.</p></blockquote>
<p><strong>Why can’t I track data changes even though I already enabled the database audit on my database?</strong></p>
<blockquote><p>Database Audit does not track data changes. To track the data changes, you need to use another feature named &#8220;Change Data Capture&#8221; (CDC).</p></blockquote>
<p><strong>How do you troubleshoot errors in a SQL Server Agent Job?</strong></p>
<blockquote><p>Inside SSMS, in Object explorer under SQL Server Agent look for Job Activity Monitor. The job activity monitor displays the current status of all the jobs on the instance. Choose the particular job which failed, right click and choose view history from the drop down menu.</p></blockquote>
<p><strong>What is RAID and what are different types of RAID configurations?</strong></p>
<blockquote><p>RAID stands for Redundant Array of Inexpensive Disks, used to provide fault tolerance to database servers. There are six RAID levels 0 through 5 offering different levels of performance, fault tolerance.</p></blockquote>
<p><strong>Why can&#8217;t I log on to SQL Server using Windows Authentication in SQL Server Management Studio?</strong></p>
<blockquote><p>If you want to log on to the server using Windows Authentication, ensure that the current Windows account has been added to server logins.</p>
<p>You can check using below T-SQL.</p><pre class="crayon-plain-tag">SELECT loginname FROM sys.syslogins;</pre><p>
</p></blockquote>
<p><strong>What are the different ways of moving data/databases between servers and databases in SQL Server?</strong></p>
<blockquote><p>There are lots of options available, you have to choose your option depending upon your requirements. Some of the options you have are: BACKUP/RESTORE, dettaching and attaching databases, replication, DTS, BCP, logshipping, INSERT…SELECT, SELECT…INTO, creating INSERT scripts to generate data.</p></blockquote>
<p><strong>How To Find When SQL Server Instance was Started Last Time?</strong><br />
<pre class="crayon-plain-tag">SELECT sqlserver_start_time FROM sys.dm_os_sys_info</pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-6)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 14 Jul 2016 20:59:17 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[browser service]]></category>
		<category><![CDATA[cloud computing]]></category>
		<category><![CDATA[collation]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[model database]]></category>
		<category><![CDATA[msdtc]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[udp port]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3335</guid>

					<description><![CDATA[What is the main role of Model Database in SQL Server? The model database, as its name implies, serves as the model (or template) for all databases created on the same instance. If the model database is modified, all subsequent databases created on that instance will pick up those changes, but earlier created databases will [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-6%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-model-database-collation-msdtc-udp-browser-service-day-6/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-6)"></a></p><p><strong>What is the main role of Model Database in SQL Server?</strong></p>
<blockquote><p>The model database, as its name implies, serves as the model (or template) for all databases created on the same instance. If the model database is modified, all subsequent databases created on that instance will pick up those changes, but earlier created databases will not. Note that TEMPDB is also created from model every time SQL Server starts up.</p></blockquote>
<p><strong>What is a collation in SQL Server?</strong></p>
<blockquote><p>Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.</p></blockquote>
<p><strong>What is Use of @@ SPID in SQL Server?</strong></p>
<blockquote><p>A SPID is the returns sessions ID of the current user process. And using that session ID, we can find out that the last query was executed.</p></blockquote>
<p><strong>What is cloud computing?</strong></p>
<blockquote><p>Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction.</p></blockquote>
<p><strong>How do I rename my SQL Server instance?</strong></p>
<blockquote><p>SQL Server doesn&#8217;t support renaming the instance name directly so you can uninstall the existed instance and install it with the new name and change the computer name and rename the part of the instance name that corresponds to the computer name.</p></blockquote>
<p><strong>How do I store data in multiple languages within one database?</strong></p>
<blockquote><p>The easiest way to manage character data in international databases is to always use the Unicode nchar, nvarchar, and nvarchar(max) data types, instead of their non-Unicode equivalents, char, varchar, and text. Unicode is a standard for mapping code points to characters.</p></blockquote>
<p><strong>How do I configure SQL Server to enable distributed transactions via Linked Server?</strong></p>
<blockquote><p>To enable distributed transactions across different servers, you need to configure MS DTC on both servers and some of your SQL Server server options.</p>
<p>Please run &#8220;services.msc&#8221; from windows run dialog to check DTC service is running or not.</p>
<p>Please make sure this service could access the network and could receive connection from other server.</p>
<p>Please enable the XACT_ABORT.</p></blockquote>
<p><strong>What is recompilation?</strong></p>
<blockquote><p>When the cached execution plan for a query cannot be used so the procedure recompiles.</p></blockquote>
<p><strong>How do I configure Windows Firewall to allow remote connections using TCP/IP protocol for SQL Server?</strong></p>
<blockquote><p>On the server on which SQL Server runs, we need to find out which ports that SQL Server is listening and add which to Windows Firewall Inbound Exceptions.</p>
<p>Firstly, we need to add TCP port on which SQL Server service is listening to the Windows Firewall Inbound Exceptions so that the client can make connections to SQL Server over Windows Firewall.</p>
<p>Secondly, if we do not specify TCP port in the connection string and SQL Server is not listening on the TCP 1433 port, we need to add UDP 1434 port on which SQL Server Browser Services is listening to the Windows Firewall Inbound Exceptions.</p></blockquote>
<p><strong>What is parallelism?</strong></p>
<blockquote><p>SQL Server can perform a query or index operation in parallel by using several operating system threads, the operation can be completed quickly. When a single query runs of multiple CPUs is known as query parallelism.</p></blockquote>
<p><strong>What is the default query threshold for parallelism?</strong></p>
<blockquote><p>The query optimizer decides to utilize multiple SPIDS running on different processors to query / transfer data. Default threshold is 5 seconds.</p></blockquote>
<p><strong>How to start the SQL Server with minimal configuration?</strong></p>
<blockquote><p>If there are any configuration problems that prevent the server from starting, you can start an instance of Microsoft SQL Server by using the minimal configuration startup option. This is the startup option -f.  Starting an instance of SQL Server with minimal configuration automatically puts the server in single-user mode.</p></blockquote>
<p><strong>What is auto close option?</strong></p>
<blockquote><p>AUTO CLOSE option:</p>
<p>When set to ON, the database is shut down cleanly and its resources are freed after the last user exits. The database automatically reopens when a user tries to use the database again.</p>
<p>When set to OFF, the database remains open after the last user exits.</p></blockquote>
<p><strong>What do you know about the MSDTC service?</strong></p>
<blockquote><p>MSDTC (aka Microsoft Distributed Transaction Control) is a piece of software which a lot of people use, but they don&#8217;t really know what it does, or how it works. MSDTC is used by SQL Server and other applications when they want to make a distributed transaction between more than one machine.</p></blockquote>
<p><strong>What do you know about the port UDP 1434?</strong></p>
<blockquote><p>UDP port 1434 is used for SQL Server named instances. The SQL Server Browser service listens on this port for incoming connections to a named instance. The service then responds to the client with the TCP port number for the requested named instance.</p></blockquote>
<p><strong>What do you know about the SQL Server Browser Service?</strong></p>
<blockquote><p>While commonly thought of as “one of those other SQL Server services”, life without the SQL Server Browser Service would be a bit more of a hassle. Its main purpose is to aid in the detection of SQL Server instances and provide information necessary for connecting to them.  It listens on UDP port 1434 and returns port numbers and version information for requested instances on a machine.</p>
<p>When a user connects to the default instance, the connection is passed to TCP 1433 automatically.  When connecting to a named instance and the port number is unknown, the first connection made is to the Browser Service at UDP 1434, which then returns the proper port number on which to initiate the TCP connection.</p></blockquote>
<p><strong>What is the Instance-aware and Instance-unaware services in SQL Server?</strong></p>
<p>Instance-aware services are associated with a specific instance of SQL Server.</p>
<ul>
<li>SQL Server</li>
<li>SQL Server Agent</li>
<li>Analysis Services</li>
<li>Reporting Services</li>
<li>Full-text search</li>
</ul>
<p>Instance-unaware services are shared among all installed SQL Server instances.</p>
<ul>
<li>Integration Services</li>
<li>SQL Server Browser</li>
<li>SQL Server Active Directory Helper</li>
<li>SQL Writer</li>
</ul>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-5)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 13 Jul 2016 20:42:03 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database offline]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[dynamic management views]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[sql azure]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2014]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3332</guid>

					<description><![CDATA[List out Dynamic Management Views (DMV&#8217;s) and the value that they provide to developers or DBAs. dm_tran_locks &#8211; Locking and blocking. dm_clr_loaded_assemblies &#8211; Assemblies in available in SQL Server. dm_db_file_space_usage &#8211; Database file usage to determine if databases are getting low on space and need immediate attention. dm_exec_cached_plans &#8211; Cached query plans available to SQL [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-5%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-dmv-ssis-sql-azure-offline-database-day-5/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-5)"></a></p><p><strong>List out Dynamic Management Views (DMV&#8217;s) and the value that they provide to developers or DBAs.</strong></p>
<ul>
<li>dm_tran_locks &#8211; Locking and blocking.</li>
<li>dm_clr_loaded_assemblies &#8211; Assemblies in available in SQL Server.</li>
<li>dm_db_file_space_usage &#8211; Database file usage to determine if databases are getting low on space and need immediate attention.</li>
<li>dm_exec_cached_plans &#8211; Cached query plans available to SQL Server.</li>
<li>dm_exec_sessions &#8211; Sessions in SQL Server.</li>
<li>dm_exec_connections &#8211; Connections to SQL Server.</li>
<li>dm_db_index_usage_stats &#8211; Seeks, scans, lookups per index.</li>
<li>dm_io_virtual_file_stats &#8211; IO statistics for databases and log files.</li>
<li>dm_broker_connections &#8211; Service Broker connections to the network.</li>
<li>dm_os_memory_objects &#8211; SQL Server memory usage sys.dm_tran_active_transactions &#8211; Transaction state for an instance of SQL Server.</li>
</ul>
<p><strong>Please explain the relationship between logins and users in the system and user databases.</strong></p>
<blockquote><p>Logins &#8211; All logins reside in the master database</p>
<p>Users &#8211; All users reside in the master database, other system databases and in the user defined databases.</p></blockquote>
<p><strong>Briefly explain the purpose of SQL Server Integration Services (SSIS)?</strong></p>
<blockquote><p>SQL Server Integration Services (SSIS) is a platform for data integration and workflow applications. It was first introduced with SQL Server 2005 replacement for Data Transformation Service (DTS). You build extraction, transformation, and load (ETL) packages with SSIS that extract, transform, and load data. A package is an SSIS object that defines the data source, transformation, and data destination used to integrate data from diverse data sources.</p>
<p>SSIS supports a variety of formats that you can use as the data source when you import data. These formats include: Microsoft Excel, Flat files, OLE-DB data sources, XML data sources etc. SSIS also supports SQL Server and these formats as data destination formats.</p></blockquote>
<p><strong>You have a default instance for SQL Server 2012 running on one computer. You install SQL Server 2014 on a different computer. You want to migrate the user databases from SQL Server 2012 to SQL Server 2014. What should you do?</strong></p>
<blockquote><p>You should register the SQL Server 2012 instance in SQL Server 2014 Management Studio and use the Copy Database Wizard to migrate the database.</p></blockquote>
<p><strong>You are upgrading a default instance of SQL Server 2012 to SQL Server 2014. What will be used as the SQL Server service account?</strong></p>
<blockquote><p>The service account specified for the SQL Server 2012 instance will be used as the SQL Server 2014 service account.</p></blockquote>
<p><strong>If you encounter this kind of an error message, what you need to look into to solve this problem?</strong></p>
<p><strong>[Microsoft][ODBC SQL Server Driver][Named Pipes]Specified SQL Server not found.</strong></p>
<blockquote><p>Check if MS SQL Server service is running on the computer you are trying to log into.</p>
<p>Check on Client Configuration utility. Client and Server have to in sync.</p></blockquote>
<p><strong>What kind of LAN types do you know?</strong></p>
<blockquote><p>Ethernet networks and token ring networks.</p></blockquote>
<p><strong>What is SQL Azure?</strong></p>
<blockquote><p>SQL Azure is a cloud based relational database as a Service offered by Microsoft. Conceptually it is SQL server in the cloud.</p></blockquote>
<p><strong>How can we migrate from SQL server to SQL Azure?</strong></p>
<blockquote><p>For Data Migration, we can use BCP or SSIS. And for schema Migration we can use Generate Script Wizard. Also, we could use a Tool called SQL Azure migration wizard available on codeplex.</p></blockquote>
<p><strong>What is the system function to get the current user’s user id?</strong></p>
<blockquote><p>USER_ID(). Also check out other system functions like USER_NAME(), SYSTEM_USER, SESSION_USER, CURRENT_USER, USER, SUSER_SID(), HOST_NAME().</p></blockquote>
<p><strong>What are the built-ins used for processing rows?</strong></p>
<ul>
<li>Get_group_row_count(function)</li>
<li>Get_group_selection_count(function)</li>
<li>Get_group_selection(function)</li>
<li>Reset_group_selection(procedure)</li>
<li>Set_group_selection(procedure)</li>
<li>Unset_group_selection(procedure)</li>
</ul>
<p><strong>How many files can a Database contain in SQL Server?</strong></p>
<blockquote><p>A Database can contain a maximum of 32,767 files.</p></blockquote>
<p><strong>How do I troubleshoot SQL Server connectivity issues?</strong></p>
<ul>
<li>Check your SQL Server Error log to make sure that it enables TCP/IP protocol and establish the listening on a specific TCP port.</li>
<li>Enable TCP/IP protocol if you could not find the message in the Error Log.</li>
<li>Check firewall if you cannot telnet to the specific TCP port.</li>
<li>Ensure that the TCP port on which SQL Server is listening has been put into the exceptions of your firewall.</li>
</ul>
<p><strong>What is the maximum limit of SQL Server instances for a standalone computer?</strong></p>
<blockquote><p>50 instances on a stand-alone server for all SQL Server editions. SQL Server supports 25 instances on a failover cluster.</p></blockquote>
<p><strong>Why did a T-SQL script fail to run a job when it could successfully run in SQL Server Management Studio ?</strong></p>
<blockquote><p>If the SQL Server Agent Service account is different from the login account and if it does not have enough permission to execute the query, the job will fail.</p>
<p>You can simply give the SQL Server Agent Service account permissions to execute the query, this is not the best way from a security perspective. For SQL Server Agent Service account, it is recommended to give it the least amount of privileges.</p></blockquote>
<p><strong>How can I degrade a SQL Server database from a higher version to a lower one?</strong></p>
<blockquote><p>Yes, degrading a SQL Server database is not supported, but you can use a flexible workaround to resolve this issue. You can use SQL Server Management Studio to first generate scripts for a lower ersion and then use Data Import/Export Wizard to transfer data.</p></blockquote>
<p><strong>What is the difference between dropping a database and taking a database offline?</strong></p>
<blockquote><p>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.</p>
<p>When you take a database offline, you the database is not available for users, it is not deleted physically, it can be brought back online.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-4)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 12 Jul 2016 19:10:08 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[.NET CLR]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[bound connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[login & principal]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[single user mode]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[vss writer]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3330</guid>

					<description><![CDATA[What is Network Packet Size in SQL? NPS(Network Packet Size) is the size of the TDS (tabular data stream) packets used to communicate between your applications and your relational database engine and default packet size is 4 kilobytes and its manily depends on network packet size configuration option. How do I resolve ‘SQL Server Setup [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-4%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-osql-single-user-mode-assembly-vss-writer-day-4/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-4)"></a></p><p><strong>What is Network Packet Size in SQL?</strong></p>
<blockquote><p>NPS(Network Packet Size) is the size of the TDS (tabular data stream) packets used to communicate between your applications and your relational database engine and default packet size is 4 kilobytes and its manily depends on network packet size configuration option.</p></blockquote>
<p><strong>How do I resolve ‘SQL Server Setup cannot valid the service accounts’ error message during the setup?</strong></p>
<blockquote><p>The error message typically happens when you use domain accounts as service account. If the Activity Directory Service (ADS) is not available currently, so the setup cannot valid the domain accounts you specify.</p></blockquote>
<p><strong>What is difference between OSQL and Query Analyzer ?</strong></p>
<blockquote><p>Both are the same but there is little difference OSQL is command line tool which is execute query and display the result same a query analyzer but query analyzer is graphical and OSQL.</p>
<p>OSQL have not ability like query analyzer to analyze queries and show static on speed of execution and other useful thing about OSQL is that its helps in scheduling.</p></blockquote>
<p><strong>How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?</strong></p>
<blockquote><p>SQL Server can be started from command line, using the SQLSERVR.EXE. This EXE has some very important parameters with which a DBA should be familiar with. -m is used for starting SQL is a command line tool. Server in single user mode and -f is used to start the SQL Server in minimal configuration mode.</p></blockquote>
<p><strong>What is the use of the Public database role in SQL Server?</strong></p>
<blockquote><p>Every database user belongs to the public database role. When a user has not been granted or denied specific permissions on a securable, the user inherits the permissions granted to public on that securable.</p></blockquote>
<p><strong>Explain Certificate based SQL Server Logins/Principals?</strong></p>
<blockquote><p>Server principals with names enclosed by double hash marks (##) are for internal system use only. The following principals are created from certificates when SQL Server is installed, and should not be deleted.</p>
<ul>
<li>##MS_SQLResourceSigningCertificate##</li>
<li>##MS_SQLReplicationSigningCertificate##</li>
<li>##MS_SQLAuthenticatorCertificate##</li>
<li>##MS_AgentSigningCertificate##</li>
<li>##MS_PolicyEventProcessingLogin##</li>
<li>##MS_PolicySigningCertificate##</li>
<li>##MS_PolicyTsqlExecutionLogin##</li>
</ul>
</blockquote>
<p><strong>What are steps to load a .NET code in SQL SERVER ?</strong></p>
<blockquote><p>Write the managed code and compile it to a DLL/Assembly.</p>
<p>After the DLL is compiled using the “CREATE ASSEMBLY” command you can load the assemby into SQL SERVER. Below is the create command which is loading “mycode.dll” into SQL SERVER using the “CREATE ASSEMBLY” command.</p>
<p>CREATE ASSEMBLY AssemblyName FROM ‘C:/MyAssmbly.dll’</p></blockquote>
<p><strong>How can we drop an assembly from SQL SERVER?</strong></p>
<blockquote><p>DROP ASSEMBLY AssemblyName</p></blockquote>
<p><strong>Are changes made to assembly updated automatically in database?</strong></p>
<blockquote><p>No: it will not synchronize the code automatically. For that you have to drop the assembly (Using DROP ASSEMBLY) and create (Using the CREATE ASSEMBLY again).</p></blockquote>
<p><strong>If I want to see which files are linked with which assemblies?</strong></p>
<blockquote><p>Use sys.Assemblies_files system tables have the track about which files are associated with what assemblies.</p></blockquote>
<p><strong>Does .NET CLR and SQL SERVER run in different process?</strong></p>
<blockquote><p>.NET CLR engine (hence all the .NET applications) and SQL SERVER run in the same process or address space. This “Same address space architecture” is implemeted so that there no speed issues. If the architecture was implemented the other way (i.e. SQL SERVER and .NET CLR engine running in different memory process area) there would have been reasonable speed issue.</p></blockquote>
<p><strong>What is SQL Server VSS Writer?</strong></p>
<blockquote><p>The SQL Writer Service provides added functionality for backup and restore of SQL Server through the Volume Shadow Copy Service framework. When running, Database Engine locks and has exclusive access to the data files.</p>
<p>When the SQL Writer Service is not running, backup programs running in Windows do not have access to the data files, and backups must be performed using SQL Server backup.</p>
<p>Use the SQL Writer Service to permit Windows backup programs to copy SQL Server data files while SQL Server is running. It must be running when the Volume Shadow Copy Service (VSS) application requests a backup or restore. To configure the service, use the Microsoft Windows Services applet. The SQL Writer Service installs on all operating systems.</p></blockquote>
<p><strong>What issues SQL Server Upgrade Advisor helps you to identify that might affect your upgrade to latest version of SQL Server?</strong></p>
<blockquote><p>SQL Server Upgrade Advisor can help identify key issues that might affect your upgrade, such as deprecated or discontinued features, breaking changes and behaviour changes.</p></blockquote>
<p><strong>What is the quickest way to identify the cause of SQL Server Installation failures?</strong></p>
<blockquote><p>You can do that by reviewing the summary log files and individual component log files. If you review the summary log file and find installation errors, you should review the specific log file for that component for more information.</p></blockquote>
<p><strong>Briefly explain the purpose of SQL Server Reporting Services (SSRS)</strong></p>
<blockquote><p>You create reports that include content from a variety of data sources, including relational databases and OLAP databases with SQL Server Reporting Services (SSRS). You can format the reports on-demand by using a variety of formats, including Microsoft Excel, HTML, and PDF.</p>
<p>You can generate ad hoc (on-the-fly) reports or schedule them for recurring distribution. The primary tools you use to create reports are Report Builder and SQL Server Data Tools (SSDT) – Report Designer.</p></blockquote>
<p><strong>What is the purpose of SQL Server Full-Text Search Service?</strong></p>
<blockquote><p>You can query for words and phrases in columns in the database with SQL Server Full-Text Search. You can search for multiple forms of a word. SQL Server Full-Text Search is implemented by the SQL Server Database Engine.</p></blockquote>
<p><strong>What is Bound Connection?</strong></p>
<blockquote><p>Bound connections allow two or more connections to share the same transaction and locks. Bound connections can work on the same data without lock conflicts.</p>
<p>Bound connections can be created from multiple connections within the same application, or from multiple applications with separate connections. Bound connections make coordinating actions across multiple connections easier.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>SQL Server Database Administrator Interview Questions and Answers (Day-3)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3/</link>
					<comments>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 11 Jul 2016 19:57:20 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[authentication mode]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database administrator]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[lock page in memory]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[Shrink]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[sql server latches]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[sql server profiler]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3325</guid>

					<description><![CDATA[What is SQL Profiler? Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services. You can capture and save data about each event to a file or table to analyze later. Use SQL Profiler to monitor only the events in which you [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&amp;linkname=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3%2F&#038;title=SQL%20Server%20Database%20Administrator%20Interview%20Questions%20and%20Answers%20%28Day-3%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3/" data-a2a-title="SQL Server Database Administrator Interview Questions and Answers (Day-3)"></a></p><p><strong>What is SQL Profiler?</strong></p>
<blockquote><p>Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services. You can capture and save data about each event to a file or table to analyze later.</p>
<p>Use SQL Profiler to monitor only the events in which you are interested.</p>
<p>If traces are becoming too large, you can filter them based on the information you want, so that only a subset of the event data is collected.</p>
<p>Monitoring too many events adds overhead to the server and the monitoring process and can cause the trace file or trace table to grow very large, especially when the monitoring process takes place over a long period of time.</p></blockquote>
<p><strong>What is Builtin/Administrator?</strong></p>
<blockquote><p>The Builtin/Administrator account is basically used during some setup to join some machine in the domain. It should be disabled immediately thereafter. For any disaster recovery, the account will be automatically enabled. It should not be used for normal operations.</p></blockquote>
<p><strong>How can SQL Server instances be hidden?</strong></p>
<blockquote><p>To hide a SQL Server instance, we need to make a change in SQL Server Configuration Manager. To do this launch SQL Server Configuration Manager and do the following: select the instance of SQL Server, right click and select Properties.</p>
<p>After selecting properties you will just set Hide Instance to “Yes” and click OK or Apply. After the change is made, you need to restart the instance of SQL Server to not expose the name of the instance.</p></blockquote>
<p><strong>What are the authentication modes in SQL Server? How can it be changed?</strong></p>
<blockquote><p>Windows mode and Mixed Mode &#8211; SQL and Windows. To change authentication mode in SQL Server click Start, Programs, Microsoft SQL Server and click SQL Enterprise Manager to run SQL Enterprise Manager from the Microsoft SQL Server program group. Select the server then from the Tools menu select SQL Server Configuration Properties, and choose the Security page.</p></blockquote>
<p><strong>How can we check whether the port number is connecting or not on a Server?</strong></p>
<blockquote><p>TELNET [HOSTNAME] PORTNUMBER</p></blockquote>
<p><strong>Can we uninstall/rollback a service packs from SQL Server?</strong></p>
<blockquote><p>No: To rollback a SP you have to uninstall entire product and reinstall it.</p></blockquote>
<p><strong>What do you know about the Hotfixes?</strong></p>
<blockquote><p>Hotfixs are software pathces that were applied to live i.e. still running systems. A hotfix is a single, cumulative package that includes one or more filfes that are used to address a problem in a software product.</p></blockquote>
<p><strong>Why shrinking of database is bad in SQL Server?</strong></p>
<blockquote><p>Shrinking a database increases fragmentation which causes performance problems.</p>
<p>I talked about how databases are like boxes being filled with content every day. As the box gets filled, the amount of free space decreases. But if you know that you will need to fill it up with more content, wouldn’t you go get a bigger box? Sadly, that’s not what we’re doing when we’re shrinking databases.</p>
<p>We’re basically throwing away the box with free space to replace it with a smaller box with just enough space to keep all of the existing content. Imagine what you would do to accomplish this task – empty the box of its contents, throw away the box, replace it with a smaller box and put the contents back in.</p></blockquote>
<p><strong>Can we install SQL Server using a configure file?</strong></p>
<blockquote><p>Yes: We can prepare a configuration file. While installing SQL Server the path to the configuration file is specified in the “Ready to Install” page in the configuration file path section.</p></blockquote>
<p><strong>Which Dynamic memory view is used to check memory usage by SQL Server?</strong></p>
<blockquote><p>We can use this view sys.dm_os_process_memory.</p></blockquote>
<p><strong>What do you know about the Lock Page in Memory?</strong></p>
<blockquote><p>Lock Pages in Memory is a setting that can be set on 64-bit operating systems that essentially tell Windows not to swap out SQL Server memory to disk. By default, this setting is turned off on 64-bit systems.</p></blockquote>
<p><strong>What do you know about the SQL Server Latches?</strong></p>
<ul>
<li>A latch is used to cordinate the physical execution of multiple threads within a database.</li>
<li>A latch is a lightweight synchronization object used by the Storage Engine to protect memory structures used internally by SQL Server. A latch is nothing more than a so-called Critical Section in multi-threaded programming.</li>
<li>For row-level locking it was very important to introduce a concept like latching, because otherwise it would give rise to phenomena like Lost Updates in memory.</li>
</ul>
<p><strong>What are the different types of Lathces in SQL Server?</strong></p>
<ul>
<li>IO Latches</li>
<li>Buffer Latches (BUF)</li>
<li>Non-Buffer Latches (Non-BUF)</li>
</ul>
<p><strong>Can DBA control or manage the SQL Server Latches?</strong></p>
<blockquote><p>No: It is not possible, It&#8217;s internally manage by the SQL Server. We can just check the different statuses of latches.</p></blockquote>
<p><strong>What is a User Database?</strong></p>
<blockquote><p>A user database is a database that we create to store data and start working with  the data.</p></blockquote>
<p><strong>Why is all of the memory allocated for SQL Server not shown in Windows Task Manager?</strong></p>
<blockquote><p>The&#8221; Mem Usage&#8221; column shows the amount of memory for the working se t. The working set of a process is the set of pages in the virtual address space of the process that are currently resident in physical memory.</p>
<p>To find out how much memory SQL Server has allocated through the AWE mechanism, you can use the sys.dm_os_memory_clerks DMV.</p></blockquote>
<p><strong>Which autogrowth database setting is good?</strong></p>
<blockquote><p>Setting an autogrowth in multiples of MB is a better option than setting autogrowth in percentage (%).</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/07/sql-server-database-administrator-interview-questions-and-answers-day-sql-profiler-authentication-mode-shrink-lock-page-latches-3/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-3)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/</link>
					<comments>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 07 Jul 2016 18:33:52 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[restoring mode]]></category>
		<category><![CDATA[sp_resolve_logins]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[standby mode]]></category>
		<category><![CDATA[TSQL]]></category>
		<category><![CDATA[tuf file]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3251</guid>

					<description><![CDATA[Does the secondary instance need to be licensed? I am not the licensing police, and I am not Microsoft – check with your licensing representative to clarify your exact situation. Generally, you can have one warm standby server. However, the second someone starts using it for reporting, testing, or anything else, you need to license [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-3%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-3)"></a></p><p><strong>Does the secondary instance need to be licensed?</strong></p>
<blockquote><p>I am not the licensing police, and I am not Microsoft – check with your licensing representative to clarify your exact situation. Generally, you can have one warm standby server. However, the second someone starts using it for reporting, testing, or anything else, you need to license it like any other server.</p></blockquote>
<p><strong>When log shipping is set up, Agent jobs are created to alert me if a backup, copy, or restore fails. How do I get notified?</strong></p>
<blockquote><p>You need to go into the Agent job, pull up Notifications, and choose your method – email an operator, or write to the event log, for example.</p></blockquote>
<p><strong>Are my logins shipped from the primary to the secondary?</strong></p>
<blockquote><p>No, they are not. You’ll need to set up a separate method to sync the logins.</p></blockquote>
<p><strong>What is the difference between the secondary being in Restoring vs. Standby?</strong></p>
<blockquote><p>Restoring means the database is not accessible. Standby means it is read-only. You make this decision when you set up the log shipping.</p>
<p>If the database is in Standby mode, users can query it – except when a log backup is being restored. You need to decide if a restore job will disconnect users, or if the restore is delayed until after the users are disconnected.</p></blockquote>
<p><strong>Can we configure log shipping if the SQL server service account is running under local system account?</strong></p>
<blockquote><p>Yes:If the SQL Server service account is running under the local system account on the primary server, you must create the backup folder on the primary server and specify the local path to that folder here. The SQL Server service account of the primary server instance must have Read and Write permissions on this folder.</p></blockquote>
<p><strong>What happens to the log shipping in case if you have added the data file on the primary server ?</strong></p>
<blockquote><p>If both primary &amp; secondary servers as same Disk configuration settings then you can ignore &amp; secondary will takes up, how ever if you changed anything at the Primary side for ex-&gt;you have created the folder &amp; added the folder or you have added to any other drive then you have to restore the Next trn backup (i,e after adding the data file) with MOVE option.</p></blockquote>
<p><strong>Does index operation logging in log shipping?</strong></p>
<blockquote><p>Yes: It is fully logged operation so it will replicate on secondary as well.</p></blockquote>
<p><strong>May I shrink the log files of Primary Database?</strong></p>
<blockquote><p>Yes, you can shrink the log files but make sure that before it copied into Secondary Database.</p></blockquote>
<p><strong>What do you know about the TUF file?</strong></p>
<blockquote><p>TUF stands for -&gt;T -&gt;Transaction  U-&gt;Undo  F-&gt;File  so it is Transaction Undo file.</p>
<p>It contains the Modification that were not committed on the Primary database when the Transaction log backup was in progress and when the log was restored to another database…so at some point of time when the next trn restored on the secondary side then SQL server uses the data from the Undo file and it starts restoring the Incomplete transactions.</p></blockquote>
<p><strong>My Tuf file deleted unfortunate when the server was shutdown or during the server down time then what will happens to the logshipping?</strong></p>
<blockquote><p>The log shipping will not work, Incase if you have OS level Backup then you can restore the file then you can be cool.</p></blockquote>
<p><strong>Can we configure Log Shipping between the different domains?</strong></p>
<blockquote><p>Yes, we can configure Log Shipping on the server residing in different domains.</p></blockquote>
<p><strong>After some disk issues at the production server the logshipping continually failed. So I tried a full back up the primary database and restored the secondary database with this full  backup and started the log shipping again. And the logshipping backup of the primary database failed with the error message below:</strong></p>
<p><strong>*** Error: BACKUP detected corruption in the database log. Check the errorlog for more information.</strong></p>
<p><strong>BACKUP LOG is terminating abnormally.</strong></p>
<ul>
<li>Stop all user activity in the primary database.</li>
<li>Switch to the SIMPLE recovery model (breaking the log backup chain and removing the requirement that the damaged portion of log must be backed up).</li>
<li>Switch to the FULL recovery model.</li>
<li>Take a full database backup (thus starting a new log backup chain).</li>
<li>Start the logshipping job.</li>
</ul>
<p><strong>Does the file name first_file_000000000000.trn indicate that the copy or restore job was unsuccessful?</strong></p>
<blockquote><p>Each run of the copy and restore job is associated with at least one file. By default, if no files are copied or restored in a certain run of any of these two jobs, SQL Server places first_file_000000000000.trn in the file name field. This may or may not indicate a problem.</p></blockquote>
<p><strong>Does the sp_resolve_logins stored procedure work for remote logins in SQL Server?</strong></p>
<blockquote><p>No: The sp_resolve_logins stored procedure only works for typical logins. Any remote logins must be created manually on the secondary server.</p></blockquote>
<p><strong>Why is the log shipping check box sometimes dimmed in the Maintenance Plan dialog box?</strong></p>
<ul>
<li>Multiple databases might be selected for the Maintenance Plan.</li>
<li>The database that is selected is not in the Full or Bulk Logged Recovery model.</li>
<li>SQL Server Enterprise Edition is not installed on the server.</li>
</ul>
<p><strong>Can I configure primary and secondary servers to use SQL authentication to connect to the monitor server?</strong></p>
<blockquote><p>Yes. It is possible to use either Windows or SQL authentication for primary and secondary servers to connect to the monitor server.</p></blockquote>
<p><strong>Why backup job failed on Primary server and thrown below error messages?</strong></p>
<p><strong>*** Error: Backup failed for Server ‘&lt;Server Name&gt;’. (Microsoft.SqlServer.SmoExtended) ***</strong></p>
<p><strong>*** Error: An exception occurred while executing a Transact-SQL statement or batch.(Microsoft.SqlServer.ConnectionInfo) ***</strong></p>
<p><strong> *** Error: BACKUP LOG cannot be performed because there is no current database backup.</strong></p>
<blockquote><p>This message is thrown because the database is never backed up fully before. Do a full backup of the primary database to solve this issue.</p></blockquote>
<p><strong>What does sp_resolve_logins do?</strong></p>
<blockquote><p>At the time of the log shipping role change, the sp_resolve_logins stored procedure requires a BCP file of the syslogins system table from the primary server. This stored procedure loads the BCP file into the temporary table and loops through each login to verify if a login with the same name exists in the secondary server&#8217;s syslogins system table.</p>
<p>Execution of this stored procedure is required only if there are new logins created on the primary server after log shipping has been initialized and those same logins are not created on the secondary servers with the same SID.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-restoring-standby-mode-tuf-file-sp_resolve_logins-day-3/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Database Log Shipping Interview Questions and Answers (Day-2)</title>
		<link>https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 06 Jul 2016 19:54:37 +0000</pubDate>
				<category><![CDATA[SQL Server Interview]]></category>
		<category><![CDATA[answers]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[log shipping]]></category>
		<category><![CDATA[primary server]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[secondary server]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tunning]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[swap role]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3247</guid>

					<description><![CDATA[What are your basic prerequisites for configuring Log Shipping? Check SQL Server edition which supports Log Shipping. The servers involved in log shipping should have the same case-sensitivity settings. The databases in a log shipping configuration must use the full recovery model or bulk-logged recovery model. How to monitor the Log Shipping configurations and operations? [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&amp;linkname=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F07%2Fsql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2%2F&#038;title=SQL%20Server%3A%20Database%20Log%20Shipping%20Interview%20Questions%20and%20Answers%20%28Day-2%29" data-a2a-url="https://www.dbrnd.com/2016/07/sql-server-database-log-shipping-interview-questions-and-answers-swap-role-primary-secondary-server-manage-fail-over-day-2/" data-a2a-title="SQL Server: Database Log Shipping Interview Questions and Answers (Day-2)"></a></p><p><strong>What are your basic prerequisites for configuring Log Shipping?</strong></p>
<ul>
<li>Check SQL Server edition which supports Log Shipping.</li>
<li>The servers involved in log shipping should have the same case-sensitivity settings.</li>
<li>The databases in a log shipping configuration must use the full recovery model or bulk-logged recovery model.</li>
</ul>
<p><strong>How to monitor the Log Shipping configurations and operations?</strong></p>
<blockquote><p>We can use sp_help_log_shipping_monitor system stored procedure to monitor basic thing about the Log Shipping.</p></blockquote>
<p><strong>How to display the Transaction Log Shipping Status report on a server instance?</strong></p>
<blockquote><p>Connect to a monitor server, primary server, or secondary server.</p>
<p>Right-click the server instance in Object Explorer, point to Reports, and point to Standard Reports.</p>
<p>Click Transaction Log Shipping Status.</p></blockquote>
<p><strong>Which are the basic system tables to track the information about the Log Shipping?</strong></p>
<ul>
<li>log_shipping_monitor_alert</li>
<li>log_shipping_monitor_error_detail</li>
<li>log_shipping_monitor_history_detail</li>
<li>log_shipping_monitor_primary</li>
<li>log_shipping_monitor_secondary</li>
</ul>
<p><strong>Which permission is requireD to enable a Log Shipping?</strong></p>
<blockquote><p>You must be a sysadmin on each server instance to enable log shipping.</p></blockquote>
<p><strong>When Primary instance failed, we require fail-over management so during this exercise what is our big problem to enable a Secondary Instance for further operation?</strong></p>
<blockquote><p>Typically, the primary and secondary databases are unsynchronized, because the primary database continues to be updated after its latest backup job. Also, in some cases, recent transaction log backups have not been copied to the secondary server instances, or some copied log backups might still not have been applied to the secondary database.</p></blockquote>
<p><strong>What are your basic steps to perform Fail-over Secondary server in Log Shipping, when Primary Server fails?</strong></p>
<ul>
<li>Take the Tail of Log from Primary server if possible.</li>
<li>Restore Tail of log into all Secondary Database.</li>
<li>Remove Log-shipping configuration from Primary Server.</li>
<li>Select any one of Secondary server and bring into online with Alter Database DBName set Online.</li>
<li>Right click on Primary Database and Generate script for Users and Logins.</li>
<li>Then move the script to Secondary server to create Users and Logins.</li>
<li>Re-configure log shipping from New Server (Secondary server).</li>
</ul>
<p><strong>How we can swap the role between Primary Server and Secondary Server?</strong></p>
<ul>
<li>Bring the secondary database online, backing up the transaction log on the primary server with NORECOVERY.</li>
<li>Disable the log shipping backup job on the original primary server, and the copy and restore jobs on the original secondary server.</li>
<li>Enable the log shipping backup job on the secondary server (the new primary server), and the copy and restore jobs on the primary server (the new secondary server).</li>
</ul>
<p><strong>I want to know drop a database which is a part of Log Shipping, How it is possible?</strong></p>
<blockquote><p>If you are planning to delete a database that is part of a log shipping configuration, remove log shipping first.</p>
<p>You can remove log shipping from a primary database by disabling it in SQL Server Management Studio or by using the log shipping Transact-SQL stored procedures. When you remove log shipping from a database, all log shipping related jobs and schedules will be removed, along with log shipping history and error information. The databases themselves on both the primary and secondary servers will not be changed.</p></blockquote>
<p><strong>Which stored procedures used to remove a secondary database in Log Shipping?</strong></p>
<blockquote><p>On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.</p>
<p>On the secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.</p></blockquote>
<p><strong>Which stored procedures used to remove a Log Shipping?</strong></p>
<blockquote><p>On the primary server, execute sp_delete_log_shipping_primary_secondary to delete the information about the secondary database from the primary server.</p>
<p>On the secondary server, execute sp_delete_log_shipping_secondary_database to delete the secondary database.</p>
<p>On the primary server, execute sp_delete_log_shipping_primary_database to delete information about the log shipping configuration from the primary server. This also deletes the backup job.</p>
<p>Delete the secondary database from the secondary server if desired.</p></blockquote>
<p><strong>I want to perform migration of high availability Log Shipping to Always On Availability Group. </strong><strong>What are the prerequisites for Log Shipping?</strong></p>
<ul>
<li>The log shipping primary database must reside on the instance of SQL Server that hosts the initial/current primary replica of the availability group.</li>
<li>For a given log shipping secondary database to be converted to an Always On secondary database, it must:</li>
<li>Use the same name as the primary database.</li>
<li>Reside on a server instance that hosts a secondary replica for the availability group.</li>
<li>Once the backup job has run on the primary database, disable the backup job, and once the restore job has run on a given secondary database, disable the restore job.</li>
<li>After you have created all the secondary databases for the availability group, if you want to perform backups on secondary replicas, you need to re-configure the automated backup preference of the availability group.</li>
</ul>
<p><strong>How can I continue to log ship to the former primary server without restoring a database backup?</strong></p>
<blockquote><p>It is possible to log ship between two servers repeatedly without having to restore the complete database backup. The requirement is that both the primary and secondary servers are available when you perform the role change procedure.</p></blockquote>
<p><strong>What do you know about the Error Message 14421?</strong></p>
<blockquote><p>Message 14421 does not necessarily indicate a problem with Log Shipping. This message indicates that the difference between the last backed up file and last restored file is greater than the time selected for the Out of Sync Alert threshold.</p></blockquote>
<p><strong>What do you know about the Error Message 14420?</strong></p>
<blockquote><p>Message 14420 does not necessarily indicate a problem with log shipping. The message indicates that the difference between the last backed up file and current time on the monitor server is greater than the time that is set for the Backup Alert threshold.</p></blockquote>
<p><strong>Logshipping primary database backup job failed with the following error:</strong></p>
<p><strong> *** Error: Cannot open backup device ‘\\..\BACKUP LOG is terminating abnormally.</strong></p>
<blockquote><p>SQL Server agent does not have appropriate permission to access the shared folder. Granting access solves this problem.</p></blockquote>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
