Ever wondering how to use your Telstra NextG Blackberry Pearl on your laptop as a wireless modem? read on...
first, turn on the bluetooth on your blackberry and make is discoverable
turn on the bluetooth on your laptop and search for your blackberry
set your laptop connection on your blackberry as a trust connection
your laptop should detect the blackberry as a modem
go to control panel, go to phones and modem, find the new modem of your blackberry
go to its properties, click on advanced and put the following:
+CGDCONT=1,"IP","telstra.internet"
if you are using Telstra use the APN of Telstra which is: telstra.internet, otherwise, you need to find out from your service provider
create a dial up connection, use that modem - no username and password needed
the number to dial is: *99#
dial and connect!
Wednesday, April 23, 2008
Monday, April 07, 2008
Find the users' OU from Active Directory
If you need to find the Active Directory user accounts' OU, run the following script:
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
REM get the filename
If WSCript.Arguments.Count <> 1 Then
WScript.Echo "Text file contains user accounts must be supplied"
WScript.Quit 0
End If
dim filenamefilename = WScript.Arguments.Item(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objDictionary = CreateObject("Scripting.Dictionary")
Const ForReading = 1
Set objFile = objFSO.OpenTextFile (filename, ForReading)
i = 0
Do Until objFile.AtEndOfStream
strNextLine = objFile.Readline
If strNextLine <> "" Then
getOu strNextLine
End If
i = i + 1
Loop
objFile.Close
REM Sub to get username OU
Sub getOu( username )
objCommand.CommandText = "SELECT distinguishedName FROM 'LDAP://dc=domain,dc=com'" & "WHERE objectCategory='user' " & "AND sAMAccountName='" & username & "'"
Set objRecordSet = objCommand.Execute
If objRecordSet.EOF Then
WScript.Echo username & " does not exist "
Else
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strDN = objRecordSet.Fields("distinguishedName").Value
arrPath = Split(strDN, ",")
dim uOu
for each ou in arrPath
if Left( ou, 3 ) = "OU=" Then
if uOu = "" Then
uOu = ou
else
uOu = uOu & "," & ou
end if
end if
Next
uOu = username & " : " & uOu
Wscript.Echo uOu
objRecordSet.MoveNext
Loop
End If
End Sub
copy the above code to .vbs file (e.g. getOu.vbs). You also need to change the domain name from the LDAP query to your domain name in the code above.
Next, you need to create a text file just having a username per-line, e.g. users.txt
bgates
dduck
Next, run the the following:
cscript getOu.vbs c:\users.txt
Const ADS_SCOPE_SUBTREE = 2
Set objConnection = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
objConnection.Provider = "ADsDSOObject"objConnection.Open "Active Directory Provider"
Set objCommand.ActiveConnection = objConnection
objCommand.Properties("Page Size") = 1000
objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE
REM get the filename
If WSCript.Arguments.Count <> 1 Then
WScript.Echo "Text file contains user accounts must be supplied"
WScript.Quit 0
End If
dim filenamefilename = WScript.Arguments.Item(0)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objDictionary = CreateObject("Scripting.Dictionary")
Const ForReading = 1
Set objFile = objFSO.OpenTextFile (filename, ForReading)
i = 0
Do Until objFile.AtEndOfStream
strNextLine = objFile.Readline
If strNextLine <> "" Then
getOu strNextLine
End If
i = i + 1
Loop
objFile.Close
REM Sub to get username OU
Sub getOu( username )
objCommand.CommandText = "SELECT distinguishedName FROM 'LDAP://dc=domain,dc=com'" & "WHERE objectCategory='user' " & "AND sAMAccountName='" & username & "'"
Set objRecordSet = objCommand.Execute
If objRecordSet.EOF Then
WScript.Echo username & " does not exist "
Else
objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strDN = objRecordSet.Fields("distinguishedName").Value
arrPath = Split(strDN, ",")
dim uOu
for each ou in arrPath
if Left( ou, 3 ) = "OU=" Then
if uOu = "" Then
uOu = ou
else
uOu = uOu & "," & ou
end if
end if
Next
uOu = username & " : " & uOu
Wscript.Echo uOu
objRecordSet.MoveNext
Loop
End If
End Sub
copy the above code to .vbs file (e.g. getOu.vbs). You also need to change the domain name from the LDAP query to your domain name in the code above.
Next, you need to create a text file just having a username per-line, e.g. users.txt
bgates
dduck
Next, run the the following:
cscript getOu.vbs c:\users.txt
Friday, April 04, 2008
View SQL 2005 Table Fragmentation
To view how fragmented your table is, run the following query:
USE dbname
GO
SELECT CAST(DB_NAME(DATABASE_ID) AS VARCHAR(20)) AS 'DatabaseName',
CAST(OBJECT_NAME([OBJECT_ID]) AS VARCHAR(20)) AS 'TableName',
INDEX_ID,
CAST(INDEX_TYPE_DESC AS VARCHAR(20)) AS INDEX_TYPE_DESC,
AVG_FRAGMENTATION_IN_PERCENT
FROM SYS.DM_DB_INDEX_PHYSICAL_STATS (DB_ID('dbname'),OBJECT_ID('dbo.tablename'),NULL,NULL,NULL );
GO
USE dbname
GO
SELECT CAST(DB_NAME(DATABASE_ID) AS VARCHAR(20)) AS 'DatabaseName',
CAST(OBJECT_NAME([OBJECT_ID]) AS VARCHAR(20)) AS 'TableName',
INDEX_ID,
CAST(INDEX_TYPE_DESC AS VARCHAR(20)) AS INDEX_TYPE_DESC,
AVG_FRAGMENTATION_IN_PERCENT
FROM SYS.DM_DB_INDEX_PHYSICAL_STATS (DB_ID('dbname'),OBJECT_ID('dbo.tablename'),NULL,NULL,NULL );
GO
Sunday, March 09, 2008
Microsoft SQL 2005 Failover Cluster
Today, I'd like to share creating SQL 2005 Failover Cluster with Microsoft Virtual Server 2005. This involves creating 3x virtual Windows 2003 Enterprise Edition on Virtual Server, creating Quorum disks, configuring cluster and installing SQL 2005
To start, download the Microsoft Virtual Server 2005 here, Virtual Machine Remote Control Client Plus here. Install the Virtual Server 2005, but don't install the Web Server Administration part - we are going to manage it with the VMRCplus. Install the VMRCplus once the Virtual Server 2005 installation finished.
Create a Windows 2003 Enterprise Edition Template
Create a new virtual machine template with the following specs:
1x Dynamic HDD (IDE) - size: 10GB
1x NIC - connects to the Internal Network
512MB RAM

Boot the VM, install Windows 2003 Ent edition, install the VM additional tools and sysprep the machine, shut down
Create a Domain Controller
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB

1x NIC - connects to the Internal Network
start the virtual machine and do the following:
Create a new virtual network to be used by the cluster for heartbeat. From VM manager, click on Virtual Networks and Create a new network, with physical adapter: None (Guests Only)

Create The First Node (NODE1)
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB
3x SCSI Adapters - all with Share SCSI bus and using SCSI adapter ID: 7
2x NIC - connects to the Internal Network and Heartbeat Network
3x Fixed HDD (SCSI) - size: 1GB (cluster quorum), 10GB (SQL data shared drive) and 1GB (MSDTC shared drive)


start the virtual machine and do the following:
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB
2x NIC - connects to the Internal Network and Heartbeat Network
3x SCSI Adapters - all with Share SCSI bus and using SCSI adapter ID: 7. Assign the HDD (.vhd) files to the NODE1 vhd files according to its purposes (e.g. SCSI 0:0 -> cluster quorum, SCSI 1:0 -> SQL data shared drive, SCSI 3:0 -> MSDTC drive)

start the virtual machine and do the following:
Create a Cluster
Start NODE1 virtual machine (make sure NODE2 is off)
start the cluster administratorr
create a new cluster, named: SQL
cluster IP address: 192.168.0.30
cluster account: _cluster
choose Q: as the quorum drive
Start NODE2
On NODE1 do the followings:
add NODE2 to the cluster
change the preference of the private network to use the second NIC card
Create Resource Group For MSDTC
on NODE1, start the cluster administrator and do the followings:
To enable MSDTC, do the followings:
Create Resource Group For SQL
on NODE1, start the cluster administrator and do the followings:
SQL 2005 Installation
run the SQL 2005 setup
on 'Components to Install' setup page, make sure the 'failover cluster' option is selected

virtual servername: sql-cluster
network use: publicIP address: 192.168.0.50
on 'Cluster Group Selection' setup page, select the SQL cluster group for the virtual server resources
make sure NODE2 is selected on the nodes to be included in the virtual server
use the _sql user account for all the services
specify 'NET\SQL Cluster ' as the domain group
Testing
once the SQL 2005 installation finished, you can try to failover the cluster from one node to the other by 'Move Group' from the SQL resource group option
you can also try install the SQL Management Studio on the other computer (e.g. DC) and try to connect to the clustered name of the SQL - sql-cluster.domain.com

References:
http://msdn2.microsoft.com/en-us/library/ms179530.aspx
http://msdn2.microsoft.com/en-us/library/ms189910.aspx
http://support.microsoft.com/kb/301600
http://support.microsoft.com/kb/817064
http://support.microsoft.com/kb/258750
To start, download the Microsoft Virtual Server 2005 here, Virtual Machine Remote Control Client Plus here. Install the Virtual Server 2005, but don't install the Web Server Administration part - we are going to manage it with the VMRCplus. Install the VMRCplus once the Virtual Server 2005 installation finished.
Create a Windows 2003 Enterprise Edition Template
Create a new virtual machine template with the following specs:
1x Dynamic HDD (IDE) - size: 10GB
1x NIC - connects to the Internal Network
512MB RAM
Boot the VM, install Windows 2003 Ent edition, install the VM additional tools and sysprep the machine, shut down
Create a Domain Controller
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB
1x NIC - connects to the Internal Network
start the virtual machine and do the following:
- rename the machine to: DC
- give an IP address: 192.168.0.1
- install DNS
- dcpromo
- reboot
- create 2x service accounts: _cluster and _sql
- create domain group for SQL cluster: SQL Cluster
Create a new virtual network to be used by the cluster for heartbeat. From VM manager, click on Virtual Networks and Create a new network, with physical adapter: None (Guests Only)
Create The First Node (NODE1)
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB
3x SCSI Adapters - all with Share SCSI bus and using SCSI adapter ID: 7
2x NIC - connects to the Internal Network and Heartbeat Network
3x Fixed HDD (SCSI) - size: 1GB (cluster quorum), 10GB (SQL data shared drive) and 1GB (MSDTC shared drive)
start the virtual machine and do the following:
- rename the machine to: NODE1
- change the IP address: NIC1: 192.168.0.10/24, DNS: 192.168.0.1; NIC2: 10.0.0.1/8
- join the computer to the domain
- reboot
- activate 3x SCSI drives, primary partition: cluster quorum -> Q:, SQL data -> S:, MSDTC -> M:
- install .net framework 2
- install 'Enable network DTC access'
- shutdown
Create a new virtual machine with the following specs:
Parent: Template
1x Differencing HDD (IDE) - size: 10 GB
2x NIC - connects to the Internal Network and Heartbeat Network
3x SCSI Adapters - all with Share SCSI bus and using SCSI adapter ID: 7. Assign the HDD (.vhd) files to the NODE1 vhd files according to its purposes (e.g. SCSI 0:0 -> cluster quorum, SCSI 1:0 -> SQL data shared drive, SCSI 3:0 -> MSDTC drive)
start the virtual machine and do the following:
- rename the machine to: NODE2
- change the IP address: NIC1: 192.168.0.2024, DNS: 192.168.0.1; NIC2: 10.0.0.2/8
- join the computer to the domain
- reboot
- assign drive letters to 3x SCSI drives: cluster quorum -> Q:, SQL data -> S:, MSDTC -> M:
- install .net framework 2
- install 'Enable network DTC access'
- shutdown
Create a Cluster
Start NODE1 virtual machine (make sure NODE2 is off)
start the cluster administratorr
create a new cluster, named: SQL
cluster IP address: 192.168.0.30
cluster account: _cluster
choose Q: as the quorum drive
Start NODE2
On NODE1 do the followings:
add NODE2 to the cluster
change the preference of the private network to use the second NIC card
Create Resource Group For MSDTC
on NODE1, start the cluster administrator and do the followings:
- rename the Group1 groups to MSDTC
- create a new resource, IP address; no dependencies, both NODE1 and NODE2 as possible owners and IP address: 192.168.0.40/24
- create a new resource, Network Name; depends on IP address, both NODE1 and NODE2 as possible owners and Network Name: MSDTC
- create a new resource, Distributed Transaction Coordinator; depends on Disk M: and Network Name
To enable MSDTC, do the followings:
- In Control Panel, open "Component services".
- Expand Component Services, expand Computers, right-click My Computer, and then click Properties.
- On the MSDTC tab, click Secuity Configuration under Transaction Configuration, click to select the Network DTC Access check box under Secuity Settings, and then click to select the following check boxes under Transaction Manager Communication:• Allow Inbound• Allow Outbound
- You cannot select Mutual Authentication Required. Therefore, click to select one of the following check boxes:• Incoming Caller Authentication Required• No Authentication RequiredNote For more information about these options, click the following article number to view the article in the Microsoft Knowledge Base:899191 (http://support.microsoft.com/kb/899191/) New functionality in the Distributed Transaction Coordinator service in Windows Server 2003 Service Pack 1 and in Windows XP Service Pack 2
- Make sure that the Logon Account is set to NTAUTHORITY\NetworkService.
- Click OK. A message box explains that the MS DTC Service will be stopped and restarted, and that all dependent services will also be stopped and restarted. Click Yes.
Note If this is a Majority Node Set (MNS) cluster, do not use the MNS resource as the storage device for MS DTC. MS DTC requires a storage resource such as a physical disk. - Restart NODE1.
Create Resource Group For SQL
on NODE1, start the cluster administrator and do the followings:
- rename Group0 to SQL
- make sure NODE1 is the active node for S: drive, cluster and MSDTC
SQL 2005 Installation
run the SQL 2005 setup
on 'Components to Install' setup page, make sure the 'failover cluster' option is selected
virtual servername: sql-cluster
network use: publicIP address: 192.168.0.50
on 'Cluster Group Selection' setup page, select the SQL cluster group for the virtual server resources
make sure NODE2 is selected on the nodes to be included in the virtual server
use the _sql user account for all the services
specify 'NET\SQL Cluster ' as the domain group
Testing
once the SQL 2005 installation finished, you can try to failover the cluster from one node to the other by 'Move Group' from the SQL resource group option
you can also try install the SQL Management Studio on the other computer (e.g. DC) and try to connect to the clustered name of the SQL - sql-cluster.domain.com
References:
http://msdn2.microsoft.com/en-us/library/ms179530.aspx
http://msdn2.microsoft.com/en-us/library/ms189910.aspx
http://support.microsoft.com/kb/301600
http://support.microsoft.com/kb/817064
http://support.microsoft.com/kb/258750
Wednesday, February 13, 2008
Reverse Proxy with IIS
Have you ever needed to do reverse proxy using IIS? if yes, read on.
You need to have ISAPI REWRITE product from here
Install on your IIS server and put the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my.external-domain.com$
RewriteProxy ^(.*) http://my.internal-domain.com:9999/$1 [H,A,L]
This allows you to access my.external-domain.com from the Internet over HTTP (Port 80) and then proxied by IIS with the help of ISAPI to your my.internal-domain.com port 9999 which is located on the other internal 'inaccessible-from-the-Internet' server.
You need to have ISAPI REWRITE product from here
Install on your IIS server and put the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my.external-domain.com$
RewriteProxy ^(.*) http://my.internal-domain.com:9999/$1 [H,A,L]
This allows you to access my.external-domain.com from the Internet over HTTP (Port 80) and then proxied by IIS with the help of ISAPI to your my.internal-domain.com port 9999 which is located on the other internal 'inaccessible-from-the-Internet' server.
Monday, February 04, 2008
Windows Systems Wide Proxy
Sometime an application needs to be able to use a proxy to run properly. The best approach to do this is the application is able to adapt with the Internet Explorer proxy setting.
However, some applications are not 'smart' enough to get the proxy setting from the IE, therefore, a systems wide setting must be set.
Prior to Windows Vista, systems wide proxy setting is set by using: proxycfg.exe
With Windows Vista, you need to do:
netsh
netsh> winhttp
netsh winhttp> set proxy proxy.domain.tld:8080
Note: You must run this from CMD 'run as administrator'
However, some applications are not 'smart' enough to get the proxy setting from the IE, therefore, a systems wide setting must be set.
Prior to Windows Vista, systems wide proxy setting is set by using: proxycfg.exe
With Windows Vista, you need to do:
netsh
netsh> winhttp
netsh winhttp> set proxy proxy.domain.tld:8080
Note: You must run this from CMD 'run as administrator'
Wednesday, January 30, 2008
Publish InfoPath Form to SharePoint Server 2007
This documentation will guide you how to publish an InfoPath form to SharePoint Server 2007. Published forms in SharePoint will be used as a template in a library, particularly in a form library.
Create a Form Library
You need a Form Library in SharePoint before you publish the InfoPath form as a template to the library. If you can publish directly from InfoPath to SharePoint, you have the option to create the library on-the-fly when you are publishing the form using the publishing wizard. However, if you need to publish it manually, the library must be created before the form is published.
To create a form library, go to any site collection and click on Site Actions – Create (you must have permission to do this)

Under Libraries, choose the Form Library. Enter the name of the library, description and click the Create button
Create the InfoPath Form
Start designing the InfoPath form template. Make sure when creating a new form template, the ‘enable browser-compatible features only’ is checked – if you want to be able to open the form from the web browser. This allows users to view/open the forms without having to have InfoPath application installed on their PC.

This document does not teach you how to design an InfoPath form. Please visit Microsoft website for more details how to design InfoPath form.
Setup the InfoPath Property Promotion
You can promote the properties of the InfoPath form so that they become available as the content type of the form library in SharePoint. This allows you to view the properties of the InfoPath form directly from the SharePoint columns of the library.
From the InfoPath click: Tools – Form Options …
Click on Property Promotion category
Click Add… button and choose the fields to be added and click OK


Setup the InfoPath Compatibility
After you have finished designing your template, set the compatibility to be web browser enabled.
From the InfoPath click: Tools – Form Options …
Click on Compatibility category
Tick the ‘Design a form template that can be opened in a browser or InfoPath’ checkbox

Optionally, you can enter the URL where the Forms Services is running to verify the form with the server
Setup the InfoPath Security Setting
Security setting must be set to: Domain
From the InfoPath click: Tools – Form Options …
Click on Security and Trust category
Select the Domain radio box

Verify the InfoPath Form
Click on the Design Checker from the Design Tasks panel once you are ready to publish the form


Make sure you are getting 0 errors:

Publish the Form Template to SharePoint
To publish the form to SharePoint, click on Publish Form Template… from the Design Tasks panel

From the publishing wizard, you will see four options. You can try to publish directly to a SharePoint server by choosing the first option

Enter the URL of your site collection in which you created the form library

However, you might get the following error message:

If you are getting this error message, it is most likely that you cannot publish the form directly to the SharePoint server. Microsoft does not have solution at the time of this writing – workaround will be discussed later (Publish to a network location). Note this error only happens to InfoPath 2007. If you are using InfoPath 2003, most of the time you can publish directly to SharePoint.
If you are not getting the error message, you will be prompted to choose which library do you want to publish the form template to. Just follow the wizard.
If you successfully published the form directly to the SharePoint, you should have a new form template replaced with your InfoPath form template in your form library when you are creating a new document from the library

Publish InfoPath to a Network Location
This publishing method is an alternative or work around to publish the InfoPath form to SharePoint if the form can not be published directly to the SharePoint.
To publish the form to a network location, click on Publish Form Template… from the Design Tasks panel

From the publishing wizard, choose the third option

Specify the form template path where to save the form template (local or shared folder) and give the name for the form template

For the access path, make sure you left this field empty (!!)

Warning dialog box come out, click OK

Click Publish to finish

Upload The Published InfoPath Form Template to the MOSS Form Templates
You must have permission to SharePoint central administration to upload the form to form templates.
Go to Central Administration – Application Management
Under InfoPath Forms Services, click on Upload form template
Browse to the form that published earlier and click Upload
If you see error message, fix the template and try to upload again
Activate the New Form Template
The new form template must be activated before it can be used throughout a site collection.
Go to Central Administration – Application Management
Under InfoPath Forms Services, click on Manage Form Templates
Find the new form click on the arrow button and choose Activate to a Site Collection

Choose the site collection and click OK
Add the content type to the Form Library
Once the form template has been activated, the template can be used as a new content type for a library.
To assign the form template as a content type for a form library:
Go to the form library
Click on Settings – Form Library Setting

Under General Settings, click on Advanced settings
Choose Yes for allow management of content types, and click OK
Under Content Types, click on Add from existing site content type
From available Site Content Types, choose the new content type, click Add > and OK

Note: Under columns, you should see new columns that are the template properties being promoted earlier

Assign the Columns to View
By default, the view does not show the new content types. View must be changed to be able to show the content types.
From the form library, click on View: All Documents – Modify this View

Under Columns, tick the checkboxes that needs to be displayed and change the position as needed

Test the Template
The template has now been assigned to the form library. If you click new, you should see the new template name

If you choose the new template, is should open the InfoPath application (if you have it installed on your PC) or render the form to HTML based form. Once you have finished filling out the form, it depends on how the form was designed, it should be saved to the form library
When the form is saved to the library, you will see the properties of the from are picked up by the columns content type
Create a Form Library
You need a Form Library in SharePoint before you publish the InfoPath form as a template to the library. If you can publish directly from InfoPath to SharePoint, you have the option to create the library on-the-fly when you are publishing the form using the publishing wizard. However, if you need to publish it manually, the library must be created before the form is published.
To create a form library, go to any site collection and click on Site Actions – Create (you must have permission to do this)
Under Libraries, choose the Form Library. Enter the name of the library, description and click the Create button
Create the InfoPath Form
Start designing the InfoPath form template. Make sure when creating a new form template, the ‘enable browser-compatible features only’ is checked – if you want to be able to open the form from the web browser. This allows users to view/open the forms without having to have InfoPath application installed on their PC.
This document does not teach you how to design an InfoPath form. Please visit Microsoft website for more details how to design InfoPath form.
Setup the InfoPath Property Promotion
You can promote the properties of the InfoPath form so that they become available as the content type of the form library in SharePoint. This allows you to view the properties of the InfoPath form directly from the SharePoint columns of the library.
From the InfoPath click: Tools – Form Options …
Click on Property Promotion category
Click Add… button and choose the fields to be added and click OK
Setup the InfoPath Compatibility
After you have finished designing your template, set the compatibility to be web browser enabled.
From the InfoPath click: Tools – Form Options …
Click on Compatibility category
Tick the ‘Design a form template that can be opened in a browser or InfoPath’ checkbox
Optionally, you can enter the URL where the Forms Services is running to verify the form with the server
Setup the InfoPath Security Setting
Security setting must be set to: Domain
From the InfoPath click: Tools – Form Options …
Click on Security and Trust category
Select the Domain radio box
Verify the InfoPath Form
Click on the Design Checker from the Design Tasks panel once you are ready to publish the form
Make sure you are getting 0 errors:
Publish the Form Template to SharePoint
To publish the form to SharePoint, click on Publish Form Template… from the Design Tasks panel
From the publishing wizard, you will see four options. You can try to publish directly to a SharePoint server by choosing the first option
Enter the URL of your site collection in which you created the form library
However, you might get the following error message:
If you are getting this error message, it is most likely that you cannot publish the form directly to the SharePoint server. Microsoft does not have solution at the time of this writing – workaround will be discussed later (Publish to a network location). Note this error only happens to InfoPath 2007. If you are using InfoPath 2003, most of the time you can publish directly to SharePoint.
If you are not getting the error message, you will be prompted to choose which library do you want to publish the form template to. Just follow the wizard.
If you successfully published the form directly to the SharePoint, you should have a new form template replaced with your InfoPath form template in your form library when you are creating a new document from the library
Publish InfoPath to a Network Location
This publishing method is an alternative or work around to publish the InfoPath form to SharePoint if the form can not be published directly to the SharePoint.
To publish the form to a network location, click on Publish Form Template… from the Design Tasks panel
From the publishing wizard, choose the third option
Specify the form template path where to save the form template (local or shared folder) and give the name for the form template
For the access path, make sure you left this field empty (!!)
Warning dialog box come out, click OK
Click Publish to finish
Upload The Published InfoPath Form Template to the MOSS Form Templates
You must have permission to SharePoint central administration to upload the form to form templates.
Go to Central Administration – Application Management
Under InfoPath Forms Services, click on Upload form template
Browse to the form that published earlier and click Upload
If you see error message, fix the template and try to upload again
Activate the New Form Template
The new form template must be activated before it can be used throughout a site collection.
Go to Central Administration – Application Management
Under InfoPath Forms Services, click on Manage Form Templates
Find the new form click on the arrow button and choose Activate to a Site Collection
Choose the site collection and click OK
Add the content type to the Form Library
Once the form template has been activated, the template can be used as a new content type for a library.
To assign the form template as a content type for a form library:
Go to the form library
Click on Settings – Form Library Setting
Under General Settings, click on Advanced settings
Choose Yes for allow management of content types, and click OK
Under Content Types, click on Add from existing site content type
From available Site Content Types, choose the new content type, click Add > and OK
Note: Under columns, you should see new columns that are the template properties being promoted earlier
Assign the Columns to View
By default, the view does not show the new content types. View must be changed to be able to show the content types.
From the form library, click on View: All Documents – Modify this View
Under Columns, tick the checkboxes that needs to be displayed and change the position as needed
Test the Template
The template has now been assigned to the form library. If you click new, you should see the new template name
If you choose the new template, is should open the InfoPath application (if you have it installed on your PC) or render the form to HTML based form. Once you have finished filling out the form, it depends on how the form was designed, it should be saved to the form library
When the form is saved to the library, you will see the properties of the from are picked up by the columns content type
Thursday, December 27, 2007
SharePoint 2007 - Not enough storage is available to process this command
I have been getting this error message from our SharePoint server:
Time: 20071227163429.000000+660
Type: Error
Event ID: 6482
Message: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (6de3e5d2-33f9-4223-a750-284f8d826641).
Reason: Not enough storage is available to process this command.
Techinal Support Details:
System.Runtime.InteropServices.COMException (0x80070008): Not enough storage is available to process this command.
Server stack trace:
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_IsContainer()
at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
at Microsoft.SharePoint.AdministrationOperation.Metabase.MetabaseObjectCollection`1.Find(String name)
at Microsoft.SharePoint.AdministrationOperation.Metabase.MetabaseObjectCollection`1.get_Item(String name)
at Microsoft.SharePoint.AdministrationOperation.SPProvisioningAssistant.ProvisionIisApplicationPool(String name, ApplicationPoolIdentityType identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.SharePoint.AdministrationOperation.SPAdministrationOperation.DoProvisionIisApplicationPool(String name, Int32 identityType, String userName, String password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.AdministrationOperation.SPAdministrationOperation.DoProvisionIisApplicationPool(String name, Int32 identityType, String userName, String password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.SharePoint.Administration.SPMetabaseManager.ProvisionIisApplicationPool(String name, Int32 identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.Office.Server.Administration.SharedWebServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob) http://eventid.net/display.asp?eventid
and
Time: 20071227163341.000000+660
Type: Error
Event ID: 6398
Message: The Execute method of job definition Microsoft.Office.Server.Administration.ApplicationServerAdministrationServiceJob (ID 60dda38f-4b1d-4286-a12d-3cfbb8eb02b8) threw an exception. More information is included below.
Old format or invalid type library.
There are a lot of talks about this issue on the Net - solution with hotfix: KB923145 or KB923028 - but I am not convinced that was the solution for this issue.
The work around is to reboot the server - but this is not a solution at all for a production server!
To temporarily stop this event error, restart the "Windows SharePoint Services Administration" and "Windows SharePoint Services Timer" services.
I hope SP1 will fix this issue :)
Time: 20071227163429.000000+660
Type: Error
Event ID: 6482
Message: Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (6de3e5d2-33f9-4223-a750-284f8d826641).
Reason: Not enough storage is available to process this command.
Techinal Support Details:
System.Runtime.InteropServices.COMException (0x80070008): Not enough storage is available to process this command.
Server stack trace:
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_IsContainer()
at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
at System.DirectoryServices.DirectoryEntries.Find(String name, String schemaClassName)
at Microsoft.SharePoint.AdministrationOperation.Metabase.MetabaseObjectCollection`1.Find(String name)
at Microsoft.SharePoint.AdministrationOperation.Metabase.MetabaseObjectCollection`1.get_Item(String name)
at Microsoft.SharePoint.AdministrationOperation.SPProvisioningAssistant.ProvisionIisApplicationPool(String name, ApplicationPoolIdentityType identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.SharePoint.AdministrationOperation.SPAdministrationOperation.DoProvisionIisApplicationPool(String name, Int32 identityType, String userName, String password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.SharePoint.AdministrationOperation.SPAdministrationOperation.DoProvisionIisApplicationPool(String name, Int32 identityType, String userName, String password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.SharePoint.Administration.SPMetabaseManager.ProvisionIisApplicationPool(String name, Int32 identityType, String userName, SecureString password, TimeSpan idleTimeout, TimeSpan periodicRestartTime)
at Microsoft.Office.Server.Administration.SharedWebServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob) http://eventid.net/display.asp?eventid
and
Time: 20071227163341.000000+660
Type: Error
Event ID: 6398
Message: The Execute method of job definition Microsoft.Office.Server.Administration.ApplicationServerAdministrationServiceJob (ID 60dda38f-4b1d-4286-a12d-3cfbb8eb02b8) threw an exception. More information is included below.
Old format or invalid type library.
There are a lot of talks about this issue on the Net - solution with hotfix: KB923145 or KB923028 - but I am not convinced that was the solution for this issue.
The work around is to reboot the server - but this is not a solution at all for a production server!
To temporarily stop this event error, restart the "Windows SharePoint Services Administration" and "Windows SharePoint Services Timer" services.
I hope SP1 will fix this issue :)
Monday, December 24, 2007
BlackBerry Enterprise Server Upgrade
If you have a plan to upgrade your BES from version 4.0 to version 4.1, read on...
There are 3 methods of upgrade options: in-place, cutover and phased. I am going to show you the cutover method which installs the new BES on the new computer and migrates database from the old BES to the new one.
Let's assume your existing server name is oldbes, the new server name is newbes. You have an AD service account called: besadmin and your MSDE configuration database is stored in BESMgmt
Step-by-step
There are 3 methods of upgrade options: in-place, cutover and phased. I am going to show you the cutover method which installs the new BES on the new computer and migrates database from the old BES to the new one.
Let's assume your existing server name is oldbes, the new server name is newbes. You have an AD service account called: besadmin and your MSDE configuration database is stored in BESMgmt
Step-by-step
- Install Windows 2003 + SP2 on the new server and name it newbes. Join to the domain where the oldbes server domain is located. Give a temporary static IP address
- Add besadmin as a local administrator and give right to 'Log on as a service' in the local security settings of the newbes computer
- Login to the oldbes computer as besadmin; we are going to backup the database (MSDE): Open the cmd prompt and run:
osql -E
1> backup database BESMgmt to disk="C:\BESMgmt.bak"
2> go
3> quit
- Login to the newbes computer as besadmin; install the MSDEA from microsoft with the following command, and start the MSSQLSERVER service and change the startup type to automatic:
setup.exe SAPWD="yoursapassword"
- Download the MAPI client and CDO from Microsoft, and install it on newbes computer
- Restore the database to the newbes computer (login as besadmin); copy the BESMgmt.bak file from the oldbes computer to C:\ drive of newbes computer. Open the command prompt:
osql –E
1> restore database BESMgmt from disk = “C:\BESMgmt.bak” with recovery, replace
2> go
3> quit
- Login to oldbes computer as besadmin, and stop all BES services and change all the services startup type to disabled. Change the IP address of oldbes to different IP address; Change the IP address of newbes to oldbes's old IP address - this to make sure the Firewall still allow port 3101 outbound to RIM from the newbes computer
- Now depending on your service pack level of BES installed on the oldbes computer, you need to install them again exactly to the same service pack level on the newbes computer. For example: if your oldbes is version 4.0.6, then you need to install the same version of BES to the newbes computer
- During the installation on the newbes, it will ask you for the "BlackBerry Server Name:" you need to give the oldbes computer name, NOT the newbes!
- Once you have got to the same service pack level installed on the newbes computer, start install the 4.1 version of BES; It will ask you to upgrade the database, and Click Yes to upgrade the database
- Follow the rest of the installation and you are done!
Thursday, December 13, 2007
BartPE with USB key
I've got this working finally - install BartPE to USB key. With additional plugins, this helps a lot when you want to 'ghost' and doing other stuff
steps:
Buy a USB flash disk > 1 GB
Download the latest BartPE - link
Install BartPE, e.g. C:\bartpe
Download Windows 2003 SP1 - link
Extract the Windows 2003 SP1 to temp folder:
w2k3sp1.exe -x, e.g. c:\temp
Create a folder in the bartpe:
c:\bartpe\srsp1
Copy the extracted files to the srsp1 folders:
copy c:\temp\i386\setupldr.bin c:\bartpe\srsp1
Expand ramdisk.sys file
expand -r c:\temp\i386\ramdisk.sy_ c:\bartpe\srsp1
Build your BartPE as normal, use the Windows 2003 + SP1 CD as the source files and you must output the file to "BartPE" folder. You do not need to generate ISO file. You might want to add plugins, and drivers before you build this
To format and build the image to the USB Drive - Z: - (first time only):
pe2usb -f Z:
If you do not want to format, just run:
pe2usb Z:
steps:
Buy a USB flash disk > 1 GB
Download the latest BartPE - link
Install BartPE, e.g. C:\bartpe
Download Windows 2003 SP1 - link
Extract the Windows 2003 SP1 to temp folder:
w2k3sp1.exe -x, e.g. c:\temp
Create a folder in the bartpe:
c:\bartpe\srsp1
Copy the extracted files to the srsp1 folders:
copy c:\temp\i386\setupldr.bin c:\bartpe\srsp1
Expand ramdisk.sys file
expand -r c:\temp\i386\ramdisk.sy_ c:\bartpe\srsp1
Build your BartPE as normal, use the Windows 2003 + SP1 CD as the source files and you must output the file to "BartPE" folder. You do not need to generate ISO file. You might want to add plugins, and drivers before you build this
To format and build the image to the USB Drive - Z: - (first time only):
pe2usb -f Z:
If you do not want to format, just run:
pe2usb Z:
USB drive won't get assigned drive letter automatically
I had this issue with my computer:
when I plug in any USB drive to my computer, the disk management can see the drive, but it won't assign any drive letter to it. I have to assign the letter manually before I can see the files in it.
To fix it, I disable a service called: SPTD
go to the regedit:
My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sptd
change the Start key from 0 (start) to 4 (disable)
when I plug in any USB drive to my computer, the disk management can see the drive, but it won't assign any drive letter to it. I have to assign the letter manually before I can see the files in it.
To fix it, I disable a service called: SPTD
go to the regedit:
My Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\sptd
change the Start key from 0 (start) to 4 (disable)
Monday, November 19, 2007
Unified Communications Launch 2007
Today, I was attending the Microsoft Unified Communications Launch 2007 at Westin, Sydney. It was a great event - there were talk about Exchange 2007 UM with voice-mailbox, Office Communication Server 2007 (OCS) architecture, OCS integration with existing PABX environment with mediation server and how Microsoft IT deployed OCS to its corporate environment!
Thanks to Jabra for giving us a free headset! :)
For more details: click here
Sunday, November 11, 2007
Flex dynamically create ComboBox with dataProvider from HTTPService
Well, now I am working on my own (sponsored) project during my free time. Cut the long story short, I have been working on Stock Control application for a major eBay seller in Australia. The project has been running for about 4 years now. The application is complex and fun, it supports multiple sites and items synchronization.
The existing application runs on PHP5 and MySQL. Furthermore, NUSOAP is also used to support third-party Web Service API calls to the application.
Fun has the limit for this project until I recently come out with the idea to re-design the client user interface (UI) and the integration layer to connect to the existing business/backend layer. I have decided to taste the sweetness of Flex and Zend Framework and they are awesome!
Flex uses HTTPService to asynchronously get the data from the PHP that produces XML. This XML is used to bind to a datasource for a Flex component (e.g. ComboBox). If you are using MXML tag to create the ComboBox, and assign the dataProvider to HTTPService result, you won't have issue.
However, if you need to create the ComboBox dynamically using Action Script, when you try to bind the dataSource to the XML result from the HTTPService, you will get an error saying:
Cannot access a property or method of a null object reference
This is because the execution of binding the dataSource to the XML returned from HTTPService is faster than the HTTPService itself, for example:
You have HTTPService and ComboBox objects:
1 var httpTemp:HTTPService = new HTTPService();
2 httpTemp.url = http://www.tempuri.org/xml.php;
3 httpTemp.resultFormat = "e4x";
4 httpTemp.send();
5
6 var newComboBox:ComboBox = new ComboBox();
7 newComboBox.dataProvider = httpTemp.result;
Even though line 4 is executed first, however because it takes a while to return the XML data, thus when line 7 is executed, the httpTemp.result object does not exist yet and error occurs.
To solve this:
Create a bindable vars
[Bindable] public var xmlResult:XML;
[Bindable] public var newComboBox:ComboBox;
Create a result event handler for HTTPService:
private function httpTempResultHandler( e:ResultEvent ):void
{
xmlResult = e.result as XML;
newComboBox.dataProvider = xmlResult.Category;
}
Create the ComboBox object:
//create a new instance of ComboBox
newComboBox = new ComboBox();
var httpTemp:HTTPService = new HTTPService();
Create a dummy result:
var tempString:String = '0 ';
xmlResult = new XML(tempString);
Create a result event listener:
httpTemp.url = "http://www.tempuri.org/xml.php";
httpTemp.resultFormat = "e4x";
//add the result event listener
httpTemp.addEventListener(ResultEvent.RESULT, httpTempResultHandler, false, 0);
httpTemp.send();
Assign the XML to the dataProvider:
newComboBox.dataProvider = xmlResult.Category;
This assigns a dummy result to the dataProvider and when the HTTPService result event handler called, the bind-able xmlResult will be used with the result from the HTTPService.
The existing application runs on PHP5 and MySQL. Furthermore, NUSOAP is also used to support third-party Web Service API calls to the application.
Fun has the limit for this project until I recently come out with the idea to re-design the client user interface (UI) and the integration layer to connect to the existing business/backend layer. I have decided to taste the sweetness of Flex and Zend Framework and they are awesome!
Flex uses HTTPService to asynchronously get the data from the PHP that produces XML. This XML is used to bind to a datasource for a Flex component (e.g. ComboBox). If you are using MXML tag
However, if you need to create the ComboBox dynamically using Action Script, when you try to bind the dataSource to the XML result from the HTTPService, you will get an error saying:
Cannot access a property or method of a null object reference
This is because the execution of binding the dataSource to the XML returned from HTTPService is faster than the HTTPService itself, for example:
You have HTTPService and ComboBox objects:
1 var httpTemp:HTTPService = new HTTPService();
2 httpTemp.url = http://www.tempuri.org/xml.php;
3 httpTemp.resultFormat = "e4x";
4 httpTemp.send();
5
6 var newComboBox:ComboBox = new ComboBox();
7 newComboBox.dataProvider = httpTemp.result;
Even though line 4 is executed first, however because it takes a while to return the XML data, thus when line 7 is executed, the httpTemp.result object does not exist yet and error occurs.
To solve this:
Create a bindable vars
[Bindable] public var xmlResult:XML;
[Bindable] public var newComboBox:ComboBox;
Create a result event handler for HTTPService:
private function httpTempResultHandler( e:ResultEvent ):void
{
xmlResult = e.result as XML;
newComboBox.dataProvider = xmlResult.Category;
}
Create the ComboBox object:
//create a new instance of ComboBox
newComboBox = new ComboBox();
var httpTemp:HTTPService = new HTTPService();
Create a dummy result:
var tempString:String = '
xmlResult = new XML(tempString);
Create a result event listener:
httpTemp.url = "http://www.tempuri.org/xml.php";
httpTemp.resultFormat = "e4x";
//add the result event listener
httpTemp.addEventListener(ResultEvent.RESULT, httpTempResultHandler, false, 0);
httpTemp.send();
Assign the XML to the dataProvider:
newComboBox.dataProvider = xmlResult.Category;
This assigns a dummy result to the dataProvider and when the HTTPService result event handler called, the bind-able xmlResult will be used with the result from the HTTPService.
Friday, October 19, 2007
MCTS: SQL Server 2005
After about 2 months studying the SQL Server 2005 books, today I took the 70-431 exam and pass with the score 940! I am now Microsoft Certified Technology Specialist (MCTS): SQL Server 2005
It was a great experience to know how great is SQL Server 2005. It has all the capabilities and capacity to host enterprise level data.
High availability is very important these days and SQL server 2005 has the technology to make sure the data is available 24/7/365 through either mirroring, replication, log shipping or snapshot.
The reason for me learning SQL Server 2005 is because the working environment that I am with is full of SQL Server 2005. I need to be able to support them and I need the necessary skills to do the job for mission critical database
Thursday, October 04, 2007
Virtualization Forum 2007
Today, I went to this VMware forum at Darling Harbour.
A lot of talk about Green technology and how hardware vendors with VMWare can reduce the CO2 emission by consolidating servers to Virtual infrastructure.
They were talking about VDI as well - Virtual Desktop Infrastructure - with thin clients, which is cool for large enterprise company with thousands of client PCs.
IBM was talking about their System X Servers which is pretty impressive!
some photos:
Thursday, September 06, 2007
BackupExec 11d - GRT Backup for Exchange 2003
BackupExec 11d has a new feature called GRT - Granular Restore Technology - which allows you to restore emails at the brick level with Information Store backup only!
This is very exciting for most of us who know how painful is doing brick level backup, especially the time it takes.
Now Veritas with its BackupExec product has a great solution for us. This blog will show you a very quick way to make this happen. Of course you can do more tweaking:
1st step - very obvious, install your BackupExec Server
2nd step - once you have finished installing the BackupExec server - install the remote agent to your exchange server
3rd step - Create a backup selection list and choose the Information Store you'd like to backup

4rd step - Create backup-to-disk folder, this to store the backup files

5th step - Create a backup job with the selection list created on the 3rd step, use the backup-to-disk folder as the device and make sure on the Microsoft Exchange settings, tick the checkbox 'Enable the restore of individual mail messages and folders from Information Store backups'


6th step - create an Active Directory account for doing the backup. Make sure this account is mailbox enabled (send a test email to this account to trigger the mailbox creation after the AD account has been created). Run the BackupExec services using this account and use this account for the logon account that runs the backup and restore. Finally, assign this account as a local administrator of the exchange server and delegate this account as an Exchange administrator
Good luck! and I'll be posting again with Exchange 2007 backup
This is very exciting for most of us who know how painful is doing brick level backup, especially the time it takes.
Now Veritas with its BackupExec product has a great solution for us. This blog will show you a very quick way to make this happen. Of course you can do more tweaking:
1st step - very obvious, install your BackupExec Server
2nd step - once you have finished installing the BackupExec server - install the remote agent to your exchange server
3rd step - Create a backup selection list and choose the Information Store you'd like to backup
4rd step - Create backup-to-disk folder, this to store the backup files
5th step - Create a backup job with the selection list created on the 3rd step, use the backup-to-disk folder as the device and make sure on the Microsoft Exchange settings, tick the checkbox 'Enable the restore of individual mail messages and folders from Information Store backups'
6th step - create an Active Directory account for doing the backup. Make sure this account is mailbox enabled (send a test email to this account to trigger the mailbox creation after the AD account has been created). Run the BackupExec services using this account and use this account for the logon account that runs the backup and restore. Finally, assign this account as a local administrator of the exchange server and delegate this account as an Exchange administrator
Good luck! and I'll be posting again with Exchange 2007 backup