How to read the RD Connect Broker DataBase!!!!
The msdn say there is a RD Connect Broker Data Base , it store the session information,but i dont know where is it and how to read it !
Thank you !!!!
Hi,
You can use the vbs script below to dump the contents of the RD Connection Broker database.
With credits to the authors of the Windows Server 2008 R2 RDS Resource Kit for putting it in there!
' Copyright (c) 2004-2005 Microsoft Corporation
' WMI Script - SDDatabaseDump.vbs
' Author - GopiV
' This script dumps the contents (clusters and associated sessions)
' of the Session Directory database
' USAGE: Cscript.exe SDDatabaseDump.vbs <SBservername> <Administrator> <Password>
const TAB = " "
const LINESEPARATOR = "------------------------------------------------"
ON ERROR RESUME NEXT
'* Function blnConnect()
'* Purpose: Connects to machine strServer.
'* Input: strServer a machine name
'* strNameSpace a namespace
'* strUserName name of the current user
'* strPassword password of the current user
'* Output: objService is returned as a service object.
Function blnConnect(objService, strServer, strNameSpace, strUserName, strPassword)
ON ERROR RESUME NEXT
Dim objLocator
blnConnect = True 'There is no error.
' Create Locator object to connect to remote CIM object manager
Set objLocator = CreateObject("WbemScripting.SWbemLocator")
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred in creating a locator object."
if Err.Description <> "" then
Wscript.Echo "Error description: " & Err.Description & "."
end if
Err.Clear
blnConnect = False 'An error occurred
Exit Function
end if
' Connect to the namespace which is either local or remote
Set objService = objLocator.ConnectServer (strServer, strNameSpace, strUserName, strPassword)
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred in connecting to server " _
& strServer & "."
if Err.Description <> "" then
Wscript.Echo "Error description: " & Err.Description & "."
end if
Err.Clear
blnConnect = False 'An error occurred
end if
objService.Security_.impersonationlevel = 3
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred in setting impersonation level " _
& strServer & "."
if Err.Description <> "" then
Wscript.Echo "Error description: " & Err.Description & "."
end if
Err.Clear
blnConnect = False 'An error occurred
end if
end Function
' Start of script
if Wscript.arguments.count<3 then
Wscript.echo "Script can't run without 3 arguments: ServerName Domain\UserName Password "
Wscript.quit
end if
Dim strServer, strUserName, strPassword
Dim objService, blnResult
' Extract the command line arguments
strServer=Wscript.arguments.Item(0)
strUserName=Wscript.arguments.Item(1)
strPassword=Wscript.arguments.Item(2)
' Connect to the WMI service on the SD Server machine
blnResult = blnConnect( objService, strServer, "root/cimv2", strUserName, strPassword )
if not blnResult then
Wscript.echo "Can not connect to the server " & strServer & " with the given credentials."
WScript.Quit
end if
Set clusterEnumerator = objService.InstancesOf ("Win32_SessionDirectoryCluster")
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred"
end if
if clusterEnumerator.Count = 0 then
Wscript.Echo "No clusters found in Session Directory database on " & strServer & "."
Wscript.Echo
Wscript.Quit
end if
for each clusterObj in clusterEnumerator
WScript.Echo LINESEPARATOR
WScript.Echo "ClusterName = " & clusterObj.ClusterName
WScript.Echo "NumberOfServers = " & clusterObj.NumberOfServers
WScript.Echo "SingleSessionMode = " & clusterObj.SingleSessionMode
Wscript.Echo
set serverEnumerator = objService.ExecQuery("Select * from Win32_SessionDirectoryServer where ClusterName = '" & clusterObj.ClusterName & "'")
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred"
end if
if serverEnumerator.Count = 0 then
Wscript.Echo "Error : No servers in cluster " & clusterObj.ClusterName
Wscript.Echo
else
' Enumerate the servers in this cluster
for each serverObj in serverEnumerator
WScript.Echo TAB & "SERVER :"
WScript.Echo TAB & "ServerName = " & serverObj.ServerName & " ServerSingleSessionMode = " & serverObj.SingleSessionMode & " LoadIndicator = " & serverObj.LoadIndicator
' WScript.Echo TAB & "ServerIP = " & serverObj.ServerIPAddress
' WScript.Echo TAB & "ServerWeight = " & serverObj.ServerWeight
set sessionEnumerator = objService.ExecQuery("Select * from Win32_SessionDirectorySession where ServerName = '" & serverObj.ServerName & "'")
if Err.Number then
Wscript.Echo "Error 0x" & CStr(Hex(Err.Number)) & " occurred"
end if
if sessionEnumerator.Count = 0 then
WScript.Echo
WScript.Echo TAB & "No sessions on server " & serverObj.ServerName
WScript.Echo
else
WScript.Echo TAB & "NumberOfSessions = " & sessionEnumerator.Count
Wscript.Echo
' Enumerate the sessions on this server
for each sessionObj in sessionEnumerator
WScript.Echo TAB & TAB & "SESSION :"
WScript.Echo TAB & TAB & "UserName= " & sessionObj.DomainName & "\" & sessionObj.UserName & TAB & "ApplicationType= " & sessionObj.ApplicationType
& TAB & "SessionState= " & sessionObj.SessionState
WScript.Echo TAB & TAB & "CreateTime= " & sessionObj.CreateTime & TAB & "DisconnectTime= " & sessionObj.DisconnectTime
' WScript.Echo TAB & TAB & "ServerName= " & sessionObj.ServerName
' WScript.Echo TAB & TAB & "SessionID= " & sessionObj.SessionID
' WScript.Echo TAB & TAB & "ServerIP= " & sessionObj.ServerIPAddress
' WScript.Echo TAB & TAB & "TSProtocol= " & sessionObj.TSProtocol
' WScript.Echo TAB & TAB & "ResolutionWidth= " & sessionObj.ResolutionWidth
' WScript.Echo TAB & TAB & "ResolutionHeight= " & sessionObj.ResolutionHeight
' WScript.Echo TAB & TAB & "ColorDepth= " & sessionObj.ColorDepth
' WScript.Echo
WScript.Echo
next
end if ' End of sessions on this server
next
end if ' End of servers on this cluster
next
Wscript.Echo
Wscript.Echo
Wscript.Echo "Dump of SD database on " & strServer & " complete."
Kind regards,
Freek Berson
http://www.microsoftplatform.blogspot.com
Wortell company website
Similar Messages
-
How to read the CSV Files into Database Table
Hi
Friends i have a Table called tblstudent this has the following fields Student ID, StudentName ,Class,Father_Name, Mother_Name.
Now i have a CSV File with 1500 records with all These Fields. Now in my Program there is a need for me to read all these Records into this Table tblstudent.
Note: I have got already 2000 records in the Table tblstudent now i would like to read all these CSV File records into the Table tblstudent.
Please give me some examples to do this
Thank your for your service
Cheers
Jofin1) Read the CSV file line by line using BufferedReader.
2) Convert each line (record) to a List and add it to a parent List. If you know the columns before, you might use a List of DTO's.
3) Finally save the two-dimensional List or the List of DTO's into the datatable using plain JDBC or any kind of ORM (Hibernate and so on).
This article contains some useful code snippets to parse a CSV: http://balusc.xs4all.nl/srv/dev-jep-csv.html -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
Chat App: how to store the user IP in database when they login.
hello,
i am working on chat application. first i made a login GUI form. after login when we run the Chat program, it ask the ip address of the server to whom it want to connect. and if u enter the ip address, it will connect to the server and chat will begin, thats working perfect.
but i want to show the list of users who r logged on and when i simply click on the user name, chat should begin.
i have the logic that when any user log in, then its IP address will be stored in the database. this ip address will shown to the online users.
but i dont know how to store the user information in database when they log in. can any body suggest me wht lines of code i should use.
thanks.palakk wrote:
i have the logic that when any user log in, then its IP address will be stored in the database. Bad approach. That will only work if this chat is only intended for use on a LAN. If it's used on the internet, then your users' IP addresses will almost always be either a) those of their routers, or b) private IP addresses, and in both cases, multiple users can have the same IP address.
this ip address will shown to the online users. Why would you want to do that? I want to chat with "Bill", not with "1.2.3.4".
but i dont know how to store the user information in database when they log in.Do the same thing that you're currently doing to store the IP address, but with the other information you want to store.
can any body suggest me wht lines of code i should use. This is not a code writing service. -
How to read the contents of attached files
Hi,
I am designing a Form using LiveCycle Designer 8.0
Scenario:
User can attach the file through "Attachments" facility provided on Adobe Reader.
The requirement is to attach 3 documents and post it to SAP system using Web services.
I am using the following code(which i got from this forum only) to find the number of files user has attached.
d = event.target.dataObjects;
n = d.length;
xfa.host.messageBox("Number of Attachments: "+n);
//Displaying the names of the Attached files
for( i = 0; i < n; i++ )
xfa.host.messageBox("Name of the file: "+d[i].name);
My problem: is how to read the contents of the attached files so that I post it to SAP using Web services
Thanks in advance!!
Taha AhmedIn order to read the content of the Redo Log files, you should use Logminer Utility
Please refer to the documentation for more information:
[Using LogMiner to Analyze Redo Log Files|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#SUTIL019]
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
I am doing a project for internet control using Java,PHP and MySql.All sites should go through the proxy server only.If the HTTP header contains Content-Length,am getting the content length as below:
public class HTTPResponseReader extends HTTPMessageReader
String statusCode;
public HTTPResponseReader(InputStream istream) throws IOException, NoSuchElementException
BufferedInputStream distream = new BufferedInputStream(istream);
retrieveHeader(distream);
StringTokenizer st = new StringTokenizer(new String(HTTPMessageReader.toArray(header)));
versionProtocol = st.nextToken();
statusCode = st.nextToken();
String s;
while (st.hasMoreTokens())
s = st.nextToken();
if (s.equals("Transfer-Encoding:"))
transferEncoding = new String(st.nextToken());
if (s.equals("Content-Length:"))
contentLength = Integer.parseInt(st.nextToken());
if (s.equals("Connection:"))
connection = new String(st.nextToken());
if (connection.equals("keep-alive")) mustCloseConnection = false;
retrieveBody(distream);
}After getting the Content-Length,i used read method to read the content upto that content length.Then i concatenated the HTTP header and body and the requested site was opened.But some sites dont have Content-Length.Instead of that,Transfer-Encoding is used.I got the HTTP Response header as "Transfer-Encoding:chunked" for some sites.If this encoding is used how to get the length of the message body and how to read the content.
Can anybody help me.
Thanks in advance...
Message was edited by:
VeeraLakshmiWhy don't you use HttpUrlConnection class to retrieve data from HTTP server? This class already supports chunked encoding...
If you want to do anything by yourself then you need to read HTTP RFC and find all required information. Well in two words you may reject advanced encoding by specifying HTTP 1.0 in your request or download chunked answer manually. Read RFC anyway :) -
How to retrieve the data from SAP database.
Hi Pals,
How to retrieve data from SAP R/3 System to my third party software. I will make my query little bit more clear. There is a list of assets entered and stored in the SAP system. For example 3 mobile phones.
1) Mobile 1- Nokia
2) Mobile 2 - Samsung
3) Mobile 3 u2013 Sony
Now think I do not know what all assets is there. I have to retrieve the data and get it on my third party software. Just display the list of assets. Lets say SAP XI is also there. Now how will I map it and get the details.
Please give me step by step method.
N.B: Just to read the data from SAP database.
Please make the flow clear step by step.
Thanking you
AKHi,
You can use RFC or ABAP Proxy to make synchronous call with SAP.
Under RFC or ABAP Proxy Program you can get the data from SAP tables. Direct access to SAP Database is not preferrable even if its possible.
The better way to go for RFC or PROXY.
You will send the request from Third party system and the it will be as input parameters from RFC/ Proxy it will response based on it.
This got it all..
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5474f19e-0701-0010-4eaa-97c4f78dbf9b
/people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi
/people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
/people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit - File to RFC
HTTP to RFC - A Starter Kit
/people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit
Refer
Thanks
Swarup
Edited by: Swarup Sawant on Jun 4, 2008 9:32 AM -
Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
I have got the instrument driver which can write and control the instrument using Labview 2010.
and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
Do I need to use other software or programming to do this step?
If anyone know how is this done, please let me know.
Regards,
EryHi ery,
In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit. The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel. I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.
Another way would be to use the Write To Spreadsheet File VI. While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers. I have also attached a link to some information on the Write To Spreadsheet VI below.
Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file. From LabVIEW, you can go to Help»Find Examples to launch the Example Finder. From there, you can search for "spreadsheet," which should populate examples for use in different applications. I hope this helps, ery. Please let me know if you have any further questions about these!
NI LabVIEW Report Generation Toolkit for Microsoft Office
Write To Spreadsheet File VI
Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support -
I want to know how to set the password encrytacion a database. Accdb from Visual Basic 2010 for a report. Rpl
You have to connect via ODBC, then use code along the lines of what is described here:
http://scn.sap.com/thread/3526924
by me on March 28 and Jan on March 29.
Also see KBA: 1686419 - SAP Crystal Reports designer does not recognize Access *.accdb file
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter -
How to install the Oracle Enterprise Manager Database Tuning ?
Hi,
How to install the Oracle Enterprise Manager Database Tuning with the Oracle Tuning Pack
Release 9.0.1
And where to get download this.
Thank u..!The only way you can get 9iR1 release software is by asking it to your Oracle representative. The oldest 9i release available for public download is 9iR2.
You could try the administrative 9iR2 client, it can work with 9iR1 releases.
~ Madrid. -
How to read the DB application error in JSP
We have the PL/SQL triggers that perform validations on the insert and update. If validation fails the RAISE APPLICATION ERROR is used.
On error the errorpage.jsp is called correctly, but my problem is that I can not read the actual error message from database.
All I am getting from exception.getMessage() is the JBO message. The exception.printStackTrace() does not help either. How can I read text of PL/SQL exception message ?
I have tried this test in errorpage:
if( exception instanceof oracle.jbo.JboException ) { ...}
but apparently the exception is not JboException, since test fails.
I read about ApplicationModule.setExceptionHandler() and even build exception handler which does not do anything. I assumed that this would allow all exceptions to be passed to the error page. Nothing like that happens though. I still see only last JBO exception, I can not see the original DB exception.
Thanks in advance,
MichaelHi ankur,
thanks for the quick reply,
I have got the answer for the first question.
Can u tell me solution for the 2nd question also. how to read the Portal user information in VC. like reading the Portal user information in webdynpro.
In webdynpro we can read any of the portal user properties or information like using the following code.
Itry{
IWDClientUser user = WDClientUser.getCurrentUser();
String fName = user.getFirstName();
String lName = user.getLastName();
}catch(Exception e){
In the same way to read the portal user information in VC. BCz for every portal user we have created one custom properties, we need to read that propety value in my vc application, when the user logged in to portal and accessing integrated VC application.
I have seen one of the thead this is possible from VC7.0 of NW2004s, current my version is also the same.
Portal 7.0
VC 7.0
If u know how to do that, can u let me know.
Regards
Vijay -
How to read the properties file available in Server File structure in webdy
hi all,
I have developed one webdynpro application. In this application i need to access mdm server to continue. For getting the connection i need to pass the IP addresses.
Can i have code how to read the properties file which is residing in the server file. with out included along with the application. keeping some where in the file structure in the server. I want to read that properties file by maintain the iP addresses and users in properties file based on the key i want to read like below.
servername="abcServer"
username="john"
password="test123"
Please send me the code how to read this properties file from the file structure and how to read this values by key in webdynpro application
Regards
VijayHi Vijay,
You can try this piece of code too:
Properties props = new Properties();
//try retrieve data from file
//catch exception in case properties file does not exist
try {
props.load(new FileInputStream("c:\property\Test.properties")); //File location
String serverName = props.getProperty("servername"); //Similarly, you can access the other properties
if(serverName==null)
//....do appropriate handling
} catch(IOException e)
e.printStackTrace();
Regards,
Alka. -
How to make the wifi connection with Ipad in china since it requires user's name and password just like the dialed-up?
The same way you would connect to a secure wifi network in any other country. Supply the username and password when prompted.
-
i keep getting an error that reads the network connection was reset when tring to download a puchase from itunes and one know how to fix this
I'm having same problem today. Did yours get resolved? If so, please share. I'm dying....
-
How to read the child elements in single query
Hi
How to read the child elements under 'alternateIdentifiers' and 'matchEntityBasic' in a single query followiing xml content.xml content is of xmltype
I/p doc
<UPDATES>
<matchEntity>
<sourceUpdateId>SAMSUNG</sourceUpdateId>
<matchEntityId>861873</matchEntityId>
<alternateIdentifiers>
<sourceUpdateId>SAMSUNG</sourceUpdateId>
<schemeCode>SMG</schemeCode>
<effectiveDate>2012-01-16</effectiveDate>
</alternateIdentifiers>
<alternateIdentifiers>
<sourceUpdateId>SAMSUNG</sourceUpdateId>
<schemeCode>TEBBGL</schemeCode>
<effectiveDate>2012-01-16</effectiveDate>
</alternateIdentifiers>
<matchEntityBasic>
<sourceUpdateId>SAMSUNG</sourceUpdateId>
<marketExchangeCode>XASE</marketExchangeCode>
</matchEntityBasic>
</matchEntity>
</UPDATES>
o/p
sourceUpdateId schemeCode effectiveDate marketExchangeCode
SAMSUNG SMG 2012-01-16 XASE
SAMSUNG TEBBGL 2012-01-16
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
i tried the query but not working
SELECT sourceUpdateId ,schemeCode ,effectiveDate ,marketExchangeCode FROM message pl,XMLTABLE ('/UPDATES/matchEntity/alternateIdentifiers'
PASSING pl.messagetext
COLUMNS sourceUpdateId VARCHAR2 (20) PATH sourceUpdateId,
schemeCode VARCHAR2 (20) PATH 'schemeCode',
effectiveDate DATE PATH 'effectiveDate',
marketExchangeCode VARCHAR2 (20) PATH './matchEntityBasic/marketExchangeCode'
) x
iam not retriving marketExchangeCode with the following query
marketExchangeCode VARCHAR2 (20) PATH './matchEntityBasic/marketExchangeCode'
thanksThe problem is that "matchEntityBasic" is not a child of "alternateIdentifiers", so this :
./matchEntityBasic/marketExchangeCodepoints to nothing.
To display both values in the same query, you'll need a two-level approach.
For example :
SQL> SELECT x2.sourceUpdateId
2 , x2.schemeCode
3 , x2.effectiveDate
4 , x1.marketExchangeCode
5 FROM message pl
6 , XMLTable(
7 '/UPDATES/matchEntity'
8 passing pl.messagetext
9 columns marketExchangeCode VARCHAR2(20) PATH 'matchEntityBasic/marketExchangeCode'
10 , alternateIds XMLType PATH 'alternateIdentifiers'
11 ) x1
12 , XMLTable(
13 '/alternateIdentifiers'
14 passing x1.alternateIds
15 columns sourceUpdateId VARCHAR2(20) PATH 'sourceUpdateId'
16 , schemeCode VARCHAR2(20) PATH 'schemeCode'
17 , effectiveDate DATE PATH 'effectiveDate'
18 ) x2
19 ;
SOURCEUPDATEID SCHEMECODE EFFECTIVEDATE MARKETEXCHANGECODE
SAMSUNG SMG 16/01/2012 XASE
SAMSUNG TEBBGL 16/01/2012 XASE
Or the shorter version :
SQL> SELECT x.sourceUpdateId
2 , x.schemeCode
3 , x.effectiveDate
4 , x.marketExchangeCode
5 FROM message pl
6 , XMLTable(
7 'for $i in /UPDATES/matchEntity
8 return
9 for $j in $i/alternateIdentifiers
10 return element r { $j/child::*, $i/matchEntityBasic/marketExchangeCode }'
11 passing pl.messagetext
12 columns sourceUpdateId VARCHAR2(20) PATH 'sourceUpdateId'
13 , schemeCode VARCHAR2(20) PATH 'schemeCode'
14 , effectiveDate DATE PATH 'effectiveDate'
15 , marketExchangeCode VARCHAR2(20) PATH 'marketExchangeCode'
16 ) x
17 ;
SOURCEUPDATEID SCHEMECODE EFFECTIVEDATE MARKETEXCHANGECODE
SAMSUNG SMG 16/01/2012 XASE
SAMSUNG TEBBGL 16/01/2012 XASE
Maybe you are looking for
-
I have created a crystal report with credit and debit column. Balance column created on the report. Report running with cummulative balance. THis report contain an option for date range. If i filtered this report its not showing the actual balance. I
-
Want attach the XML data file with layout template in Oracle 10g
Hi All, I need a help from you genius guys. I am genrating reports in BI with xml the procedure which I am following is as below. 1. generating XML from the RDF 2. creating a template in .rtf format 3.after that loading the xml to the template then g
-
Changing aspect ratio for edited clips
Hi, There probably isn't a way to do this, but I thought I'd ask. One of my students made a film using a JVC camera and two other SD cameras. The JVC was in 16X9 aspect (he didn't notice) and the other cameras were in 4X3. We had trouble getting the
-
[Solved] WoW and Wine: Run time errors and massive lag.
Ok, so I have a AMD A4 Kabini series APU, and I installed the ati open source drivers and added the correct settings into the /etc/X11/xorg.conf.d/20-radeon.conf , however when ever I run WoW it becomes extremely laggy and to a point where it is unus
-
hi I am on SRM 7.01 and using the classic scenario process SC created in SRM - > SC goes to approving ->Manager approved the Sc -> system create PR or PO or RS Automatically in backend as a follow on doc problem: when purchaser create sc and manager