Tuesday, August 9, 2011

My experience with the Installation of SQL Server 2005 on Windows Server 2008

As part of the SQL upgrade process i had to create an alternate setup for SQL Server on Windows Server 2008 . I had two choices
option1: install SQL Server 2005 Enterprise on windows Server 2008 R2 Standard
option2: install SQL Server 2008 Enterprise R2 on Windows Server 2008 R2 Standard
i choose option1 as i wanted to test the upgrade process to SQL Server 2008 later
so i started the installation of SQL Server 2005, during system configuration check i got the warning
-----------
IIS Feature Requirement (Warning) :

Microsoft Internet Information Services (IIS) is either not installed or is disabled. IIS is required by some SQL Server features. Without IIS, some SQL Server features will not be available for installation. To install all SQL Server features, install IIS from Add or Remove Programs in Control Panel or enable the IIS service through the Control Panel if it is already installed, and then run SQL Server Setup again. For a list of features that depend on IIS, see Features Supported by Editions of SQL Server in Books Online.

For installation IIS on Windows 2008 follow the article
http://support.microsoft.com/kb/920201/en-us and http://learn.iis.net/page.aspx/29/installing-iis-7-on-windows-server-2008-or-windows-server-2008-r2/
another reference http://blogs.technet.com/b/seanearp/archive/2008/07/01/installing-sql-server-2005-on-windows-server-2008.aspx
--------------
you can ignore the warning as IIS is required only for reporting services.the reason is because Windows Server 2008 have just been released and the operating system information on the page is not fully up to date .

According to Microsoft, SQL Server 2005 requires Microsoft SQL Server 2005 Service Pack 2 (SP2) to run on Windows Server 2008 and Windows Vista SP1. And the full release version of SQL Server 2005 has to be first installed before the SP2 can be applied.

After the successfull installation of SQL Server 2005 , i was able to install SP1 got a warning for analysis services to install hotfix 2047. i didnot do that as i am on the way to install SP2, hoping it will remove the warning. as expected the installation was successfull without any warning. did the SQL provisioning and restarted the server.so far good. tried to open database with SQL Server management studio, there comes the error. No instance, No database is shown. checked with ODBC data source database and instance exist.

followed the article http://decoding.wordpress.com/2008/04/18/how-to-install-sql-server-2005-on-windows-server-2008/
downloaded the hotfix from http://support.microsoft.com/kb/950636
no luck.got the message the update is not applicable to your computer .
installed the backup feature still the same error.
now the next option for me is to do an upgrade to sql server 2008 r2. the upgrade advisor tells me no reporting services is installed. ofcourse its not. will do it later.now continuing with upgrade.upgrade was successfull. but the sql server management studio cannot find the instances.

Now i did not want to spent more time on this process . so removed all installation of SQL 2005 and SQl 2008 and went for the option2. to those who don't have option2 can check the below reference as well

List of known issues when you install SQL Server 2005 on Windows Server 2008 :
http://support.microsoft.com/kb/936302







Thursday, July 28, 2011

Open Task Manager on Remote Desktop

recently i was stuck with a problem on remote desktop that the programs are hanged and i cannot click on anything, task manager is not accessible to end the processes. now how to open task manager in a remote desktop. if you can't do it then you haveto login to the remote machine locally or restart the machine manually. this is not a good option

so here is a command to open the task manager on remote desktop

CTRL+SHIFT+ESC - work same as right click taskbar and open task manager
CTRL+ALT+END - work same as CTRL+ALT+DEL

guess this post was useful!!

Thursday, July 7, 2011

Login problem with MSDE

recently i came across a problem with MSDE (Microsft SQL Server Desktop engine) which gets installed mostly with third party software which do not require Standard SQL Server.

MSDE does not have its own user interface as it is primarily designed to run in the background.Users interact with MSDE through the program in which it is embedded. The only tool that is provided with MSDE is the osql utility. The executable file, osql.exe, for me is located in the C:\Program Files\Microsoft SQL Server\80\Tools\Binn\osql.exe

more information about osql.exe utility is available at
http://support.microsoft.com/kb/325003
http://support.microsoft.com/kb/325022
now the problem where i have to dig in is when my program which i downloaded was asking for a database username/password which i never entered during installation. i am able to see MSDE is started from the icon on the right hand side of the windows taskbar.but what is the username and password to connect to MSDE and how to connect to. once the program prompted for username as 'sa' .

to reset the password for user 'sa' since you have no idea about password, there is a way with osql utility.
go to start-run and type osql -U sa (here you are trying to connect to MSDE with username sa) and press enter. the command prompt for password .
do not type anything -----press enter (you came to know password is null for sa at this point)
to reset password type sp_password null 'yournewpassword','sa' ----press enter
type go -----press enter.you get a message Password chnaged
now you can use the sa/yournewpassword to connect from your application or from osql.exe

SQL Server Alias to connect to database

I have got a very good article which explains how to create SQL Server Alias to connect from client to server for named instance of SQL database

http://decipherinfosys.wordpress.com/2007/11/26/using-a-server-alias-to-connect-to-sql-server-instances/
-----------------------------------------------------------------------------
When connecting to SQL Server from your PC or from your application/web servers, you can choose to create aliases for connectivity. Before we start getting into the nitty-gritty details of aliases, let us see how you can set one up. You can use SQL Server Connection Manager in SQL Server 2005 to set it up and in case the tools are not installed, then you can also use cliconfg.exe (note – there is no i in confg) which is located under C:\Windows\System32 folder. If you use the connection manager, you will get a screen like this one:

You can then create a new alias as shown in the next image:

If you are using cliconfg.exe (the same is called in SQL Server 2000 when you use the SQL Server Client Network Utility), you will get a dialog box like the one shown below (showing the alias tab):

As you can see from above, the same alias that we had created using the SQL Server Connection Manager is automatically visible using the cliconfg.exe as well – that is because both of them read this entry from the registry. The place where these connection aliases can be found in the registry is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo

So, now that we have seen how to go about creating an alias and where it is stored, what exactly is the use of this feature? There are a couple of benefits of using aliases:

1) An alias can be used to define a user-defined name for connecting to a server -even if the IP address changes later on, there are no changes to the connection string – you just need to update the alias and the application will keep on working as before. You will not need to specify any instance name in the application connection string(s). And using an IP address directly in the alias definition can also save you some time in doing the DNS look-up.

2) You can make connection to SQL Server using different protocols: TCP/IP, Named Pipes etc. and specify specific parameters like the TCP port or the pipe name etc.

3) Aliases are also good for performance reasons. Since an alias has a pre-defined protocol, it can help you speed up the connection. Think about what happens when a connection is made to SQL Server from a client application. It has to try various protocols in the order that they are defined in your SQL Server Connection Manager (SQL 2005) or the SQL Server Client Network Utility (SQL 2000). If you already know which protocol and port your server is listening on, by configuring an alias you can by-pass the discovery phase that SQL Browser service goes through. In addition, if you know and have benchmarked your application using a specific protocol, you can standardize the alias technique across the board.

many thanks to decipherinfosys
---------------------------------------------------------------------------
After doing the above

From SQL Server Configuration Manager - SQL Native Client Configuration - Aliases , i can see my alias. when connecting using alias from SQL Server Management Studio didn't work . in my Configuration Manager there is another SQL Native Client Configuration (32bit). i had to create alias there in order for my client to connect.

Other references:-

http://blogs.msdn.com/b/sql_protocols/archive/2007/01/07/connection-alias.aspx
http://support.microsoft.com/kb/265808

Sunday, May 8, 2011

File Receive Location is disabled in BizTalk

File receive location is disabled in BizTalk 2009 even if you have configured file receive adapter and receive location in BizTalk Administration.

You receive a "The receive location '[drive:]\[path]\*.xml' is shutting down" error message

share the directory and use unc path for receive location \\servername\sharename

http://support.microsoft.com/kb/839453

give permission only to biztalk host instance users on the share

Access Denied-Deploy BizTalk project

You get access denied message when deploying BizTalk 2009 project from Visual Studio 2008 on MS Windows 2008 R2 OS.

run Visual Studio 2008 as Administrator when deploying

Oracle Database connection problem after configuring client

Connecting to the LOB system has failed.
Could not load file or assembly 'Oracle.DataAccess, Version=2.111.7.0, Culture=neutral,
PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file
specified..

i was getting this error when using Consume Adapter Service from Visual Studio 2008 to connect to oracle database using OracleDBBinding configuration.

i could not see Oracle.DataAccess in the c:\windows\assembly folder. i was using instantclient to connect to oracle server

downloaded Oracle 11g ODAC 11.1.0.7.20 with Oracle Developer Tools for Visual Studio OTN website

http://www.oracle.com/technetwork/developer-tools/visual-studio/downloads/index.html (ODAC 11.1.0.7.20 with Oracle Developer Tools for Visual Studio). install it clicking on setup.exe

now add generated items from visual studio project .select consumer adapter service.
click on Add . Select a binding --> OracleDBBinding
configure a URI --> oracledb://yourdbalias

click on configure in URI properties tab make sure data source name is correct.

in Binding properties tab changed EnableBizTalkCompatibilityMode --> true
and UseAmbientTransaction --> false

in security tab select Client Credential type to username. give the username and password
otherwise it gives username and password error.
click ok and connect you get error .

Connecting to the LOB system has failed.
ORA-1017: invalid username/password; logon denied.

enter username in CAPITAL letters.

it works

BizTalk 2009 Adpter Pack - No valid Apapters error

After creating a new BizTalk project . right click on the newly created project Add generated items.in generate schema files --> Consume Adpater Service . to connect to the oracle database and retrieve packages or tables whatever you want to use in biztalk for schema files.

it gives me error

"No valid adapters are installed on this machine"

but adapter pack 2.0 is installed and i rechecked ,repaired etc . no luck

solution:

install both 32 bit and 64 bit biztalk adapter pack on 64 bit servers . it will work as some of the 32bit dlls are required for Visual studio . my visual studio was 32 bit :)

Cannot Create BizTalk Project from VS 2008

After a new installation of BizTalk 2009 with all the prerequisites steps from microsoft i was not able to create a new biztalk project from Visual studio 2008.When you try to create a new Biztalk project using

File -> New Project -> Any BizTalk Project Type

You get the error message: Creating project ‘project name’… project creation failed.

most of the users tells me reinstallation of BizTalk that was not a good solution for me as i have been fixing many errors during the BizTalk installation and i don't want to go through the same process again and i need to finish with this implementation as it is dependent on few other projects. oh i am stuck again.

again the registry change . though it is not preferred always if you know what you are doing it then go for it. it could come handy.here is what i did. search for {FAE04EC0-301F-11d3-BF4B-00C04F79EFBC} under projects

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}]

the value for "PossibleProjectExtensions"="csproj" change it to "csproj;btproj" remove the "

for 64 bit versions of Visual Studio the path is

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Projects\{FAE04EC0-301F-11d3-BF4B-00C04F79EFBC}

now restart the Visual Studio it works. what i came to know is Biztalk installation modifies the reg value to register its project extension with the C# project factory.thanks to the blogger.

MSDTC logon changed

i have no idea why did i changed the MSDTC logon user . it is so stupid to change it . don't ever try that u will be lost.

its from my event viewer messages that i did that because it gave me error network service does not have permission to access. i don't remember exactly what was the problem. i was doing the configuration for BizTalk 2009 it don't connect to the SQL Server on remote location.

what i did was is from run command open Component Services using command "dcomcnfg". right click My Computer in component services and go to properties --> click on MSDTC tab --> then Security Configuration--> changed the username from network service to my domain user for BizTalk and restarted the server as i thought it will solve the problem. but it did not. not only that i couldn't revert it back. the MSDTC tab is completely gone from properties of My Computer.

now the next option is change in registry for this server. i need to it as my server is in production cluster and a reinstallation of MSDTC is not an option for me as it could affect other production servers on cluster.

from registry --> HKLM --> System --> Current Control Set --> Services --> MSDTC --> Object Name changed to NT Authority\Network Service.

restarted the server. i got the MSDTC tab back but security configuration is disabled. click on Stop --> click on take ownership --> now click on Start . there you get it. change it from here. if you haven't changed it before from registry u should try this step first . few times it gave me message cannot start msdtc service but it is started from some reason.

Thursday, May 5, 2011

BizTalk Server 2009 Group Configuration Error

During the group configuration i got the message

AdminLib GetBTSMessage: hrErr=c0c024bf; Msg=The server has not been configured.

Solution: set up DTC on both biztalk and sql servers .

Goto Component Services / My Computer / Properties / MSDTC Tab / Security
Configuration and Enable Network DTC Access

  • Enable Network DTC Access
  • Allow Remote Clients

  • Allow Inbound

  • Allow Outbound

  • No Authentication Required

  • Enable Transaction Internet Protocol (TIP) Transactions
Restart the servers . Enterprise Single Sign on was not started after restart so started that as well .




Wednesday, May 4, 2011

The SSO service failed to start

During BizTalk 2009 configuration SSO service failed to start.

following is done after a google search

  1. Open a command window
  2. Go to C:\Windows\Microsoft.NET\Framework64\v2.0.50727
  3. regasm "C:\Program Files\Common Files\Enterprise Single Sign-On\win32\ssosql.dll"
  4. regasm "C:\Program Files\Common Files\Enterprise Single Sign-On\ssosql.dll"
Note: On a 64-bit server, regasm will need to be run for both the 32-bit and 64-bit versions of ssosql.dll.

problem solved

Failed to connect to the SQL database SSODB

BizTalk 2009 configuration step of SSODB cannot connect to the SSODB database on SQL Server in cluster . it is supposed to create a new database SSODB instead of connecting to it. anyway the error gives failed to connect.

solution:

the sso user (not the group, the group is already there automatically), that is created in active directory before biztalk installation was given permission on the database

with dbcreator -- as SSODB needs to be created
and securityadmin server roles

now try to configure BizTalk SSODB again

Sunday, April 24, 2011

WMI Class for Windows Operating Systems

in a command window (cmd) type wmic OS get OperatingSystemSKU --- to check operating system version

Note: Windows Server 2003 and lesser version - this property is not available.

The number that is returned corresponds with Microsoft's list of SKU numbers for Windows Server:
  • 0- Undefined
  • 1- Ultimate Edition
  • 2 -Home Basic Edition
  • 3- Home Premium Edition
  • 4- Enterprise Edition
  • 5 -Home Basic N Edition
  • 6- Business Edition
  • 7 -Standard Server Edition
  • 8- Datacenter Server Edition
  • 9- Small Business Server Edition
  • 10 -Enterprise Server Edition
  • 11- Starter Edition
  • 12- Datacenter Server Core Edition
  • 13- Standard Server Core Edition
  • 14 -Enterprise Server Core Edition
  • 15- Enterprise Server Edition for Itanium-Based Systems
  • 16- Business N Edition
  • 17- Web Server Edition
  • 18 -Cluster Server Edition
  • 19- Home Server Edition
  • 20- Storage Express Server Edition
  • 21- Storage Standard Server Edition
  • 22 -Storage Workgroup Server Edition
  • 23- Storage Enterprise Server Edition
  • 24- Server For Small Business Edition
  • 25- Small Business Server Premium Edition
wmic OS get OSArchitecture ---- to check operating system architecture
wmic os get Name ---Operating System Name
wmic os get BootDevice, BuildNumber, BuildType, Version
wmic os get ServicePackMajorVersion, ServicePackMinorVersion

Other useful properties are below which you can use with wmic OS get property-name
  1. CurrentTimeZone
  2. FreePhysicalMemory
  3. FreeSpaceInPagingFiles
  4. FreeVirtualMemory
  5. InstallDate
  6. LastBootUpTime
  7. LocalDateTime
  8. Locale
  9. Manufacturer
  10. MaxNumberOfProcesses
  11. MaxProcessMemorySize
  12. NumberOfLicensedUsers
  13. NumberOfProcesses
  14. NumberOfUsers
  15. OSLanguage
  16. OSProductSuite
  17. OSType
  18. OtherTypeDescription
  19. ProductType
  20. RegisteredUser
  21. SerialNumber
  22. ServicePackMajorVersion
  23. ServicePackMinorVersion
  24. SizeStoredInPagingFiles
  25. Status
  26. SystemDevice
  27. SystemDirectory
  28. SystemDrive
  29. TotalSwapSpaceSize
  30. TotalVirtualMemorySize
  31. TotalVisibleMemorySize
  32. WindowsDirectory

FRM-40735:ON-ERROR trigger raised unhandled exception ORA-06508

after converting older version of Oracle forms to forms 10g using Forms Migration Assistant, you are not able to open the application or login to the application via web. when accessed from developer suite 10g it will run without any problems. one of the problem could be the path of the PL/SQL library attached to it.

in older version of forms the library path is mapped to the client pc and the forms application refer to the mapped drive letter for eg: z:\plls

in web there is no absolute path. it is relative that means there is no need to specify the path. it will automatically refer the path.

now for your converted/migrated forms to work, open the form in forms developer 10g, you might get a message that cannot attach PL/SQL library and when the form is open you lose the library attachment.sometimes you won't get the message but still you won't be able to access the application/module from web.

remember the library name that is attached with form module.now click on Attached Libraries and in the plus sign, locate the pll and add if prompted to remove the path, click on yes. now if you got the property pallette of attached library you can see that path is removed. save the form, compile and access from web . there you are !

you need to repeat this for each form.

Load balance web application without an hardware load balancer

Here is a vb script to access web application load balancing the user requests . you don't need a hardware load balancer but the users will be accessing different servers depending on the number of processes for the application on each server.

On Error Resume Next
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
strComputer1 = "x.x.x.x"
strComputer2 = "y.y.y.y"
strx = "domain-user"
stry = "password"
strDomain = "domain-name"
dim objShell
set objShell = CreateObject("Shell.Application")
str1 = "applicationlink1"
str2 = "applicationlink2"
str3 = "http://www.google.com"
str4 = "applicationlink3"

//Locate the computers

Set objWMIService1 = objLocator.ConnectServer(strComputer1, "root\cimv2",strx,stry,"MS_409","ntlmdomain:" + strDomain)
Set objWMIService2 = objLocator.ConnectServer(strComputer2, "root\cimv2",strx,stry,"MS_409","ntlmdomain:" + strDomain)

//Ping the computers

Set colPingedComputers1 = objWMIService1.ExecQuery ("Select * from Win32_PingStatus Where Address = 'x.x.x.x'")
Set colPingedComputers2 = objWMIService2.ExecQuery ("Select * from Win32_PingStatus Where Address = 'y.y.y.y'")

//check if both servers are offline open http://www.google.com

For each objComputer1 in colPingedComputers1
If objComputer1.StatusCode <> 0 Then
For each objComputer2 in colPingedComputers2
If objComputer2.StatusCode <> 0 Then
strMessage = "No Servers are Online"
MsgBox strMessage
objShell.ShellExecute str3, "", "", "open", 3
set objShell = nothing
set objComputer2 = nothing
End If
Next
set objComputer1 = nothing
End If
Next

//if server2 is online and server1 is offline execute application link2

For each objComputer1 in colPingedComputers1
If objComputer1.StatusCode <> 0 Then
For each objComputer2 in colPingedComputers2
If objComputer2.StatusCode = 0 Then
objShell.ShellExecute str2, "", "", "open", 3
set objShell = nothing
set objComputer2 = nothing
End If
Next
set objComputer1 = nothing
End If
Next

//if server1 is online and server2 is offline execute application link1

For each objComputer2 in colPingedComputers2
If objComputer2.StatusCode <> 0 Then
For each objComputer1 in colPingedComputers1
If objComputer1.StatusCode = 0 Then
objShell.ShellExecute str1, "", "", "open", 3
set objShell = nothing
set objComputer1 = nothing
End If
Next
set objComputer2 = nothing
End If
Next

//if server1 and server2 are online execute link checking for the number of processes on each computer and also specify a maximum limit.

For each objComputer1 in colPingedComputers1
If objComputer1.StatusCode = 0 Then
Set colProcessList1 = objWMIService1.ExecQuery ("Select * from Win32_Process Where Name = 'application-name.exe'")
For each objComputer2 in colPingedComputers2
If objComputer2.StatusCode = 0 Then
Set colProcessList2 = objWMIService2.ExecQuery ("Select * from Win32_Process Where Name = 'application-name.exe'")
End If
set objComputer2 = nothing
Next
If colProcessList1.Count > 100 And colProcessList2.Count > 100 Then
objShell.ShellExecute str4, "", "", "open", 3
set objShell = nothing
Else If colProcessList1.Count < colProcessList2.Count Then
objShell.ShellExecute str1, "", "", "open", 3
set objShell = nothing
Else if colProcessList2.Count < colProcessList1.Count Then
objShell.ShellExecute str2, "", "", "open", 3
set objShell = nothing
Else
objShell.ShellExecute str1, "", "", "open", 3
set objShell = nothing
End If
End If
End If
set objComputer1 = nothing
End If
Next

BizTalk Server 2009 pre-requisites

Preparing your computer for installation

1. Install any critical updates for Windows®

2. Enable Internet Information Services (IIS) 6.0 or 7.0

3. Install Microsoft Office Excel® 2007

4. Install Visual Studio® 2008 with Service Pack 1 (SP1)

5. Install SQL Server® 2008 or SQL Server 2005 with Service Pack 2 (SP2 )

6. Install SQL Notification Services (required only for BAM Alerts)

7. Install Microsoft Management Console 3.0 (required only for Windows Server 2003 and Windows XP)

8. Install prerequisites for MQSeries Agent

9. Configure ASP.NET 2.0 for 64-bit Mode*

10. Install Windows SharePoint Services 3.0 with Service Pack 1 (SP1)*

11. Configure ASP.NET 2.0 for 32-bit mode*

12. Configure Default Web Site for ASP.NET 2.0*

13. Configure Windows SharePoint® Services*

14. Extend the Default Web Site as a Virtual server*

15. Disable shared Memory Protocol

16. Join the local Administrators group

17. Configure the Application Event Log

18. Enable TCP/IP and named pipes in the SQL Server Configuration Manager

19. Enable Microsoft Distributed Transaction Coordinator (MS DTC) on the Local Host Server (LHS)

20. Before installing and configuring BizTalk Server 2009 in a multicomputer environment, you must enable network DTC access and network COM+ access on all computers running Windows Server 2003 SP1 or later where you will install BizTalk Server.

21. SQL Server Client Tools must be installed on the local computer when SQL Server is remote. The version of the SQL Server Client tools on the local computer must be the same version that is installed on SQL Server.

22. SQL Server OLAP client must be installed on the local computer if you plan to use Analysis Services remotely.

23. The remote SQL Server must be running during BizTalk Server configuration

24. The TCP and UDP ports you specified during the SQL Server setup process must be open during BizTalk Server configuration.

25. Named instances of SQL Server 2005 Analysis Services are not supported.

*Only necessary if you are using the Windows SharePoint Services Adapter Web Service.

Logon Types in MS Windows

It is time to understand all the logon type so here I am adding them for my future reference.

the logon/logoff category of the Windows security log gives you the ability to monitor all attempts to access the local computer. Logon Types are logged in the Logon Type field of logon events (event IDs 528 and 540 for successful logons, and 529-537 and 539 for failed logons).

Type

Logon

Description

0

System Only

-

1

Unknown

-

2

Interactive

this is logged when you attempt to log on at a Windows computer’s local keyboard and screen

3

Network

This logon occurs when you access remote file shares or printers. Also, most logons to Internet Information Services (IIS) are classified as network logons, other than IIS logons that use the basic authentication protocol (those are logged as logon type 8).

4

Batch

This is used for scheduled tasks. When the Windows Scheduler service starts a scheduled task, it first creates a new logon session for the task, so that it can run in the security context of the account that was specified when the task was created.

5

Service

This is used for services and service accounts that log on to start a service. When a service starts, Windows first creates a logon session for the user account that is specified in the service configuration.

6

Proxy

-

7

Unlock Workstation

This is used whenever you unlock your Windows machine.

8

Network Clear Text

This is used when you log on over a network and the password is sent in clear text. This happens, for example, when you use basic authentication to authenticate to an IIS server.

9

New Credentials

This is used when you run an application using the RunAs command and specify the /netonly switch. When you start a program with RunAs using /netonly, the program starts in a new logon session that has the same local identity (this is the identity of the user you are currently logged on with), but uses different credentials (the ones specified in the runas command) for other network connections. Without /netonly, Windows runs the program on the local computer and on the network as the user specified in the runas command, and logs the logon event with type 2.

10

Remote Interactive

This is used for RDP-based applications like Terminal Services, Remote Desktop or Remote Assistance.

11

Cached Interactive

This is logged when users log on using cached credentials, which basically means that in the absence of a domain controller, you can still log on to your local machine using your domain credentials. Windows supports logon using cached credentials to ease the life of mobile users and users who are often disconnected.

Event ID 528 - Logon Process Advapi & Type 4

my event viewer shows a suspicious logon process Advapi with logon type 4 and event id 528 . searching in the computer I couldnot find advapi.exe file which is supposed to be a security risk virus. well I am little bit relaxed now, there is no virus in the system. later I found out there is advapi32.dll ,a google search told me that advapi32.dll is a part of an advanced API services library supporting numerous APIs including many security and registry calls.It is a non essential process however it should not be removed if not causing any problems. It is just a runtime library, The service logon calls are in Advapi.

now my turn is to check the logon type 4 which in turn is a batch process that doesn’t sound good .another search in the www gave me scheduled tasks uses this type. Here I got my answer I have a scheduled task running everyday at 6:00 AM. When checked for the event-id it is logged at the same time !.

Wednesday, April 20, 2011

Synchronisation problem with SharePoint Databases

the event id 5553 and 7888 were shown in the event log.

to solve the synchronisation problem with old databases in Sharepoint run

stsadm -o sync -listolddatabases 0

Now run a Select Query on the Config Databases “dbo.Objects” table and look for
the GUID that matches the listed GUID.

Database:
Sharepoint_Config
Table: dbo.Objects

SELECT Id, ClassId, ParentId, Name, Status, Version, Properties
FROM Objects
WHERE (Id = '5bafe2af-43o7-4043-a36d-2856xvr788e2') -change the id to yours

if there is no data for any id there is problem with sync so delete the sync
information by running the below command


stsadm -o sync -deleteolddatabases 0



FRMWEB trying to connect through AD LDAP

I found a weird problem this week that frmweb.exe is connecting to Microsoft Active Directory Port 389 ie., LDAP which i haven't configured to do so. and our application do not use AD LDAP to authenticate users.

problem: open the oracle forms application. it takes long time to get the main login screen. tnsping take long time to connect and connection time is 0ms !!

reason: the netstat monitor shows the server first connects to AD LDAP. it spends more than a minute sometimes then connect to the real oracle application database.

the tnsping.exe also gave the same result. so the thing got to check is sqlnet.ora file in the network\admin folder of oracle home.

solution: hashed the NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME) entry in sqlnet.ora file

# NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, EZCONNECT, ONAMES, HOSTNAME).

voila! there it goes

but it was working fine for years untill the problem last week. what could have caused it? still annoying me :(

Tuesday, April 19, 2011

NETSTAT Commands in Windows

Though there are many tools to monitor the network connectivity .This command is often used by me in first place to check functioning of network. It helps to see what connections are present.

netstat [-a][-b][-e][-f][-n][-o][-p proto][-r][-s][-t][interval]


Table I. Switches for Netstat command

Switch

Description

-a

Displays all connections and listening ports

-b

Displays the executable involved in creating each connection or listening port. (Added in XP SP2.)

-e

Displays Ethernet statistics

-f

Displays Fully Qualified Domain Names for foreign addresses. (In Windows Vista/7 only)

-n

Displays addresses and port numbers in numerical form

-o

Displays the owning process ID associated with each connection

-p proto

Shows connections for the protocol specified by proto; proto may be any of: TCP, UDP, TCPv6, or UDPv6.

-r

Displays the routing table

-s

Displays per-protocol statistics

-t

Displays the current connection offload state, (Windows Vista/7)

-v

When used in conjunction with -b, will display sequence of components involved in creating the connection or listening port for all executables. (Windows XP SP2, SP3)

[interval]

An integer used to display results multiple times with specified number of seconds between displays. Continues until stopped by command ctrl+c. Default setting is to display once,

Checking TCP/IP connections:

TCP and UDP connections and their IP and port addresses can be seen by entering a command combining two switches: netstat –an

Table II. Description of various connection states

State

Description

CLOSED

Indicates that the server has received an ACK signal from the client and the connection is closed

CLOSE_WAIT

Indicates that the server has received the first FIN signal from the client and the connection is in the process of being closed

ESTABLISHED

Indicates that the server received the SYN signal from the client and the session is established

FIN_WAIT_1

Indicates that the connection is still active but not currently being used

FIN_WAIT_2

Indicates that the client just received acknowledgment of the first FIN signal from the server

LAST_ACK

Indicates that the server is in the process of sending its own FIN signal

LISTENING

Indicates that the server is ready to accept a connection

SYN_RECEIVED

Indicates that the server just received a SYN signal from the client

SYN_SEND

Indicates that this particular connection is open and active

TIME_WAIT

Indicates that the client recognizes the connection as still active but not currently being used

Checking for malware by looking at which programs initiate connections

To find out which programs are making connections with the outside world, we can use the command netstat -b

Actually, it is better to check over a period of time and we can add a number that sets the command to run at fixed intervals. Also, it is best to create a written record of the connections that are made over some period of time. The command can then be written

netstat -b 5 >> C:\connections.txt

netstat 5 is used for a period with 5 seconds interval. Use ctrl C to stop execution

find the PID in task manager and related program to add PID colum in task manager go to view and all column. You can end a pid program related from task manager.

we can use combination of switches for eg: netstat -ano or netstat -nb 20