Sunday, April 25, 2010

Setting SQL Servers to be able to Communicate Each Other

Followings are the basic steps if you want to write any stored procedures or DML(Data Manipulation Language) in an SQL servers that accesses remote SQL servers:

1. Add Linked Servers
To make a server be able to communicate with other servers we need to add linked servers by calling sp_addlinkedserver.
The syntax is as follow:
EXEC sp_addlinkedserver , N'SQL Server'

2. Setting Distributed Transaction Coordinator
Verify the "Distributed Transaction Coordinator" Service is running on both servers:
1. Go to "Administrative Tools > Services
2. Turn on the "Distribute Transaction Coordinator" Service if it is not running

If it is running, in both servers:
1. Go to "Administrative Tools > Component Services"
2. On the left navigation tree, go to "Component Services > Computers > My Computer"
3. Right click on "My Computer", select "Properties"
4. Select "MSDTC" tab
5. Click "Security Configuration"
6. Make sure you check "Network DTC Access", "Allow Remote Client", "Allow Inbound/Outbound" with ‘No Authentication Required’, "Enable TIP" and ‘Enable XA Transactions’
7. The service will restart
8. It might be needed to reboot server if there is issue on executing the SP.

3. Adding Remote Instance Name to the Host
In Windows Explorer, go to ‘C:\Windows\system32\drivers\etc’, open ‘hosts’ file. In bottom part add IP and remote instance names by typing:
[Tabkey]

By doing all above steps, you will be able to execute SP like in below sample where a server in Head Office accesses server in remote sites and collect the data back to Head Office (at least in my network it works):

CREATE PROCEDURE [dbo].[HSAP_SP_UPL_Test]
AS
BEGIN

DECLARE @ServerIP AS varchar(100)
SET @ServerIP = '[192.168.5.1].[MataPao].[dbo].[HSAP_SP_RPT_ItemClassSummary]'

DECLARE @hsap_EstateClassSummary Table (
MatGroup nvarchar(5),
MatDesc nvarchar(50),
Value decimal (18,0)
)

INSERT @hsap_EstateClassSummary
EXEC @ServerIP
@FromDate = '2009-11-01',
@ToDate = '2009-11-30'

SELECT * FROM @hsap_EstateClassSummary
END

Friday, February 26, 2010

How to Limit Folder Size (Windows 2003 Server)

You have shared folders in a server that you don't want users to abuse the usage of them by storing huge files like mp3, jpeg, etc that will end up with a hang server because of low disk space. Don't worry, we can limit folder size in Windows 2003 Server R2 Standard and Enterprise.
We need a tool called FSRM (File Server Resource Manager). This Microsoft tool will allow you to set folder size quotas amongst other file server related controls, and has options for alerting and reporting too.

FSRM was introduced with Server 2003 SP2, but not installed by default. How to install:
1. Start>Control Panel>Add or Remove Program
2. Click Add/Remove Windows Program
3. Select Management and Monitoring Tools. Click Details.
4. Click File Server Management and File Server Resource Manager. On installing it we need to copy files from the original CD.

How to set the quota:
1. Start>Administrative Tools>File Server Resource Manager
2. Under Quota Management>Quota right click and select Create Quota.
3. Define the path that is going to be limited and define the quota size.

That's all folks!
Naughty users will get message that no more space if the files in corresponding folder has exceeded the quota.

Saturday, August 15, 2009

Unexpected Account Lock Out on Logging to Outlook

In last 4 - 5 months, my account in office domain was kept locked out periodically. I tried my best to investigate the root cause, so I was patience in asking our system admin to keep unlocking my account while I was investigating it.
There are many possible reasons for account lock out. The first thing, of course don't enter wrong passwords 3 times in a row (no. of times depends on your domain setting). Checked. Secondly, you have to make sure that you don't tick 'Save password' option in any areas. Checked.
Third, you have to make sure that you don't have mapped network drive. Checked.
So ... up to this stage I was confused ... what else could be wrong? After some times, I noticed that each time I logged into Outlook, my account was locked out. Well ... at least I've found the starting point to start the deeper investigation with. Browsing here and there, I found Knowledge Base about the possible reasons for that. In my case, the reason is because I have many accounts in different domains with same name. So what did I do? I removed the domain in my computer (by joining to Workgroup instead, in Control Panel>System>Computer Name), and then log in to local with different name.
Thank God ... so far it has never been locked out ... Otherwise, I might need to change my real name!

Wednesday, June 3, 2009

Award

Hmm ... got beautiful award from Donna. It's so nice ... thanks Donna. Actually this is a new blog so it makes me happy that she considered this blog for award. Keep blogging, Maya! :)
Here is the message of the award:
"To receive this award your blog must be exceptional in design and content; presenting us with new knowledge, a sense of style, or at times giving us a smile!
Each recipient of this award must acknowledge the person who honored them with the award and then go to http://www.overthetopaprons.blogspot.com to copy/paste the award: Your Blog is Over the Top".

Sunday, May 31, 2009

Comment Reply Via Email in WP

Another blending of blogging and email in WP (well … actually this came first before Post by Email feature). In WP, you can reply the comment straight from email instead of clicking back to your WP dashboard.
Go to Setting>Discussion, tick ‘Comment Reply Via Email’ check box. The prerequisite for it to work is your ‘Email me whenever anyone post a comment’ check box is also ticked.
Now, when you receive notification email that you receive a comment, simply click Reply from that email itself. When you click reply, a special WordPress e-mail address will appear in the Sender line, matching your reply to the proper comment thread. Send it off, and your reply is up on your blog in seconds.
Nice feature, huh?

Post to WP by Email

It seems that WP has improved their capability in posting to WP by sending email, just like Mail2Blogger concept. This is how to do it: Under Dashboard, click “My Blogs”. There is option “Post By Email”, click Generate. That’s it.
In below screen shot, the email name is censored.

Quoting John Godley from WP team:
“Maybe you’re on holiday and want to show your journey. Maybe you’ve captured something with your cell phone that you just have to share. Maybe you’re at work and should be doing something else. With Post by Email you can keep everyone up-to-date without even opening a browser.”
So, now you can post to blog by sending email to that secret email.
However, if we compare with Mail2Blogger in my previous post, the difference is in WP the email is automatically generated. We can’t give the email name with the name that we can remember. As a result, up to now I can’t remember my secret email! So, looks like that I have to note it somewhere.

Friday, May 1, 2009

Prerequisites for Stopping Asset Depreciation

With respective to my previous post, for displaying ‘Asset Shutdown’ check box in Asset Master, there is configuration need to be done:

Tcode: AFAMA.

Select Depreciation Key, in this sample it’s Z001. Double click Assignment of Calculation Methods.

Select “Yes” in Shutdown field. Click Save.

Tcode: SPRO

Path: Financial Accounting (New) > Asset Accounting > Master Data > Screen Layout > Define Screen Layout for Asset Master Data.

Double click “Define Screen Layout for Asset Master Data”.

Select corresponding Asset Class. Double click ‘Logical field groups’.

Select 3 – Time dependent data. Double click ‘Field group rules’.

Set ‘23 – Shutdown’ as Optional and tick MnNo.

Thursday, April 30, 2009

Web Site Address in Mobile Phone

If you access a site from your mobile where the browser is mini the page displayed might be jumbled if the address you type is the 'www', e.g. http://www.mysite.com. Normally a site has its own mobile address. But if you forget the mobile address try to replace 'www ' with 'm'.
For example, for the above web address try to type 'http://m.mysite.com' in your mobile.
Not all sites are like that but at least it's worth to try.

Tuesday, April 28, 2009

Mobile Phone for Blogging

In previous two posts I discussed about posting to your blog in blogger or WP from your mobile. Well … I’m not talking about Black Berry or iPhone 3G here. It’s way costly! Frankly speaking, I’ve been dreaming of those gadgets. But even though my husband has offered me to buy it I still feel that my current mobile phone is good enough for me to mobile blogging. It’s as of now. I might change my mind later. Who knows :)
I’ve been using Nokia 3600 slide since January 2009 because my previous mobile which was Motorola was broken somehow. The price here in Indonesia was around $236 at that time.

I didn’t even know that it can be used for Internet connection. The reason I bought it was solely because of its model. Nice, cute, slim (typical ladies!). On using it, I found that hey … I can connect to internet! No manual setting required. Simply plug in your sim card and you’re there. The beautiful thing is the built-in application installed namely Yahoo! Go where I can read and write my email in Yahoo. There is also mini Opera browser for me to ‘monitor’ (hmmm) my friends in Facebook or update my WP blog or browsing somewhere else.
So, why don’t you try it?