SQL Server 2005 Editions

January 31, 2008

I came across associates installing SQL Server 2005 Standard Edition on their laptop. I would not say it is inappropriate from functionalities standpoint. The features that are present in SQL Server 2005 Enterprise edition would not likely to be required. I do not see their laptops exceeding the processor and cluster node limit either.

So what is my problem? I would say there could be a more appropriate edition for the purpose. Determining the appropriate SQL Server 2005 edition in accordance to the intention of the installation is a vital part of the installation process. Let us check out what editions are offered with their intended environment.

SQL Server 2005 Enterprise Edition (32-bit and 64-bit)

Enterprise Edition is the top edition in the series. There is no limitation in both hardware resources and functionalities. It has a complete set of SQL Server 2005 functionalities. It is designed to support the largest enterprise online transaction processing (OLTP) environments with highly complex data-analysis requirements and data warehousing.

You should select Enterprise Edition if the installation requires high processing on large amounts of data. Enterprise Edition allows unlimited processors, unlimited clustering nodes, and features that help to improve data operation performance.

SQL Server 2005 Standard Edition (32-bit and 64-bit)

The Standard Edition is a trimmed down version of the Enterprise Edition. It includes the essential functionality required for business solution, e-commerce, and data warehousing for small and medium sized organization. The Standard Edition supports a maximum of 4 processors but has no limit on memory and database size.

You may consider Standard Edition if the installation host large amounts of data but do not need the features of Enterprise Edition.

SQL Server 2005 Developer Edition (32-bit and 64-bit)

Developer Edition offers all the functionality of SQL Server 2005 Enterprise Edition but is licensed for use as a development and test system. This edition is not meant to be installed as a production server.

You should choose Developer Edition if you would like to develop application that will use Enterprise Edition but do not want to install Enterprise Edition on development or test server.

SQL Server 2005 Workgroup Edition (32-bit)

Workgroup Edition is designed for small business that would like no limits on database size and number of users. It is capable to serve departmental or branch operation, and small Web servers. There is no clustering, analysis service, and features that are meant for larger databases. There is also a limit in hardware resources. It supports up to 2 processors and a maximum of 3 GB of memory.

Workgroup Edition is right for installation with small amounts of data on smaller servers.

SQL Server 2005 Express Edition (32-bit)

Express Edition has the least features with hardware resources limit. It is however free to use and can be distributed to function as client database. Do take note that the data size allowed is limited to 4 GB.

Express Edition is meant to be desktop database. It is commonly use in client applications that requires data store such as a POS terminal.

SQL Server 2005 Mobile Edition

Mobile Edition is designed to run on MS Windows Mobile platform. It is not meant for desktop or servers. It makes good client database on mobile device very much like the Express Edition for desktop.

Summary

Decision on the right edition for a particular installation very much depends on the needed features, intended data size, and hardware you have or planned.

If you are installing on Window Mobile, you have only SQL Server 2005 Mobile Edition to choose from. If you are installing on 64-bit Windows, you may write off the Express and Workgroup Editions as they do not support 64-bit. If it is for production use, Developer Edition is out of the question.

I personally use Developer Edition for my laptop as well as development server. Why don't you identify the edition and version you have installed on your laptop or desktop and share with us?

X++ Bitwise Operators

January 30, 2008

Bitwise operations are performed at the individual bits. In other words, the value is converted into binary format and the bitwise operators will act on each and every digit.

Bitwise operation is not very widely used in business solution development. The only time I remember using one was to track a series of states. The advantage is the set of states (true or false) could be altered in one operation. However, readability is not good.

Dynamics Ax provides a set of operators to perform such operation. They will be discussed subsequently. The examples you will find subsequently are base on 32-bit integers. The rest of the operators are Arithmetic and Assignment Operators, and Relational Operators.

& (AND)

This operator performs a binary AND on two expressions.

Syntax

expression1 & expression2

Example

print 10 & 8; //1010 AND 1000
pause; // 1000 -> 8

| (OR)

This operator performs a binary OR to two expressions.

Syntax

expression1 | expression2

Example

print 10 | 8; //1010 OR 1000
pause; // 1010 -> 10

^ (XOR)

This operator performs a binary XOR to two expressions.

Syntax

expression1 ^ expression2

Example

print 10 ^ 8; //1010 XOR 1000
pause; // 0010 -> 2

~ (NOT)

This operator performs a bitwise NOT to the expression on the right.

Syntax

~ expression

Example

print ~10; //NOT 1010
pause; // 11111111111111111111111111110101 -> -11

<< (Left Shift)

This operator requires two operands. Expression on the right specifies the number of bits to shift. A left shift takes the number of bit specified from the left and moves it to the right.

The common use of left shift is to multiply an integer by a power of 2. The syntax is equivalent to expression1 * 2 expression2.

Syntax

expression1 << expression2

Example

print 123 << 3; // 00000000000000000000000001111011 << 3
pause; // 00000000000000000000001111011000 -> 984

>> (Right Shift)

This operator is a reverse of Left shift. It also requires two operands and the expression on the right denotes the number of bits to shift. The different is that it will shift the bits from the right to the left instead.

Syntax

expression1 >> expression2

Example

print 984 >> 3; // 00000000000000000000001111011000 << 3
pause; // 00000000000000000000000001111011 -> 123

Find Out SQL Server Edition and Version

January 29, 2008

A friend asked me how to check the version of his SQL Server. He told me that he has checked all the About boxes on applications installed with SQL Server but see nothing relevant.

Checking SQL Server version is slightly different from other Microsoft products. You do not get it by checking the About dialog box. It actually makes sense because there are only About boxes for tools shipped with SQL Server and not the database server itself. These About boxes should show the version of those tools.

Microsoft SQL Server is an instance installed on a machine. You may install multiple instances of SQL Server on one machine. Each of these instances could be of different edition or version (for versions that could co-exist). Naturally SQL Server version and edition is found at the server level.

How to Determine SQL Server Edition and Version

The following are five approaches to achieve the stated objective. The first four methods give you both edition and version whereas the fifth method only provides the version. All the methods except for method number five requires login to the SQL Server.

I personally prefer the use of SERVERPROPERTY function explained in approach number two. It has little dependency on availability of installed components yet it presents data in a readable manner.

1. Enterprise Manager

This tool is shipped with Microsoft SQL Server 2000. It provides the most straightforward way to accessing SQL Server edition and version. The whole set of information is shown on the server property page as illustrated in the following figure.

SQL Server Enterprise Manager Property Page General Tab

The figure shows the property of a SQL Server 2000 Developer Edition SP4. This method might be straightforward but it requires that you have Enterprise Manager installed.

2. SERVERPROPERTY Function

SQL Server Edition and Version could be acquired using the SERVERPROPERTY function. This is applicable for SQL Server 2000 and SQL Server 2005. This function takes one parameter that specifies the server property requested. The following is the T-SQL script that returns SQL Server version and edition.

SELECT
  SERVERPROPERTY ('ProductVersion'),
  SERVERPROPERTY ('ProductLevel'),
  SERVERPROPERTY ('Edition')

This query will return one row with three columns. The first column returns the SQL Server version in the form of "major.minor.build". The second column denotes the service pack updates whereas the third column shows the edition. Do find out more about the properties that SERVERPROPERTY function returns.

3. @@VERSION Variable

The global variable @@VERSION stores the SQL Server Edition and Version too. You may find out the value by issuing the following T-SQL query. This approach is applicable to SQL Server 6.5, SQL Server 7.0, SQL Server 2000 and SQL Server 2005. The value returned is illustrated in the following figure.

PRINT @@VERSION

Output of PRINT @@VERSION

The version is found in the form of "major.minor.build". The edition is stated at the final line.

4. Microsoft SQL Server Management Studio

The version of SQL Server connected is shown in the Object Explorer. It is in the form of "major.minor.build". More detail could be found on the property page of the connected instance. The property page also shows the version in number. However, information such as the edition is shown. The following figure shows the object explorer and the property page.

SQL Server 2005 Property Page

5. SQLSERVER.EXE File Property

The property page of SQLSERVER.EXE shows the SQL Server version too. Edition however could not be found here. The following figure shows the detail tab on SQLSERVER.EXE property page. This method requires no login to the SQL Server. You just need to find the correct SQLSERVER.EXE file.

SQLSERVER.EXE Property Page

SQL Server Version Number

If you are unable to use the first two methods mentioned above, you would have to identify the version from product version. There is not a pattern to decode the version number to their relevant service pack update. Please find the equivalent with the version number using the following table.

Version NumberService Pack
90.00.3042.00SQL Server 2005 SP2
90.00.2047.00SQL Server 2005 SP1
90.00.1399.00SQL Server 2005 RTM
8.00.2039SQL Server 2000 SP4
8.00.760SQL Server 2000 SP3a
8.00.760SQL Server 2000 SP3
8.00.534SQL Server 2000 SP2
8.00.384SQL Server 2000 SP1
8.00.194SQL Server 2000 RTM
7.00.1063SQL Server 7.0 SP4
7.00.961SQL Server 7.0 SP3
7.00.842SQL Server 7.0 SP2
7.00.699SQL Server 7.0 SP1
7.00.623SQL Server 7.0 RTM
6.50.479SQL Server 6.5 Service Pack 5a (SP5a) Update
6.50.416SQL Server 6.5 Service Pack 5a (SP5a)
6.50.415SQL Server 6.5 Service Pack 5 (SP5)
6.50.281SQL Server 6.5 Service Pack 4 (SP4)
6.50.258SQL Server 6.5 Service Pack 3 (SP3)
6.50.240SQL Server 6.5 Service Pack 2 (SP2)
6.50.213SQL Server 6.5 Service Pack 1 (SP1)
6.50.201SQL Server 6.5 RTM

Final Thoughts

The approach to use very much depends on preference as well as what is available. There are more ways to achieve the objective. One of them is the use of extended procedure xp_msver. We are unable to cover all methods hence we provide a set of approaches that should work in various conditions.

X++ Relational Operators

January 15, 2008

The relational operators are frequently used in conditional statements and the where clause of data manipulation statements. Other operators could be found in Arithmetic and Assignment Operators.

like

This operator compares two expressions with wildcards. It is used to evaluate the pattern of an expression. You use * as a wildcard for zero or more characters. The wildcard ? will represents any single character. This is similar to the Criteria Format discussed in Filtering Record in Dynamics Ax.

This operator returns true if the expression on the left matches the pattern supplied on the right. Otherwise, it returns false.

Syntax

expression like pattern

Example

str sExp = "Dynamics Ax associate";
;
print sExp like "*nam??s*ate"; // Output 1 - True
pause;

== (equal)

This operator compares two expressions for difference. It returns true if they are identical and false if they are different.

Syntax

expression1 == expression2

Example

str sExp = "Dynamics Ax associate";
;
print sExp == "*nam??s*ate"; // Output 0 - False
pause;

!= (not equal)

This operator is the opposite of the equal operator. It also compares two expressions for difference. However, it returns true if they are different and false if they are identical.

Syntax

expression1 != expression2

Example

str sExp = "Dynamics Ax associate";
;
print sExp != "*nam??s*ate"; // Output 1 - True
pause;

>=

This operator returns true if expression on the left is greater than or equal to expression on the right.

Syntax

expression1 >= expression2

Example

str sExp = "Dynamics Ax associate";
;
print sExp >= "Dynamics Ax"; // Output 1 - True
pause;

<=

This operator returns true if expression on the left is less than or equal to expression on the right.

Syntax

expression1 <= expression2

Example

str sExp = "Dynamics Ax associate";
;
print sExp <= "Dynamics Ax"; // Output 0 - False
pause;

>

This operator returns true if expression on the left is greater than the expression on the right.

Syntax

expression1 > expression2

Example

int nVar = 30;
;
print nVar > 30; // Output 0 - False
pause;

<

This operator returns true if expression on the left is less than the expression on the right.

Syntax

expression1 < expression2

Example

int nVar = 30;
;
print nVar < 30; // Output 0 - False
pause;

&& (AND)

This operator returns true if both expressions beside the operator is true. It returns false if either of the expression or both expressions are false.

Syntax

expression1 && expression2

|| (OR)

This operator returns true if either of the expressions beside the operator is true as well as when both of the expressions are true. It returns false only if both of the expression are false.

Syntax

expression1 || expression2

! (Not)

This operator takes one expression on its right. It negates the expression on its right. In other words, it returns false if the expression is true and returns true if the expression is false.

Syntax

! expression

Bill Gates to Depart from Microsoft Corp

January 12, 2008

CES 2008 Bill Gates Keynote

The long planned departure of Bill Gates from Microsoft Corp has finally arrived. He will quit from the full-time role in Microsoft this summer. He announced that when he deliver the keynote address at the CES 2008 in Las Vegas. This means that this 11th keynote of his is also the last he would deliver representing Microsoft. The keynote features a hilarious video staring several big names such as Jay-Z, Bono, Stephen Spielberg, George Clooney, Hillary Clinton, etc. Enjoy the video bellow.

After he quit Microsoft office, he will focus on the work of his charitable organization, the Bill and Melinda Gates Foundation. This foundation has assigned more than $28 billion to those in need.

I wonder how his all time critics feel about his departure. As for Microsoft, he stressed that it is in good hands. I do not remember he had a lot of involvement in Microsoft Dynamics. I supposed there will not going to be any impact on Microsoft Dynamics Ax.

X++ Operators - Arithmetic and Assignment

Every programming language has a set of operators. They are used almost everywhere in code. They form the foundation for building functionalities. Dynamics Ax associate believes it is helpful to know what is offered in X++.

This post will cover the arithmetic and assignment operators. In the discussion, you will find the word expression. The expression here could be as simple as a number or a combination of various variables, operators, etc.

=

This operator assigns the result of expression to the right to the variable on the left. It is called the assignment operator.

Syntax

variable = expression

Example

int nVar = 2;
;
nVar = 12 - 3;
print nVar; // nVar is now 9.
pause;

?

This is called the ternary operator because it requires three expressions. The expression on the left is a condition. It will result in either true or false. The two expressions on the right separated by a colon are the result of the operation. If the condition is true, the expression on the left of the colon is returned. Otherwise, expression on the right of the colon is returned instead.

Syntax

expression1 ? expression2 : expression3

Example

int nVar = 2;
;
print nVar < 3 ? nVar + 1 : nVar - 1; // print output 3.
pause;

+=

This operator combines an arithmetic addition with an assignment operator. This operator assigns the current value of the variable to the left plus the expression on the right back to the variable on the left.

Syntax

variable += expression

Example

int nVar = 2;
;
nVar += 12 - 3;
print nVar; // nVar is now 11.
pause;

-=

This operator combines an arithmetic deduction with an assignment operator. This operator assigns the current value of the variable to the left minus the expression on the right back to the variable on the left.

Syntax

variable -= expression

Example

int nVar = 2;
;
nVar -= 12 - 3;
print nVar; // nVar is now -7.
pause;

++

This operator is used to increase a variable by one. Although this could be achieve with of other operators but this operator produces cleaner code.

Syntax

variable ++

Example

int nVar = 2;
;
nVar ++;
print nVar; // nVar is now 3.
pause;

--

This operator is used to decrease a variable by one.

Syntax

variable --

Example

int nVar = 2;
;
nVar --;
print nVar; // nVar is now 1.
pause;

+ (Plus)

This operator performs addition of two expressions.

Syntax

expression1 + expression2

Example

print 3 + 2; // Print output 5.
pause;

- (Minus)

This operator performs subtraction of expression on the right from expression on the left.

Syntax

expression1 - expression2

Example

print 3 - 2; // Print output 1.
pause;

* (Multiply)

This operator multiplies two expressions.

Syntax

expression1 * expression2

Example

print 3 * 2; // Print output 6.
pause;

/ (Divide)

This operator divides expression on the left with expression on the right.

Syntax

expression1 / expression2

Example

print 3 / 2; // Print output 1.5.
pause;

DIV

This operator performs integer division on expression on the left by expression on the right.

Syntax

expression1 DIV expression2

Example

print 5 DIV 2; // Print output 2.
pause;

MOD

This operator returns the remainder of an integer division of expression on the left by expression on the right.

Syntax

expression1 MOD expression2

Example

print 5 MOD 2; // Print output 1.
pause;

World's Cheapest Car - Tata Nano

January 10, 2008

India's Tata Motors Ltd unveiled the cheapest car in the market. The four-seater Nano will have a dealer price of 100,000 rupees which is approximately US$2,500. Consumer price will be higher due to taxes and dealer's margins though.

Ratan Tata at the launch of the Nano at the 9th Auto Expo in New Delhi. — AP

The picture above shows Mr Ratan N. Tata, Chairman of Tata Group and Tata Motors launching the Nano. The car is 3.1 meters in length, 1.5 meters wide and 1.6 meters in height.

At this price, consumer would naturally be concerned about the quality of the product. Tata, which has the only crash test facility in India, assured that the Nano exceeds current safety as well as environmental regulatory requirements.

The Nano is powered by a two-cylinder 623 cc multi point fuel injection petrol engine producing a maximum power of 33 PS. It is the first four-wheeler powered by a two-cylinder gasoline engine.

We will have to wait for the official figures to find out how it fares in the performance and fuel efficiency departments. You may read more about the world's cheapest car from Tata Motors unveils the People's Car at Tata Motors Media Centre.