Showing posts with label space. Show all posts
Showing posts with label space. Show all posts

Monday, June 16, 2008

Debugging Stored Procedures

I have performed many tasks in numerous different roles, and one of the most frustrating has been debugging stored procedures. But no more! The ability to debug stored procedures as though we were debugging any development platform code is part of one of the enhancements to SQL Server 2000's Query Analyzer. We can insert break points, step into, step over, and so forth. This is wonderful for those of us who have tried to monitor what is happening in a stored procedure.

Previously we could do this with SQL Server 7.0 and Visual InterDev, but there was a lot of overhead in setting it up. With the new debugging tools, all we do is right- click and select Debug. How simple is that?

We have the standard debugging windows as well. We can get the values of variables from the Watch window and view the procedures that have been called and not completed in the Callstack window. This makes it easy to migrate from a development environment to using SQL Server 2000. So you Access developers out there must be getting really excited by now!

Internet 2010

What? No More Room?

One of the trouble spots a DBA must keep an eye on is conserving a computer's most precious resources, memory and disk space.

If we have several databases on one server, we can find that we run out of disk space, and if that happens, our databases will fail.

Of course, in Spy Net's fictional scenario, that could mean World War III! But in the real world, running out of space can still cause serious problems, especially in mission-critical databases such as utilities or emergency response systems. In this section, we look at the causes of resource failure and several ways to avoid down time, including managing file and log size.

How Memory Affects Database Transactions

The memory-deprived databases will fail because tempdb is where most of the changes that you make to your data are performed before they are committed to disk. If you have enough RAM available, SQL Server 2000 will put as much of your database as it can up into RAM. After all, it is much faster to read from RAM than to scan a disk for the information. However, if RANI is a short commodity or you have concerns about the amount of disk space your database is eating, relax, because we have even have control over that.

When you are in Enterprise Manager you have the option to view how much space your data files for your database are allocated and how much is used. To see this information, simply click the SQLSpyNet (or any other) database within Enterprise Manager, and you will see a screen.

Shrinking Your Data Files to Reduce the Database

When we are talking about shrinking our data files we are not actually referring to the process of compacting them like a zip program would.

If we shrink our data files, we remove unused data pages. For example, if we had a table that had five data pages on which it stored the data, and we deleted two pages worth of the data, although our table would have only three pages that actually stored data, SQL Server 2000 still would have five pages allocated to the table.

When we shrink the data files, we just get rid of the extra two pages that the table was using. This does, however, have restrictions, but I think you get the idea.

What do we do when our data files are too large? Although we cannot shrink an entire database smaller than its original size, we can shrink our data files smaller than their original allocation sizes. We must do this by shrinking each data file individually by using the DBCC SHR I NKF I LE Transact-SQL statement. This allows us to reallocate how much space the given data file is allowed to use.

Monday, April 21, 2008

What is the Difference Between IPv4 and IPv6?

The IP protocol is a connectionless, unreliable protocol. TCP uses IP to establish sessions with remote computers and provides the reliability of the data transactions. IP, however, provides the hierarchical address space used by IPv4. Yet this address space is limited to fields in the IP datagram that are only 32 bits in length. When first created, it seemed like this address space would provide enough IP addresses to last for decades or more. After all, only government, educational facilities, and a few other institutions used what was then the ARPANET (the predecessor of the Internet). The address classes' original part of the IPv4 address space has pretty much been displaced by CIDR, to prevent wasting large ranges of addresses allocated to a single entity (such as class A networks).

IPv6 increases this 32-bit address space to 128 bits. At first glance, 32 bits versus 128 bits doesn't seem to be a big difference. When you consider the number of possible addresses that each of these bit ranges can provide, however, there is a tremendous difference. Fill a 32-bit field with all ones and you end up with a number just over 4 billion. A 128-bit field can provide a much larger number of possible addresses. The actual number of addresses, of course, depends on which bits are used to identify a network and which are used to identify a host on a network.

Internet 2010

The address space that IPv4 enables can give us enough addresses to satisfy the demand today, especially when using NAT for LANs and using CIDR to reclaim wasted address space that was created by the original address classes. Yet the world of electronics today has changed the playing field. It's not just computers that need an IP address. Handheld devices, mobile phones, and other consumerdevices will likely require an IP address in the near future. NAT might work well in a LAN or a small enterprise network, but when you consider that many wireless devices will roam from one provider to another, an assigned IP address becomes more important. NAT is performed at a local level, not a national or global one.

Expanding the IP address space is not the only feature that IPv6 gives to the Internet and your LAN or WAN. Other important features include the following:

  • A simpler header format for the IP datagram, which makes it possible to create faster routing techniques implemented in hardware designs.
  • Support for new extensions to the IP header, as well as a means to include future expansion for additional headers that may be created later.
  • The replacement of certain options left over from the IPv4 specification, as well as new options, and, again, room for expansion of additional options as required in the future.
  • The capability to specify which datagrams require special handling when it comes to flow control. This capability can enable real-time handling of a stream of IP datagrams (needed, for example, for real-time voice or video communication over an IP network), a feature usually accomplished by other protocols tunneling IP.
  • Authentication and encryption capabilities to provide for a secure connection.
  • As you can see, there are many differences between the capabilities of IPv4 and those of IPv6.

The IPv6 Headers

Headers are used by protocols to provide information about source and destination addresses, protocols, or the payload encapsulated by the datagram. It is typical that one protocol's packet is sent as the payload of another protocol. For example, the IP datagram is usually sent across most LANs encapsulated in an Ethernet frame. At the destination, the Ethernet portion of the frame is stripped off and the IP packet information is

revealed. The IP information is then removed by the protocol stack, and the TCP (or other protocol) information is then removed before the actual data is reassembled and sent to an application.

A few of the IPv4 fields were never put to any practical use. And some of those fields no longer existin the IPv6 header.

The fields for IPv6 are as listed here:

This section describes just the initial IPv6 header format. In the next section you will learn about ho IPv6 can include additional headers that extend the traditional header to provide information about additional services for the IP protocol.

Tuesday, March 25, 2008

Growing Beyond a Small LAN continue...

Segmenting the Network Can Improve Performance

You might need to segment devices on the network for many different reasons. These include the following:

1. Topology limitations—You need to add more nodes to the network but the expansion will break distance limitations or maximum nodes-per-segment rules. This is usually the case only in older Ethernet LANs where the broadcast domain was constrained by the round-trip time.

2. Networking protocol limitationsAddress space is fragmented and you need to connect segments that have different network addresses. This can happen when two companies merge and both already have an address space in place for their respective networks. It's much easier to simply place one or more routers between the two networks than it is to reassign network addresses to the many devices on the network. When using DHCP to configure workstations, this might not be a limitation, provided that you have an address space that can accommodate all the devices that will be placed on the larger network.

Internet 2010

3. Network bandwidth limitations—When a few high-performance servers or workstations consume too much of the segment's available bandwidth, it's time to segment the LAN (create additional subnets) and thus limit network traffic to smaller segments that contain fewer devices.

4. Security reasons—An Ethernet adapter set to promiscuous mode can intercept all packets that are sent out on a particular segment, for example. You need to place a few high security workstations on their own segment, yet allow some kind of connection to the rest of the network. Keep in mind that in an Ethernet network that uses hubs as a wiring concentrator, every device on the hub (or hubs) can see every network frame that's broadcast on the LAN. It isn't difficult to download a program from an Internet source to read every packet that passes through the network.

Geographically distant connections—It's best to segment each geographic location to ensure that unnecessary traffic isn't being sent across the remote connection and wasting valuable bandwidth. Some routers provide a dial-up function so that a dedicated link isn't necessary, providing an inexpensive way to use routers to connect branch offices.

Depending on which combination of these reasons applies to your situation, a router or switch might be the solution you need to segment the network.

Connecting Remote Locations

When a business expands geographically, you'll find that using bridges to connect remote locations isn't a feasible solution. There are many different technologies from which you can choose today— from simple dedicated lines to ATM and Frame Relay—to connect geographically distant locations.

For these connections, you'll find it necessary to incorporate routers or switches. You'll also find these methods of transport expensive. Today, it isn't unreasonable to consider connecting the local network to the Internet with a router that provides virtual private network (VPN) capabilities. Thus, by using an inexpensive connection to the Internet (far cheaper than using leased dedicated lines), you can still provide a secure channel to remote branch locations.

When to Use a Router

Routers are similar to bridges only in the fact that they can both be used to connect multiple network segments. Whereas bridges make all their decisions based on the MAC address of a particular network packet, routers access the addressing information provided by a higher-level protocol to decide how to best forward a packet. Using the OSI reference model (see Appendix A, "Overview of the OSI Seven-

Layer Networking Reference Model"), you can see that the bridge operates at layer 2, the Data Link layer, whereas routers operate at layer 3, the Network layer. With bridges, the address space is flat: It's simply the MAC addresses associated with nodes on each segment, each one unique. For protocols operating at the Network layer, the address space becomes more complicated because there must be a mechanism for identifying the network as well as the individual node.

When to Use a Switch

Switches are one of the fastest growing categories of network equipment. They can act as a wiring concentrator for a LAN just as a hub does, but they also can make available a much larger bandwidth to clients because they selectively forward traffic from one port to another based on the destination address of each packet. When you use a switch with only one node attached to each port, you are in effect creating a collection of broadcast domains that consist of only two network nodes: the switch and the client node connected to the port. For network adapters and switches that support full-duplex operation, the effective bandwidth is doubled for each client and there is no broadcast domain between the two.

Tuesday, December 4, 2007

Online stores Product Placements

Online stores lack the observable physical start and finish structure of a retail store. At retail, a customer can clearly see aisles and shelves filled with products and the checkout counters waiting to total their purchases. Online, there is a virtual space that is unseen and unclear as the customer "steps" through the store entrance and onto the home page. Once there, the shopper knows there are lots of products, yet he can't see how many. He also can't see the structure of the aisles or how products might appear on the shelf. And he can't tell the size or the depth of the store. This can be disorienting because the customer doesn't know if the store is a big operation or a small one—the tip of an iceberg or only an ice cube.

As the shopper starts clicking choices and wanders through the e-aisles, he can be confronted with virtual pallets full of random products (long line listings). Or he can be presented with structured, organized shelves filled logically with an assortment of products that are easy to select.

Some products are better suited for online sales than others. Multi-channel shoppers will choose to purchase products based on convenience and proximity to their businesses or homes. And this depends on the product itself. Many people shop online, regardless of where they actually purchase. They may research information for a higher priced or larger item online, but they make the purchase in person at retail. More routine, commodity, and low involvement products make ideal online purchases.

A strategic retail shelf-management technique determines product shelf placement. Typically, placement is determined by the number of turns—volume of product sold during a month—and value of the specific product. Unfortunately, key areas on web pages are sold for advertising space instead of reserving them for prime products. Also, dynamically generated product listings are often sorted by the database rules—such as alphabetically by product name or numerically by product number—and not by product value to the merchant.

Internet 2010

Above the Pack and Above the Fold

Online products most frequently purchased or products that have other strategic value should be placed "above the fold." This is the viewable part of the web page as it renders in a conventional 600 x 800 resolution screen. It is analogous to placing the product on the retail shelf at eye‑level. This placement makes it most convenient for people to find. Customers stop searching if they have to scroll too much or click to other pages, which is similar to putting products on the top or bottom shelf.

Considerations must be given to emerging technologies and adoption of Internet devices I such as handheld PCs and net or web TV so that prime products are displayed first.

Limiting Choice with Conscious Intent

Even with the ability to offer a limitless product mix, there is a point where the law of diminishing returns comes into play. Unlike a retail store and catalog that have physical limitations, the online store has depth, limited only by the system storage space and servers running the we bsite. The more products in the database, the harder it is to organize and merchandise them.

Limiting choice is a strategy employed to manage the structure to ease product selection and minimize warehousing and fulfillment transactional costs. Too much choice can actually be an inhibitor to purchasing and a reason for abandoned shopping carts. This occurs when the product comparison and selection tasks become too overwhelming. Even with the mistaken perception that online shelf space is limitless, customer considerations and business drivers must be taken into consideration.

Online shoppers look to their online merchants as experts in the products they sell. Many online resellers feel that providing customer choice equates with providing them every product that is available. This view forces shoppers to compare and make choices from long lists of possibilities with limited information. Shoppers often don't bother and shop somewhere else instead.

What better service to your customers can you provide than making recommendations to them? To start, this can be simply identifying products as "good, better, and best" for the shopper's need. These recommendations can be based on price and quality of the brand. These designated products can be placed above the fold for those shoppers who don't know where to begin to comparison-shop. Then, additional choices can be listed or featured for those customers who would like more choices and have more time to browse.

Product and category long-term value factors must be considered in developing the good, better, best model, however. Customers will develop trust for your store if their experience with the product matches your recommendations. They will continue to see you as the expert in the products you sell.

Increasing Cash Register Ring

Many techniques can influence the number of items purchased or the total value of the she cart. Three of these successful retailing techniques to leverage online are cross-selling, up ing, and purchasing spares. In fact, there is more opportunity online through virtual mess to attach these to products than in traditional retail or catalog phone orders.

Cross-selling products are a method by which the online store recommends complex items for customer purchase. This technique drives incremental sales and is typically innate. These "add-on" products can also provide a fuller solution for the customer. Some impel recommendations could be jewelry and shoes with dresses, cables with printers, batter- with electronic devices, or salsa with chips.

Relevant and complementary items work best for cross-selling. These items might belong to the same category or they might belong to a completely different category. Conduct a holistic evaluation on your website to put together recommendations for key products. Make it convenient and easy for the customer to add the item to the cart. Complementary products are good items to consider as bundles and "e-kits," a tool.

Up-selling is a method by which a product within the same category with varying degrees functionality is recommended that may better meet a customer's longlterm needs. This method replaces a less-expensive product purchase with a more-expensive product purchase, while cross-selling adds additional products to the cart.

Another cross-selling technique is to recommend that the customer buy "spare" products.

It is technique is best for consumable, repeat purchases. It's never convenient to have to go to retail store when you run out of a product. This can be an incentive to increase the number of products in the shopping cart, especially if your online store offers free shipping or other delivery options for a designated sale amount. This technique also keeps customers coming back as repeat purchasers making more frequent visits to your store. Many customers return to the original store for repeat purchases if their experience was positive.

Using valuable cross-sell merchandising space for non-relevant products doesn't work. Many online stores currently make the mistake of "down-selling," which happens when stores believe they are offering customers "choice." This practice can recommend a lower-quality product at a lower price, which may not be in the best interests of the customer. The store's perceived value of choice may conflict with the customer's perceived value of the recommendation. As one customer put it, "It's like going to a premium store, and being offered flea-market items."

Down-selling often occurs when webpage space is sold as manufacturer advertising or the product manufacturer offers "spiffs" (sales representative incentives) attached for the merchant. While seemingly harmless, this practice may cause you to lose credibility with customers due to the recommendations you make. As an online merchant, customers see you as an expert. If this is compromised by non-relevancy, customers may lose faith and trust in your judgment.

Customers look to online stores to recommend the right products, not to merely list products for sale. Used effectively, these techniques increase the total cash register ring and provide customers with complete and best solutions.

Increasing Frequency of Purchases

Increasing the frequency of purchases is an online technique that considers customers' purchasing behaviors. It is somewhat related to cross-selling when follow-up products are offered to customers at a designated time after an initial purchase is made. This is essentially a "postponed" cross-sell. For this technique, it is imperative to understand your specific target customers and have a thorough understanding of product-related categories and other categories as defined by retail customer segment clustering techniques.

Online sales data is analyzed for trends. For example, a trend might identify that customers who purchase a new desktop PC also purchase a new printer two months later. The store can provide printer information to the PC customer as a follow-up a month later.

Tracking customer purchases and integrating the information into your CRM database will allow you to customize messages to your customers when they enter your website. You can greet them personally and acknowledge past purchases. If the customer buys routine supplies from you at regular intervals, give the customer the option of placing a standard order. Even small companies take advantage of this technique. One pizza chain keeps records of each take-out pizza ordered linked to the customer's phone number. When the customer calls in an order, he asked if he would like the same as his last order. The same concept applies online. But it must be non-intrusive and with the customer's permission.

Taking this a step further, the company can recommend, based on ordering history, what it thinks a particular customer might like to purchase in the future. This technique must be very customized to be on target and should be linked to a personal shopping service. Otherwise, it may be perceived as an annoyance.

Internet Blogosphere