background preloader

C#

Facebook Twitter

Enabling AWE Memory for SQL Server. The amount of physical memory supported has increased with the introduction of the Windows Server 2003 family. The physical memory accessible by AWE depends on which operating system you are using. The following list provides the maximum physical memory accessible by each Windows Server 2003 operating system at the time of writing. Windows Server 2003, Standard Edition supports physical memory up to 4 GB.Windows Server 2003, Enterprise Edition supports physical memory up to 32 GB.Windows Server 2003, Datacenter Edition supports physical memory up to 64 GB. Configuring Memory Options SQL Server dynamically allocates AWE-mapped memory when running with any of the Windows Server 2003 operating system editions. When AWE is enabled, SQL Server always attempts to use AWE-mapped memory. To make AWE available to an instance of SQL Server, use sp_configure to set the awe enabled option to 1, and then restart SQL Server.

Example First, configure AWE: Next, configure memory: Mputer Supplies from Novatech. XML & Database Content Editor from Altova: Authentic. Altova Authentic® 2014 is a powerful XML content authoring tool and document editor. With Authentic, business users can view and edit information stored in XML documents and SQL databases, using familiar conventions from existing business forms and office productivity applications. Authentic is available as a free Community Edition as well as an Enterprise Edition and comes in both a desktop version and a browser plug-in. Authentic templates and forms are created using Altova StyleVision® 2014 – Altova’s award-winning stylesheet design tool.

Download Trial XML Authoring Tool Authentic offers business users the ability to directly edit XML content through easy-to-use document templates with the benefits of real-time validation, full support for CALS and HTML tables, and customizable templates for the most demanding enterprise content editing. Flexible Deployment Options Portable XML Forms Authentic Features for Developers. The Official Website of Tor and Forge Books. Home. Upload multiple XML files to an XML data type column. SQL Server Database administrators often have requirements such as importing multiple files to a table on a database.

This article discusses how to upload multiple files, especially XML files, to the SQL Server database XML data type column. Pre-requisite a. Make sure xp_cmdshell is enabled. If it is not enabled, execute the following command as shown below. use master go sp_configure 'show advanced options',1 go reconfigure with override go sp_configure 'xp_cmdshell',1 go reconfigure with override go b. USE [master] GO /****** Object: Database [XMLTest] Script Date: 04/17/2007 01:49:43 ******/ IF EXISTS (SELECT name FROM sys.databases WHERE name = N'XMLTest') DROP DATABASE [XMLTest] go create database XMLTest go use XMLTest go c.

Use [XMLTest] /****** object: table [dbo]. d. Example content of Customer5.xml <? E. USE [master] GO /****** Object: StoredProcedure [dbo]. This procedure accepts the following parameters: @databasename = Name of the database where the schema and table exist. f. G. H. SQL Server 2005 Build List. Deduping Data in SQL Server 2005. Introduction Recently I read Muthusamy Anantha Kumar's article "Row_NUMBER() function in SQL Server 2005" ( article. In it, he explored not only the new ROW_NUMBER() function, but, also gave a good example of SQL Server 2005's common table expression. When I saw his sample, I immediately realized that I could use this to solve one of my more perplexing problems in SQL Server - how to reduce duplicates in a record set to a single row. I will demonstrate how to "de-dupify" a record set in SQL Server 2005 in a single query - a feat I would find myself using a cursor for in earlier versions of SQL Server.

Particularly vexing were issues where you didn't just have two copies of a record but might have three or more copies or ragged numbers - two here and three there. My solution below accounts for this hardest case of the ragged numbers of duplicates. I slightly modified Muthusamy's original example. Illustration 1.0. Using Synonyms in SQL Server 2005. If you've been developing with SQL Server for any length of time, you're undoubtedly used to referring to objects with four-part identifiers: [[[server.] [database].] [schema_name].]object_name As the square brackets show, different parts of this syntax can be omitted, as long as you supply enough to unambiguously identify what you're talking about.

For example, all of these might refer to the same object: Server1.AdventureWorks.Production.ProductCategory AdventureWorks.Production.ProductCategory AdventureWorks..ProductCategory ProductCategory For the most part, you can get by with three-part names, omitting the server name - unless you're dealing with objects on a linked server. Enter the Synonym SQL Server 2005 introduces the concept of a synonym: a single-part name that can replace a two-, three-, or four-part name in many SQL statements. CREATE SYNONYM [schema_name.]synonym_name FOR object_name For example, in the AdventureWorks sample database you can create a synonym this way: Data Binding with Windows Forms 2.0: Programming Smart Client Data Applications with .NET - The Code Project - Book Chapters. Table of Contents Introduction The preceding chapters showed many detailed examples of data binding to simple bound controls and list bound controls. However, one of the most common ways of presenting data is in tabular form.

Users are able to quickly scan and understand large amounts of data visually when it is presented in a table. In addition, users can interact with that data in a number of ways, including scrolling through the data, sorting the data based on columns, editing the data directly in the grid, and selecting columns, rows, or cells.

DataGridView Overview The DataGridView control is a very powerful, flexible, and yet easy-to-use control for presenting tabular data. You can make the grid act like a spreadsheet, so that the focus for interaction and presentation is at the cell level instead of at the row or column level. Figure 6.1 shows an example of a DataGridView control in action with some of the key visual features highlighted. Basic Data Binding with the DataGridView. Overview (JavaMail API documentation) Troubleshooting Performance Problems in SQL Server 2005. Published: October 1, 2005 Writers: Sunil Agarwal, Boris Baryshnikov, Tom Davidson, Keith Elmore, Denzil Ribeiro, Juergen Thomas Applies To: SQL Server 2005 Summary: It is not uncommon to experience the occasional slow down of a SQL Server database.

A poorly designed database or a system that is improperly configured for the workload are but several of many possible causes of this type of performance problem. On This Page Introduction Goals Methodology Resource Bottlenecks CPU Bottlenecks Memory Bottlenecks I/O Bottlenecks Tempdb Slow-Running Queries Conclusion Appendix A: DBCC MEMORYSTATUS Description Appendix B: Blocking Scripts Introduction Many customers can experience an occasional slow down of their SQL Server database. Goals The primary goal of this paper is to provide a general methodology for diagnosing and troubleshooting SQL Server performance problems in common customer scenarios by using publicly available tools.

SQL Server 2005 has made great strides in supportability. Detection. Parsing a URL. The URL class provides several methods that let you query URL objects. You can get the protocol, authority, host name, port number, path, query, filename, and reference from a URL using these accessor methods: getProtocol Returns the protocol identifier component of the URL. getAuthority Returns the authority component of the URL. getHost Returns the host name component of the URL. getPort Returns the port number component of the URL. GetPath Returns the path component of this URL. getQuery Returns the query component of this URL. getFile Returns the filename component of the URL.

GetRef Returns the reference component of the URL. Note: Remember that not all URL addresses contain these components. You can use these getXXX methods to get information about the URL regardless of the constructor that you used to create the URL object. The URL class, along with these accessor methods, frees you from ever having to parse URLs again! Here is the output displayed by the program: Log Shipping in SQL Server 2000 - Part 1. Updated : April 11, 2002 Setting up, reconfiguring, and monitoring log shipping By Ron Talmage This article is from the December 2001 issue of SQL Server Magazine.

This article is part one of a two-part series. When you've finished reading this article, readLog Shipping in SQL Server 2000 Part 2. Log shipping increases a SQL Server database's availability by automatically copying and restoring the database's transaction logs to another database on a standby server. Because the standby database receives all changes to the original database, it's an exact duplicate of the original database—out of date only by the delay in the copy-and-load process. In SQL Server 2000 Enterprise and Developer editions, Microsoft provides a log shipping utility in Enterprise Manager—as part of the Database Maintenance Plan Wizard.

On This Page Setting Up Log Shipping The primary server is the production server on which the real work takes place; this server holds the source database. Step by Step. Log Shipping in SQL Server 2000 - Part 2. Updated : April 11, 2002 Role changes, role reversals, and positioning the monitor server By Ron Talmage This article is from the January 2002 issue of SQL Server Magazine. When your production database server goes down—as the result of planned maintenance or an unexpected event—you want to feel secure in the knowledge that the database is intact on a standby server.

On This Page Changing Roles Reversing Roles Where to Place the Log Shipping Monitor A Significant Improvement Changing Roles Log shipping from a primary to a secondary server lets you use the secondary server in place of the primary server, if necessary. Although SQL Server 2000 provides an Enterprise Manager utility for setting up and monitoring log shipping, it provides only limited support for log shipping role changes, which you accomplish by manually applying system stored procedures from the msdb database.

Step 1: Transferring and exporting logins. Step 2: Demoting the primary server. Reversing Roles Click to Order. Log Shipping in Microsoft SQL Server 2000. It is 2 PM on a record business day. The Microsoft® SQL Server™ 2000 server housing your mission-critical customer database experiences a disk failure. What do you do? When was the last known good backup? Is there another server available to restore the backup onto? Is SQL Server even on that server? One way to protect your database from a potentially prolonged outage is to utilize a feature new to SQL Server 2000 Enterprise Edition: log shipping. Log shipping is a process that takes transaction logs from a primary SQL Server and applies them sequentially on a scheduled basis to another SQL Server.

For the first time with SQL Server 2000, log shipping is built into the product, and is no longer a custom implementation. How Log Shipping Works To understand how to use the log shipping feature in SQL Server, you must first become familiar with the components involved in the process. Components The SQL Server 2000 implementation of log shipping is comprised of the following elements: Servers. SQL Server 2000: Transactional Replication Performance Tuning and Optimization.

Updated : March 25, 2002 Authors Bren Newman, Xavier Schildwachter, Greg Yvkoff On This Page Introduction Improving Replication Performance Improving the Performance of Transactional Replication Improving Performance in Applying the Initial Snapshot Transactional Replication Performance Examples Conclusion Introduction Transactional replication is a type of replication provided by Microsoft® SQL Server™ 2000 that allows data modifications to be propagated incrementally between servers in a distributed environment.

Transactional replication can be used for many different applications, from reporting servers and data warehousing environments to Web servers and e-commerce applications. Transactional replication is a scalable and reliable solution for distributing data in high-performance environments. Improving Replication Performance You can enhance the general performance for all types of replication in your application and on your network by: Using -MaxBCPThreads Publication Articles 1. Setting Up Transactional Replication: A Step-by-step Guide.

General conceptsChecking necessary conditionsChecking connect Example Literature General concepts Replication is the process whereby data is copied between databases on the same server or different servers connected by LANs, WANs, or the Internet. Microsoft SQL Server replication uses a publish, distributor and subscribe metaphor. Publisher is the server or database that sends its data to another server or database. Subscriber is the server or database that receives data from another server or database. Distributor is the server that manages the flow of data through the replication system. Publisher contain publication/publications. Subscription is the group of data that a server or database will receive. Microsoft SQL Server support the following replication topologies: Central publisher Central subscriber Central publisher with remote distributor Publishing subscriber Central publisher This is one of the most common replication topologies.

Central subscriber Publishing subscriber 1. 2. 3. 4. ComboBox in DataGrid - The Code Project - C# Controls. Download source files - 14 Kb Introduction I needed a ComboBox in my DataGrid. After looking around on the web, I found many examples, but none of them worked for me. With inspiration from Alastair Stells' article here on The Code Project and whatever else I found on the Internet, I have made the following DataGridComboBoxColumn class. Why did the other examples not work All the other examples populate the ComboBox with a DataView, but I need to (want to be able to) populate my ComboBox with an IList (ArrayList) instead of a DataView. columnComboBox = new DataGridComboBoxColumn(); columnComboBox.comboBox.DataSource = new ArrayList(MyDataClass.GetArray()); columnComboBox.comboBox.DisplayMember = "Name"; columnComboBox.comboBox.ValueMember = "GUID"; And MyDataClass.GetArray() returns MyDataClass[], and has two properties named Name and GUID.

The other examples expect columnComboBox.comboBox.DataSource to be a DataView, and it being an ArrayList generates exceptions. What I do is simple. Windows Forms Controls Used to List Options. Accessing Data. This topic lists the following common issues that arise when working with data access in Visual Studio .NET. Cannot Access a Database at Run Time that I Can Access at Design Time This is most likely the result of the user name and password passed at run time being denied access to the database. Resolution depends on the authentication and authorization methods being used in the database, as well as the connection string. Some common configurations that cause this problem are: Things to check: Verify the username and password that your application is using have proper permissions to access the data source.

Verify the user has the correct permission settings in the database. After Reconfiguring a Data Adapter, Filling a Dataset Throws an Exception Reconfiguring a data adapter does not automatically regenerate the dataset. To regenerate a Dataset from a configured data adapter The following table provides links to related information. Applications with Data Adapters To reconfigure a data adapter. Populating a DataSet from a DataAdapter. Dataset Updates in Visual Studio .NET. ADO.NET Datasets. ADO.NET Data Adapters. Windows Forms Data Architecture. Performing Database Operations Directly. Sun Microsystems - Developer Home. Training. TWIMTBP Games. Wing Commander Universe - Privateer Remake. DA Games. Games Domain - Games Domain.