on 12-11-2007 2:17 PM
Hi all,
I'm using connection pooling to connect to the MDM server from my Java APIs.
Is there any method which will help me to get the name of the DBServer name of the MDM repository? or should i hard code this value? This is to establish a Respository Object which takes in the parameters - Repository Name, DBServer Name, DBMS.Type.
ANy hints??
Regards,
Ak.
PS: Good Posts will be Rewarded properly.
hi,
could you let me know, which version of MDM you are using,
Java API's will vary from Sp4 to SP5.
for sp5:
Hi find the following code.
<u>use the following line of code to get the DBMS Server Name</u>
DBMSType.MS_SQL.getName()
<u>To get DBMS TYPE</u>
DBMSType dbmsType =
DBMSType.getDBMSType(DBMSType.MS_SQL.getName());
hope this may help you,
Regards,
srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
Thanks for your reply. I'm using SP5.
DBMSType.ORCL.getName()
And the code you gave me returns a string called ORCL for oracle. This is not what i want. I want to get the SID of my MDM Database Server.
I give that parameter in the following code.
RepositoryIdentifier repId = new RepositoryIdentifier ("Vendor", "MDS", DBMSType.ORACLE);
here Vendor is the Repository. MDS is the dbserver name. and the DB Type is Oracle.
Can you help me get the value of the DBServer name "MDS" through code?
Regards,
Ak.
Hi Vijay,
I Tried the following code.
CreateServerSessionCommand serSess = new CreateServerSessionCommand(cp);
try {
serSess.execute();
} catch (CommandException e) {
e.printStackTrace();
}
System.out.println(serSess.getSession());
GetDBMSListCommand dbmslist = new GetDBMSListCommand(cp);
dbmslist.setSession(serSess.getSession());
try {
dbmslist.execute();
} catch (CommandException e1) {
e1.printStackTrace();
}
DBMSProperties[] dbProp = dbmslist.getDBMSList();
// dbProp[0 or 1..n].getgetName();
for(int i=0; i<dbProp.length ; i++){
System.out.println(dbProp<i>.getName());
}
I got the following error message.
Caused by: com.sap.mdm.internal.protocol.manual.ServerException: The current Protocol operation is not supported for the session specified.
at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:112)
at com.sap.mdm.server.commands.GetDBMSListCommand.execute(GetDBMSListCommand.java:60)
... 1 more
Is there anything that i'm missing?
Regards,
Ak.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.