Friday 27 April 2012

How to Change the Password Policy on Server 2008

You configure the password policy on your Windows 2008 server network by using the group policy object, or GPO. The GPO controls all aspects of your network including the password policy. The password policy preferences include setting a required length, characters and frequency for which the password must be changed. The benefit of a password policy is the protection from unauthorized access if a Windows 2008 password is compromised.

Instruction


1. Click the Windows "Start" button and enter "gpedit.msc" into the text box. Press "Enter" to open the GPO editor.
2. Click the "Computer Configuration" icon on the left side of the GPO editor. In the list of options displayed under this icon, click "Windows Settings," "Security Settings," "Account Policies" and then "Password Policy." This displays a list of password policy options in the center details pane.

3. Double-click one of the password policy options you want to implement. For instance, if you want to require a specific password length, double-click "Minimum password length." This opens a configuration dialog window.
4. Enter the properties for the policy. For instance, for the minimum password length, enter the minimum amount of characters required for a password. A typically minimum number of characters is eight for a network password.
5. Click the "OK" button to save your changes. Continue changing each policy until you have completed the requirements for the password policy. Close the GPO editor when you complete the changes.



Configuring the Windows Server 2008 R2 Firewall to Open Ports for 2X Solutions

To use 2X products on Windows Server 2008 R2 with Windows Firewall enabled, a group of ports must be opened for the services to communicate. The figure below shows the ports in use by 2X Software to communicate between 2X Services on different machines:
Sebastian 4.28.10 Figure 1
Note: In Figure 1, the “>>” implies direction, so that if Server A is connecting to Server B, it will show “A >> B”.
There are two ways to open ports in Windows 2008 R2: either using the MMC or by using the command line. To open a port in the firewall using the GUI, please do the following:
  • Open Port TCP 20002 on a Windows Server 2008 R2.
  • Logon using an administrator account.
  • Click Start and type “Firewall Advanced” in the Search box, or choose Start > Administrative Tools > Windows Firewall with Advanced Security.
  • If you use the search box, a list containing “Windows Firewall with Advanced Security” will appear; click on “Windows Firewall with Advanced Security” and the MMC will appear (Figure 2)
Sebastian 4.28.10 Figure 2
By default, the Windows Firewall will be enabled, and the following rules established: “Inbound Connections that do not match a rule are blocked,” and “Outbound connections that do not match a rule are allowed.”
Since the firewall configuration is already set to allow all outgoing connections, ports to be opened must be configured using the “Inbound Rules” option, by clicking on Inbound Rules on the left of the MMC (Figure 3), and click New Rule from the Right of the MMC (Figure 4).
 >Sebastian 4.28.10 Figure 3
Sebastian 4.28.10 Figure 4
The resulting wizard has five steps: Rule Type, Program/Protocol and Ports, Action, Profile and Name.
In the Rule Type section, select Port and click Next.
In the Protocol and Ports section, select the type of port (ex: TCP or UDP), using Figure 1.
Select the specific local ports and enter the port you wish to open, according to your scenario setup and Figure 1 (ex: Port 20002); then click Next.
In the Action section, select Allow the Connection, and click Next.
In the Profile section, make all three selections and click Next. If you wish to limit the connection to a particular profile, you can do so by selecting only the profiles you think are appropriate to your setup. As this section is somewhat unclear, it may be best to leave the port open in all profiles.
In the Name section, enter “2X Port number 20002”. You may change the 20002 to the port number you entered in the “Specific local ports” section. Include a description of the port, and why the selected port was opened (Ex: “Port in use by 2X to connect to 2X Publishing Agent”). Then click Finish.
Repeat the procedure above for each port and/or protocol you’d like to open. You’re now free to communicate safely!

Reference: http://www.2x.com/blog/2010/04/tech/configuring-the-windows-server-2008-r2-firewall-to-open-ports-for-2x-solutions/

Tuesday 24 April 2012

SQL Server: Easily importing XML Files

In SQL Server  importing XML files became very easy.
OPENROWSET now supports the BULK keyword which lets us import XML files with ease.
A little example:

CREATE TABLE XmlImportTest
(
    xmlFileName VARCHAR(300),
    xml_data xml
)
GO

DECLARE @xmlFileName VARCHAR(300)
SELECT  @xmlFileName = 'c:\TestXml.xml'
-- dynamic sql is just so we can use @xmlFileName variable in OPENROWSET
EXEC('
INSERT INTO XmlImportTest(xmlFileName, xml_data)

SELECT ''' + @xmlFileName + ''', xmlData 
FROM
(
    SELECT  * 
    FROM    OPENROWSET (BULK ''' + @xmlFileName + ''' , SINGLE_BLOB) AS XMLDATA
) AS FileImport (XMLDATA)
')
GO
SELECT * FROM XmlImportTest

DROP TABLE XmlImportTest

SINGLE_BLOB is recommended when importing XML files because only it supports all Windows encoding conversions.

http://weblogs.sqlteam.com/mladenp/archive/2007/06/18/60235.aspx

Wednesday 11 April 2012

1. Introduction to SMS Messaging

1.1. What is SMS (Short Message Service)?

SMS stands for Short Message Service. It is a technology that enables the sending and receiving of messages between mobile phones. SMS first appeared in Europe in 1992. It was included in the GSM (Global System for Mobile Communications) standards right at the beginning. Later it was ported to wireless technologies like CDMA and TDMA. The GSM and SMS standards were originally developed by ETSI. ETSI is the abbreviation for European Telecommunications Standards Institute. Now the 3GPP (Third Generation Partnership Project) is responsible for the development and maintenance of the GSM and SMS standards.
As suggested by the name "Short Message Service", the data that can be held by an SMS message is very limited. One SMS message can contain at most 140 bytes (1120 bits) of data, so one SMS message can contain up to:
  • 160 characters if 7-bit character encoding is used. (7-bit character encoding is suitable for encoding Latin characters like English alphabets.)
  • 70 characters if 16-bit Unicode UCS2 character encoding is used. (SMS text messages containing non-Latin characters like Chinese characters should use 16-bit character encoding.)
SMS text messaging supports languages internationally. It works fine with all languages supported by Unicode, including Arabic, Chinese, Japanese and Korean.
Besides text, SMS messages can also carry binary data. It is possible to send ringtones, pictures, operator logos, wallpapers, animations, business cards (e.g. VCards) and WAP configurations to a mobile phone with SMS messages.
One major advantage of SMS is that it is supported by 100% GSM mobile phones. Almost all subscription plans provided by wireless carriers include inexpensive SMS messaging service. Unlike SMS, mobile technologies such as WAP and mobile Java are not supported on many old mobile phone models.


1.2. Concatenated SMS Messages / Long SMS Messages

One drawback of the SMS technology is that one SMS message can only carry a very limited amount of data. To overcome this drawback, an extension called concatenated SMS (also known as long SMS) was developed. A concatenated SMS text message can contain more than 160 English characters. Concatenated SMS works like this: The sender's mobile phone breaks down a long message into smaller parts and sends each of them as a single SMS message. When these SMS messages reach the destination, the recipient mobile phone will combine them back to one long message.
The drawback of concatenated SMS is that it is less widely supported than SMS on wireless devices.


1.3. EMS (Enhanced Messaging Service)

Besides the data size limitation, SMS has another major drawback -- an SMS message cannot include rich-media content such as pictures, animations and melodies. EMS (Enhanced Messaging Service) was developed in response to this. It is an application-level extension of SMS. An EMS message can include pictures, animations and melodies. Also, the formatting of the text inside an EMS message is changeable. For example, the message sender can specify whether the text in an EMS message should be displayed in bold or italic, with a large font or a small font.
The drawback of EMS is that it is less widely supported than SMS on wireless devices. Also, many EMS-enabled wireless devices only support a subset of the features defined in the EMS specification. A certain EMS feature may be supported on one wireless device but not on the other.

http://www.developershome.com/sms/smsIntro.asp