How to kill RDP session remotely ?

0

Category:

Use the command line tools to identify the open sessions and kill one of them. There are two tools, qwinsta and rwinsta. If you run "qwinsta /?" from a command shell, you will get the following:

qwinsta /?

Display information about Terminal Sessions.
QUERY SESSION [sessionname | username | sessionid]

[/SERVER:servername] [/MODE] [/FLOW] [/CONNECT] [/COUNTER]
  sessionname         Identifies the session named sessionname.

username Identifies the session with user username.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server to be queried (default is current).
/MODE Display current line settings.
/FLOW Display current flow control settings.
/CONNECT Display current connect settings.
/COUNTER Display current Terminal Services counters information.



If you run "rwinsta /?", you get the following:


rwinsta /?

Reset the session subsytem hardware and software to known initial values.

RESET SESSION {sessionname | sessionid} [/SERVER:servername] [/V]

sessionname Identifies the session with name sessionname.
sessionid Identifies the session with ID sessionid.
/SERVER:servername The server containing the session (default is current).
/V Display additional information.



For the sample server abc, you would run "qwinsta /server:abc"

Output


 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE

console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
abcd 1 Disc rdpwd
rdp-tcp#93 gates 3 Active rdpwd


From that output, we can take one of the IDs that was returned for the remote sessions and use rwinsta to kill that session. You would use something like:


rwinsta 1 /SERVER:abc


And that will terminate that session, allowing you to open a new session. You will need admin rights to run that command, but if you are using the admin terminal service connections to the server, then you would already have the necessary access rights to the server.


There is a third option, you can connect to the console session. This is the bonus option that I had referred to earlier. This is the session that you would get if you were physically in front of the server and were logging in on the server's mouse and keyboard. You can specify the console session as a command line parameter to the remote desktop client, mstsc.exe. The following syntax can be used to connect to the console session of a server:


mstsc /console

That feature will work with Server 2003 and later. On some machines, qwinsta and rwinsta may have been renamed to query.exe and reset.exe, respectively.

How to create two session to two different CS docbases?

0

Category: ,


Include both the docbroker in the dfc.properties.


public static IDfSession connectToDocbase1(String docbaseName,
String username, String passwd, String domain,
String docBrokerHost, String docBrokerPort) throws DfException {
try {
IDfSession session = null;
IDfClientX clientX = new DfClientX();
IDfClient client = clientX.getLocalClient();
IDfLoginInfo loginInfo = new DfLoginInfo();
loginInfo.setUser(username);
loginInfo.setPassword(passwd);
loginInfo.setDomain(domain);
if (docBrokerHost != null && docBrokerHost.length() > 0) {
IDfTypedObject apiconfig = client.getClientConfig();
String primaryHost = apiconfig.getString("primary_host");
String primaryPort = apiconfig.getString("primary_port");
apiconfig.setString("primary_host", docBrokerHost);
apiconfig.setString("primary_port", docBrokerPort);
try {
IDfTypedObject serverMap = client.getServerMapEx(
docbaseName, null, docBrokerHost, docBrokerPort);

session = client.newSession(docbaseName + "@"
+ serverMap.getString("i_host_name"), loginInfo);
} catch (DfException e) {
if (primaryHost != null) {
apiconfig.setString("primary_host", primaryHost);
}
if (primaryPort != null) {
apiconfig.setString("primary_port", primaryPort);
}
throw e;
}
apiconfig.setString("primary_host", primaryHost);
apiconfig.setString("primary_port", primaryPort);
} else {
session = client.newSession(docbaseName, loginInfo);
}
return session;
} catch (DfException ex) {
System.out.println("failed to connect " + ex.getMessage());
throw ex;
}
}

Vast amount of sessions from CTS causing CS to run out of memory error?

0

Category: , , ,

Following up on the webex, please try the steps below to clean up your

1. Unconfigure the docbase using MTS configuration program.
2. Uninstall MTS
3. Remove the remaining Documentum products from Add/Remove Programs.
4. Delete the following folders and all contents:
C:\Documentum
C:\Program Files\Documentum
5. Delete the Documentum entries from registry.
6. Reboot the MTS machine to make sure everything is clean.
7. Back up your custom profiles
8. Log in to DA as an admin user.
9. Delete the Media Server folder, located in: \System (select all children and all versions when prompted during delete)
10. Navigate to \System\Applications
11. Delete the CTSTransformRequest, MediaProfile, and Transformation folders if present
(including all versions and sub folders).
12. Navigate to the System\Modules\TBO folder
13. Delete all of the following folders (if present):
• dm_cts_response
• dm_media_profile
• dm_transform_request
• dmc_cts_reporting_config
• dmc_cts_request_archiving
14. Navigate to the System\Modules\SBO folder and:
• Delete all of the folders that start with "com.documentum.services.cts...";
• Delete all of the folders that start with "com.documentum.services.dam...".
15. Run the following two DQL statements against the docbase, in this order:
DQL> delete cts_instance_info object
DQL> drop type cts_instance_info

Restart docbase. Install MTS 6.5 SP3, install 2 DAR files, and then configure MTS against this docbase again to see if it fix your issue.

CTS service stops after starting on 6.5 sp3 and 6.6

0

Category:

The solutions for this problem deals with MS Windows 2008 server .



1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DocumentumCTS\Parameters
AppParameters key

Make sure all the path to jre directory is complete and correct. If the path format is using complete path such as "C:\Program Files\Documentum\dctm.jar", try replacing it with short path like "C:\PROGRA~1\DOCUME~1\dctm.jar" in -Djava.class.path

Convert EXCEL,DOC,JPEG,PPT,BMP to PDF format using java code.

7

Category: , , , , ,

Perquisite to run this code,


1-Use Eclipse and java 1.5 or later
2-Download JODConvertor from the URL
3-http://code.google.com/p/jodconverter/downloads/list
4-Add all the jar file in lib directory of JODconvertor to your project.
5-Download Openoffice 3.0 from URL http://download.openoffice.org/other.html#tested-full
5-Install the Openoffice 3.0

Limitation
A:- It cannot be multi-threaded.
B:- It cannot convernt MULTI-TIFF images to PDF but it can convert single page TIFF to PDF.

import java.io.*;
import org.artofsolving.jodconverter.OfficeDocumentConverter;
import org.artofsolving.jodconverter.OfficeDocumentConverter.*;
import org.artofsolving.jodconverter.office.*;
import org.artofsolving.*;
import org.artofsolving.jodconverter.document.*;
import org.artofsolving.jodconverter.process.*;
import org.artofsolving.jodconverter.util.*;
public class Main {
public static void main(String[] args) throws Exception {
conversion();
}
public static void conversion(){
OfficeManager officeManager = new DefaultOfficeManagerConfiguration().buildOfficeManager();
officeManager.start();
OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
converter.convert(new File("C:/Temp/first.doc"), new File("C:/Temp/Doctest.pdf"));
officeManager.stop();
System.out.println("Hellow WOrld , its done");
}

Ask me if you are not able to run it.

Happy Conversion.

Manually uninstalling the Oracle from WinOS platform .

0

Category:

Manually uninstalling the Oracle from WinOS platform .

I had to do it for the Documentum installation and it sucks to do all these steps if you really mesh up the oracle installation. I did this to try some latest Documentum product testing and i noted down these steps if i need them in future or these can be of any help to anybody.No guarantee for any damage to system because these steps involve registry modifications and can really cause harm to your server if you try them on production environments(BE AWARE ). It was all hit and trial to re-install the oracle as oracle un-installer doesn't clean-up the system if you need to reinstall and it will be nightmare unless you really clean up the previous installations of oracle from the system.

A. Removing Components on Windows OS.
To remove all Oracle components from a computer on Windows OS:

1. Check privileges:
1.a. Ensure you are logged in as a user with Administrator privileges.

2. Stop all Oracle services (if any are running):
2.a. Right click My Computer > Manage > Services and Applications > Services

2.b. If any Oracle services (their names begin with Oracle) exist and have
the status Started, select the service and click Stop.

2.c. Click Close to exit the Services window.

2.d. Close the Control Panel/Computer Management window.

3. Remove the entries in the Windows registry:
3.a. Start the registry editor:
Choose Start > Run > regedt32

3.b. Go to HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
Note the value of the key INST_LOC, this is the location of the Oracle Universal
Installer. The default location is Installation Drive(C:or D:):\Program Files\Oracle\Inventory. If this value is different, make note of it, so we can delete these files later.
Delete this ORACLE key.

3.c. Go to HKEY_LOCAL_MACHINE\SOFTWARE\ODBC and expand all subkeys and
remove all keys under here which are related with the
"Oracle ODBC Driver"

3.d. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and remove
all keys under here that begin with ORACLE or ORAWEB.

3.e. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\...
\Application and remove all keys under here that begin with ORACLE.

3.f. Go to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
and remove any entries related to Oracle.

3.g. Go to HKEY_CLASSES_ROOT, remove all keys that begin with Oracle, OraPerf or
OraOLEDB

3.h. Close the registry.

4. Clean up the environment settings:
4.a. NT: Choose Start > Settings > Control Panel > System > Environment tab
2000: Choose Start > Settings > Control Panel > System > Advanced tab >
Environment variables.

4.b. At "System Variables" click on the variable PATH in order to modify
the value. For example, you may see a path similar to this one:
C:\ORACLE\ORA81\BIN;C:\PROGRAM FILES\ORACLE\JRE\1.1.7\BIN

4.c. If an %ORACLE_HOME% was installed, remove this %ORACLE_HOME%\BIN path.

4.d. If JRE was installed by Oracle, remove the JRE path.

4.e. If there is a CLASSPATH variable under "System Variables", first make note
of the path defined, then delete it. This variable can be added back at
a later date if needed.

4.f. Check if there are any other Oracle variables set in "System Variables",
ORACLE_HOME, ORACLE_SID or TNS_ADMIN. If these exist, delete them also.

4.g. Click on APPLY and OK.

4.h. Close the Control Panel window.

5. Delete the software and icons:
5.a.Choose Start > Programs > Accessories > Windows NT Explorer.

5.b. Go to SYSTEM_DRIVE:\WINNT\PROFILES\ALL USERS\START MENU\PROGRAMS
OR Go to SYSTEM_DRIVE:\DOCUMENTS AND SETTINGS\ALL USERS\START MENU\PROGRAMS


and delete the following icons:
- Oracle - HOME_NAME
where HOME_NAME is the previous Oracle home name.
- Oracle Installation Products

5.c. Go to SYSTEM_DRIVE:\Program Files\Oracle or the location of INST_LOC as
noted earlier in step 3.b and delete this directory.

5.d Go to SYSTEM_DRIVE:\Temp and delete all files and directories in here.

5.e. Go to the drive where the Oracle software is installed on your machine
and delete all ORACLE_BASE directories on your hard drive.

5.f. Close the Windows Explorer.

6. Finish the removal

7 Reboot your computer.