Create A Windows Service / Delete A Windows Service (sc create / sc delete)

Today, I came across a Windows Service on a server that I inherited. By the name of the service I could tell that it was built in-house and I even found enough information to determine who the developed it.  However, since it was not in the Add / Remove Programs list of the Control Panel, I wasn’t sure how to remove it.  So, I found the following on Geeks With Blogs – Shahed’s Blog:


Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).

However, I installed some beta products and a service created by one of the applications was not removed automatically. Its very easy to remove a service from registry if you know the right path. Here is how I did that:

1. Run Regedit or Regedt32

2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

alternatively, you can also use command prompt and delete a service using following command:

sc delete < SERVICE name>
or to create, simply type
sc create <SERVICE name>

Update:
If you have space in the file path you need to use quotation marks ("). For example: 
sc create "MySQL" binpath= "C:\Archivos de programa\MySQL\MySQL Server 5.1\bin\mysqld.exe"

I used the “sc delete” method to remove the service.

Thanks, Shahed!

Tags: , , , ,

Backup All SQL Server Databases

November 18, 2009 by Stewart Schatz · Leave a Comment
Filed under: Microsoft, sql, sql server 

I came across this script to backup all SQL Server databases:

Code Snippet
DECLARE @name VARCHAR(50) -- database name
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @fileName VARCHAR(256) -- filename for backup
DECLARE @fileDate VARCHAR(20) -- used for file name

SET @path = 'E:\Backups\Dynamics' 

SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112)

DECLARE db_cursor CURSOR FOR
SELECT name
FROM master.dbo.sysdatabases
WHERE name NOT IN ('master','model','msdb','tempdb') 

OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name  

WHILE @@FETCH_STATUS = 0
BEGIN
       SET @fileName = @path + @name + '_' + @fileDate + '.BAK'
       BACKUP DATABASE @name TO DISK = @fileName 

       FETCH NEXT FROM db_cursor INTO @name
END  

CLOSE db_cursor
DEALLOCATE db_cursor

 

Tags: , , ,

SMTP Test

November 13, 2009 by Stewart Schatz · Leave a Comment
Filed under: Microsoft, SMTP, Telnet 

I ran across this while working on a different project but thought that it might be handy.

SMTP relay behavior in Windows 2000, Windows XP, and Exchange Server

The basic test:

Start a command prompt.

  1. Type telnet ServerName 25, where ServerName is the server name or IP address and 25 is the port number, and then press ENTER.
  2. Type EHLO, and then press [ENTER].
  3. At the Telnet session prompt, type RSET. The telnet session responds with text that is similar to the following:
    250 2.0.0 Resetting
  4. Type MAIL FROM:UserName@DomainName.tld, where UserName is the name of the user, DomainName is the name of the domain, and tld is the top level domain such as .com or .net.
    The telnet session responds with text that is similar to the following:

    250 2.1.0 UserName@DomainName.tld….Sender OK

  5. Type RCPT TO:RecipientName@DomainName.tld, where RecipientName is the e-mail address of the recipient.
    The telnet session responds with text that is similar to the following:

    550 5.7.1 Unable to relay for RecipientName@ DomainName.tld

Tags: , , ,

Processing, Processing, Processing!

imageWe had a user submit an issue last week that was a little baffling.

User: “When I try to access an application in all I get is the processing image.”

Us: “Does the ‘processing’ ever go away?”

User: “No.  It just sits there.”

Us: “um, ok. Let us do some checking and we’ll get back to you.”

Our PC support staff was able to remote into the PC and found that there was an “element not found” Javascript error.

The error was fixed by modifying the following registry entry:

HKEY_CLASSES_ROOT\TypeLib\{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}\1.1\0\win32

Replace the current value on the default setting from:

"C:WINDOWS\system32\shdocvw.dll"

to

"C:WINDOWS\system32\ieframe.dll"

We didn’t have to reboot for this setting to take effect, but you may have to.

Tags: , , , , , , , , , ,

The EnterpriseOne Session Timeout Two-Step…Ok, Three Step

We have several work areas that require a longer inactive timeout setting than the default 20 minutes (Payroll Time-entry, Fixed Asset Accounting, etc.).

Unfortunately, s architecture does not make the process of configuring a session timeout very easy.  There are three separate separate settings that need to configured correctly.  Depending on your architecture that could mean three separate machines using three separate platforms.  Whatever your architecture looks like there are at least three.

  1. The Java Application Server (JAS).  No matter what flavor of JAS you are running (IBM Websphere, , BEA, etc.) you will need to configure the applications user session timeout setting.  The screenshots for IBM Websphere 6.0.2.13 are below:

    IBM Websphere 
    IBM Websphere

  2. The HTML Server.  This setting is in the JAS.INI under the [CACHE] stanza.  The setting is in milliseconds (3600000 = 1 hour).  If you are running the Oracle for , you can find it in the Cache Configuration section under the Web Runtime configuration.
    Oracle Server Manager
     
    Oracle Server Manager
  3. The HTTP server.  The instructions for both Microsoft IIS and IBM HTTP Server follows:
    • Microsoft IIS:
      • Display the properties of the website that is configured to host
      • On the Website tab, modify the Connection Timeout setting.  Please note that this value is in seconds, not milliseconds.
    • IBM HTTP Server:
      • Edit the Timeout setting in the HTTPD.CONF file.  Please note that this value is in seconds, not milliseconds.

NOTE:  To avoid record locking Oracle specifies to configure the system so that the JAS server will timeout the users session.  To do that both the HTML Server and the HTTP server need to be set to great times than the JAS server.  For example:

  • To configure a timeout value of 30 minutes:
    • JAS Server: 30
    • HTML Server: 3600000
    • HTTP Server: 3600
Tags: , , , , , , , , , , , , , , ,

EnterpriseOne 8.97 Install Host Table Hic-Up

While installing 8.97 on one of our instances, we ran across an issue that was pretty puzzling to both us and Oracle’s Global Support Services group.

We had successfully installed both the Console and the Enterprise Server (System i, iSeries, ) Management Agent.  When everything is working correctly, the Enterprise Server Management Agent is supposed to ping the Console and magically show up in the Console Dashboard.

Well, as you have probably guessed, our Enterprise Server Management Agent did not "magically" appear.  After sending Oracle several sets of logs and screen shots, I noticed something in the Console logs:

Oct 27, 2008 12:33:23 PM com.jdedwards.mgmt.agent.Server$ClientConnection
 register  FINER: Received heartbeat from the remote management agent on
DOMAIN.COM listening on port -1 of type 2 in managed home
 /JDEdwards/JDE_HOME

You’ll notice from the log excerpt above that the ping from the Enterprise Server Agent was successful, but the name of the device from which it is running is identified as "DOMAIN.COM".  Obviously, I changed the name to protect the guilty, but I thought it was really strange to not have a MachineName specified.

So, we inspected the host table of the Enterprise Server using CFGTCP and found that there really was an entry with just "DOMAIN.COM".  However, there were also 2 other entries for its IP address:

255.255.255.111     MACHINENAME
                    DOMAIN.COM
                    MACHINENAME.DOMAIN.COM

We weren’t really sure what we might screw-up if we removed the "DOMAIN.COM" entry so we just moved the "MACHINENAME.DOMAIN.COM" entry up in the list.

255.255.255.111     MACHINENAME
                    MACHINENAME.DOMAIN.COM
                    DOMAIN.COM

Before we even had a chance to logout of the Console, the Enterprise Server magically appeared on the dashboard.

What should you learn from this?  Clean up your host table!

Have you tried to install Oracle ?  If so, how did it go?  If not, what are you waiting for?

Tags: , , , , , , , , ,

Tricked-Out Services Console

September 15, 2008 by Stewart Schatz · Leave a Comment
Filed under: EnterpriseOne - General, Microsoft 

Jeff Stevenson has a great little tutorial on making the Services management console a lot more tolerable.

Quick breakdown:

  1. right-click C:\Windows\system32\services.msc
  2. select ‘Author’
  3. make changes as desired
  4. close

Thanks for the great tip Jeff!

By the way, since Jeff is a , I added a link to his site at the right.

Tags: , , ,

Easy Tools Release Version Switch

September 4, 2008 by Stewart Schatz · Leave a Comment
Filed under: EnterpriseOne - General, Microsoft 

While trying to do testing of the 8.97 , we end up with having both the 8.96 and the 8.97 on our Deployment Server.  This is required so that we can continue to support package builds of the 8.96 environments. 

When switching from one to the other, I usually just rename the 3 important directories (OneWorld Client Install, SYSTEM & SYSTEMCOMP) by appending the to the end (i.e. SYSTEM -> SYSTEM_897). This can get a little tedious. 

So, I through together a quick BAT file to take care of it for me.

@ECHO OFF
IF EXIST "E:\\E811\OneWorld Client Install_897\Install.inf"   GOTO :Activate897
IF NOT EXIST "E:\\E811\OneWorld Client Install_897\Install.inf"   GOTO :Activate896

:Activate896
ECHO Activating 896
PAUSE
MOVE "E:\\E811\OneWorld Client Install" "E:\\E811\OneWorld Client Install_897"
MOVE "E:\\E811\OneWorld Client Install_896" "E:\\E811\OneWorld Client Install"
MOVE "E:\\E811\SYSTEM" "E:\\E811\SYSTEM_897"
MOVE "E:\\E811\SYSTEM_896" "E:\\E811\SYSTEM"
MOVE "E:\\E811\SYSTEMCOMP" "E:\\E811\SYSTEMCOMP_897"
MOVE "E:\\E811\SYSTEMCOMP_896" "E:\\E811\SYSTEMCOMP"
SET WHATDONE=Activated 896
GOTO :END

:Activate897
ECHO Activating 897
PAUSE
MOVE "E:\\E811\OneWorld Client Install" "E:\\E811\OneWorld Client Install_896"
MOVE "E:\\E811\OneWorld Client Install_897" "E:\\E811\OneWorld Client Install"
MOVE "E:\\E811\SYSTEM" "E:\\E811\SYSTEM_896"
MOVE "E:\\E811\SYSTEM_897" "E:\\E811\SYSTEM"
MOVE "E:\\E811\SYSTEMCOMP" "E:\\E811\SYSTEMCOMP_896"
MOVE "E:\\E811\SYSTEMCOMP_897" "E:\\E811\SYSTEMCOMP"
SET WHATDONE=Activated 897
GOTO :END

:END
ECHO %WHATDONE%
pause

Yes, I realize that I will need to do some replacing for the next .

UPDATE: Don’t forget about changing the JDE.INI file to set the correct ports:

[JDENET]
serviceNameListen=
serviceNameConnect=

I added lines similar to the following:

REN "C:\Windows\JDE.INI" "C:\Windows\JDE_897.INI"
REN "C:\Windows\JDE_896.INI" "C:\Windows\JDE.INI"
Tags: , , , , , , ,

Microsoft Eases Virtual Licensing Woes

August 20, 2008 by Stewart Schatz · Leave a Comment
Filed under: Microsoft 

image via SearchWinIT.com

As of September 1, Microsoft will allow customers to move 41 server applications between servers and server farms without having to reassign licenses.

This move will make it much easier to get to the truely "dynamic data center"

Related Posts with Thumbnails Tags: ,