nerdexam
Microsoft

70-516 · Question #135

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Forms application. The application connects to a Microsoft SQL Server database. You need to find out whether…

The correct answer is A. string instanceName = Assembly.GetEntryAssembly().FullName. NumberOfNonPooledConnections The number of active connections that are not pooled. NumberOfReclaimedConnections The number of connections that have been reclaimed through garbage collection where Close or Dispose was not called by the application. Not explicitly closing or…

Deploying and Troubleshooting Data Access

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create a Windows Forms application. The application connects to a Microsoft SQL Server database. You need to find out whether the application is explicitly closing or disposing SQL connections. Which code segment should you use?

Options

  • Astring instanceName = Assembly.GetEntryAssembly().FullName;
  • Bstring instanceName = Assembly.GetEntryAssembly().GetName().Name;
  • Cstring instanceName = Assembly.GetEntryAssembly().FullName;
  • Dstring instanceName = Assembly.GetEntryAssembly().GetName().Name;

How the community answered

(45 responses)
  • A
    78% (35)
  • B
    7% (3)
  • C
    2% (1)
  • D
    13% (6)

Explanation

NumberOfNonPooledConnections The number of active connections that are not pooled. NumberOfReclaimedConnections The number of connections that have been reclaimed through garbage collection where Close or Dispose was not called by the application. Not explicitly closing or disposing connections hurts performance. Use of ADO.NET performance counters

Topics

#connection pooling#performance counters#SqlConnection#monitoring

Community Discussion

No community discussion yet for this question.

Full 70-516 Practice