Retrieve LDAP data in Chunks using DBMS_LDAP
Need help in getting the LDAP data in Chunks using the DBMS_LDAP. The reason being i have over 8000 records in the AD and it is configured that i cannot retrieve more than 1000 at a stretch.
The AD administrator had given me an option of fetching it based on the pagesize which they use on AD.
Dim DirSearcher As New DirectorySearcher()
DirSearcher.SearchRoot = New DirectoryEntry("LDAP://" & System.Environment.UserDomainName)
DirSearcher.Filter = "(&(objectclass=user)(objectcategory=person))"
DirSearcher.PageSize = 1000
Can we have something like this done in the DBMS_LDAP package to fetch the records in AD in chunks of 1000 records?
version details
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
if there are more than 1000 entries which starts with a character, how will this solution work?You would have to incorporate one more loop (and so on, in case it still errors out):
for c in ascii ('a') .. ascii ('z')
loop
for d in ascii ('a') .. ascii ('z')
loop
l_retval :=
dbms_ldap.search_s (ld => ld
base => base,
scope => dbms_ldap.scope_subtree,
filter => '(&(objectCategory=person)(objectClass=user)(sAMAccountName=' || chr (c) || chr(d) || '*))',
attrs => attrs,
attronly => 0,
res => res
end loop;
end loop;
...Not nice I know, but it seems to be the only way to avoid »ORA-31202: DBMS_LDAP: LDAP client/server error: Sizelimit exceeded«.
Similar Messages
-
Can we load data in chunks using data pump ?
We are loading data using data pump. So I want to clear my understanding.
Please correct me if I am wrong on my understandings -
ODI will fetch all data from source (whether it is INIT or CDC ) in one go and unload into staging area.
If it is true, will performance hamper in case very huge data (50 million records at source) at source as ODI tries to load entire data in one go. I believe it will give better performance if we load in chunks using data pump.
Please confirm and correct.
Also I would like to know how can we configure chunk load using data-pump.
Thanks in Advance.
Regards,
Dinesh.You may consider usingLKM Oracle to Oracle (datapump)
http://docs.oracle.com/cd/E28280_01/integrate.1111/e12644/oracle_db.htm#r15c1-t2
In 11g ODI reads from source and write to target in parallel. This is the case where you specify select query in source command and insert/update query in the target command. At source side Odi reads records from source and add them to a data queue. At target side a parallel thread reads data from the data queue and writes to the target. So the overall performance would be the slower of the read or write process.
Thanks, -
How to retrieve the data from SAP-BAPI by using VB Code
Hi ,
I am new to BAPI.
V have created an application in Visual Basic with the following fields
EmpNo , EmpName, Addr1, Addr2, City and Phone (Only for Test)
We have written the code for SAVING the data into SAP. Already we have
constructed a table with the respective fields in SAP.
For that we ourself created our own BAPI Structure / Function Group /
Function Module/ Business Object - RELEASED related elements.
1)Established the connection successfully.
2)Stored the data into SAP Successfully and v r in need of
3)HOW TO RETRIEVE THE DATA FROM SAP (USING GETLIST.....GETDETAIL....)
Following is the code :
'BAPI Structure : ZBAPIEMP
'Function Group : ZBAPIEMP
'Function Module : ZBAPI_EMP_CREATEFROMDATA
'Business Object : ZBAPIEMP
'Function Module : ZBAPI_EMP_GETLIST
Dim bapictrl As Object
Dim oconnection As Object
Dim boEmp As Object
Dim oZEmp_Header As Object
Dim oImpStruct As Object
Dim oExpStruct As Object
Dim oreturn As Object
Dim x As String
Private Sub Form_Load()
Set bapictrl = CreateObject("SAP.BAPI.1")
Set oconnection = bapictrl.Connection
oconnection.logon
Set boEmp = bapictrl.GetSAPObject("ZBAPIEMP")
Set oZEmp_Header = bapictrl.DimAs(boEmp, "CreateFromData", "EmployeeHeader")
Set oImpStruct = bapictrl.DimAs(boEmp, "GetList", "EmployeeDispStruct")
End Sub
Private Sub cmdSave_Click()
oZEmp_Header.Value("EMPNO") = txtEmpNo.Text
oZEmp_Header.Value("EMPNAME") = txtEmpName.Text
oZEmp_Header.Value("ADDR1") = txtAddr1.Text
oZEmp_Header.Value("ADDR2") = txtAddr2.Text
oZEmp_Header.Value("CITY") = txtCity.Text
oZEmp_Header.Value("PHONE") = txtPhone.Text
boEmp.CreateFromData EmployeeHeader:=oZEmp_Header, Return:=oreturn
x = oreturn.Value("Message")
If x = "" Then
MsgBox "Transaction Completed!..."
Else
MsgBox x
End If
End Sub
Private Sub cmdView_Click()
End Sub
COULD ANYBODY GUIDE ME, HOW TO RETRIEVE THE DATA FROM BAPI, FOR THE WRITTEN CODE.I didn't seen any other answers but here's how it's been done previously in our organization for a custom BAPI. In this example, we give material and language to return the part description. It's not specific to your project but may give you ideas..
-Tim
Option Compare Database
Dim SAPLOGIN As Boolean
Dim FunctionCtrl As Object
Dim SapConnection As Object
Sub SAPLOGOUT()
On Error GoTo LogoutFehler
SapConnection.logoff
SAPLOGIN = False
Exit Sub
LogoutFehler:
If Err.Number = 91 Then
Exit Sub
Else
MsgBox Err.Description, vbCritical, "Fehler-Nr." & CStr(Err.Number) & " bei SAP-Logout"
End If
End Sub
Function SAPLOG() As Boolean
'Verbindungsobjekt setzen (Property von FunctionCtrl)
Set FunctionCtrl = CreateObject("SAP.Functions")
Set SapConnection = FunctionCtrl.Connection
'Logon mit Initialwerten
SapConnection.Client = "010"
SapConnection.Language = "EN"
SapConnection.System = "PR1"
SapConnection.SystemNumber = "00"
'SapConnection.Password = ""
SapConnection.GroupName = "PR1"
SapConnection.HostName = "168.9.25.120"
SapConnection.MessageServer = "168.9.25.120"
If SapConnection.Logon(0, False) <> True Then 'Logon mit Dialog
Set SapConnection = Nothing
DoCmd.Hourglass False
MsgBox "No connection to SAP R/3 !"
SAPLOGIN = False
SAPLOG = False
Exit Function
End If
SAPLOG = True
End Function
Function MatDescr(MatNr As String)
Dim func1 As Object
Dim row As Object, X As Integer, ErsteNr As String
Dim DatensatzZähler As Long
Dim RowField(1 To 50, 0 To 1) As String, RowLine As Long
If Not SAPLOGIN Then
If Not SAPLOG() Then
MsgBox "No connection to SAP !", 16
SAPLOGOUT
Exit Function
End If
End If
' Instanziieren des Function-Objektes
Set func1 = FunctionCtrl.Add("Z_BAPI_READ_MAKT")
' Export-Paramter definieren
func1.exports("MATNR") = MatNr
func1.exports("SPRAS") = "EN"
DoEvents
If Not func1.call Then
If func1.exception <> "" Then
MsgBox "Communication Error with RFC " & func1.exception
End If
DoCmd.Hourglass False
SAPLOGOUT
Exit Function
Else
MatDescr = func1.imports("MAKTX")
End If
If MatDescr = "" Then
MatDescr = "PART NO. NOT FOUND"
End If
End Function -
After a Lion clean install, how do I retrieve my data from external hard drive?
Following Apple advice I used Migration Assistant which crashed new system twice which is why I had to clean install Lion in the first place.
Is there a sure way of doing it?
I have only a few programs that I will have to install myself and that should not be a problem.
I just want my data, music and photos back where I can use them.Time machine backups. I went to migration assistant a few hours ago and limited my selection to "users", no need for applications, settings and other files. Stuff started moving over at a fast pace but has now seemed to stall.
I will let it run overnight as there are lots of songs and photos as well as a few movies.
If that does not work, then I will go into TM and try restore. I have restored some things in the past such a mail files and it has worked well.
The Apple fellow at the store told me to go right into TM, he may have had a point. I'll get it eventually. -
Is there a simple way to retrieve the data from a resultset using JavaBean?
I have a result set from a select * from users where userid = xxx statement. However, at the moment I have had to hard code the remainder of the code to get the data from each column as I need the column name as well as its data.
I had read somewhere using java beans and reflection it is easier. But i do not know know how.
Is there a simple way to retrieve the data from a result set ?
thanks in advance-
kgWell, it is not really simple. But there are Open Source components to simplify it for you. See e.g http://www.must.de/Jacompe.htm - de.must.dataobj.DataObject and its subclasses. Feel free to contact me if you have any questions: [email protected]
-
Error while retrieving data from sql using jdbc adapter
hi all,
i m working on one scenario where i m sending data using HTTP and receiver is jdbc adapter which is retrieving me data from sql server.
i have checked the structure both for req and res.
i m getting this error
<SAP:Error>
<SAP:Category>Application</SAP:Category>
<SAP:Code>MAPPING.EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_INF57285_DB_HR_RES_</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
<SAP:Stack>During the application mapping com/sap/xi/tf/_INF57285_DB_HR_RES_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
</SAP:Error>
can somebody help me with this.
Thanks & Regards
Arunathnks bhavesh i think i made it that way
JDBC REQ
<ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
<Employee>
<EmpDetails action="SELECT">
<table>EmpDetails</table>
<access>
<Name />
<EmpId />
<Band />
<Salary />
</access>
<Key>
<EmpId>57285</EmpId>
</Key>
</EmpDetails>
</Employee>
</ns:INF57285_DB_Request>
JDBC RES
<ns:INF57285_DB_Request_response xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
<Employee_response>
<row>
<Name>aruna</Name>
<EmpId>57285</EmpId>
<Band>A</Band>
<Salary>4675776</Salary>
</row>
</Employee_response>
</ns:INF57285_DB_Request_response>
my hr req is which i mapped with DB req
<ns:INF57285_HR_Req xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
<REQUEST>
<EmpNo>57285</EmpNo>
</REQUEST>
</ns:INF57285_HR_Req>
my hr res is which i mapped with DB res
<ns:INF57285_HR_Res xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
<response>
<row>
<Name>aruna</Name>
<Empld>57285</Empld>
<Salary>4675776</Salary>
</row>
</response>
</ns:INF57285_HR_Res>
and interestingly i am not getting any error in sxmb_moni
it's not showing any error
plz suggest me something wht to do ....
thnks & regards
Aruna -
How to retrieve the date of the itme's version using Ecmascript
Hello, all
I'd like to retrieve the date of minor and major versions using ecmascript. Here is my script so far.
I am getting ID from query string in URL, then passing it to access file.
What I don't understand is to how to instantiate Version class and loop through version to retrieve created date.
Can someone help?
<Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
<pre class="brush: javascript;">
<script language="ecmascript" type="text/ecmascript">
//Get ID of the document
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
var v_id = getParameterByName('ID');
alert(v_id);
var item;
var list;
var file;
function fileMajorandMinorVersion() {
var clientContext = SP.ClientContext.get_current();
if (clientContext != undefined && clientContext != null) {
var webSite = clientContext.get_web();
this.list = webSite.get_lists().getByTitle("List Title");
this.item = list.getItemById(v_id);
this.file = this.item.get_file();
clientContext.load(this.file);
clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
function OnLoadSuccess(sender, args) {
var version = "Major Version: " + this.file.get_majorVersion() + '\n' + "Minor Version: " + this.file.get_minorVersion();
alert(version)
function OnLoadFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
</script>
<input id="btnFileMajorandMinorVersion" onclick="fileMajorandMinorVersion()" type="button" value="File Major and Minor Version"/>
vladIn order to loop through the version collection and display last version date here is the script that works for me:
<Sharepoint:ScriptLink name="SP.js" runat="server" OnDemand="true" localizable="false"/>
<script language="ecmascript" type="text/ecmascript">
//Get ID of the document
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
var v_id = getParameterByName('ID');
function convertShortDate(par_date) {
var var_date = new Date(par_date);
var day = var_date.getDate();
var month = var_date.getMonth() + 1;
var year = var_date.getFullYear();
var result_date = month+'/'+day+'/'+year;
return result_date;
var item;
var list;
var file;
var versions;
var _version;
function set_LastCertDate() {
var clientContext = SP.ClientContext.get_current();
if (clientContext != undefined && clientContext != null) {
var webSite = clientContext.get_web();
this.list = webSite.get_lists().getByTitle("Archer Pages");
this.item = list.getItemById(v_id);
this.file = this.item.get_file();
this.versions = this.file.get_versions()
clientContext.load(this.file);
clientContext.load(this.versions)
clientContext.executeQueryAsync(Function.createDelegate(this, this.OnLoadSuccess), Function.createDelegate(this, this.OnLoadFailed));
function OnLoadSuccess(sender, args) {
var output = "";
var certdate = "";
var listItemEnumerator = this.versions.getEnumerator();
// loop through the version items
while (listItemEnumerator.moveNext())
var oVersionItem = listItemEnumerator.get_current();
certdate = oVersionItem.get_created();
$("input[title='CertificateDate']").val(convertShortDate(certdate));
function OnLoadFailed(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
document.write("<input name='Button1' type='button' value='Populate Certificate Date' onclick='set_LastCertDate()'/>");
</script>
vlad -
How to retrieve the data stored in BLOB field in MySql using java?
Hi all!
i stored a file content into the MySql database in BLOB field.
and i now want retrieve the data......
Please help me out in doing the task...........
Thanx...........Thrisha..
When u get a result set u can have rs.getBlob() function that will give u a BLOB object that can be captured using Blob interface of javax.sql package...
Blob interface has getBinaryStream, getBytes etc as functions...
i think i cleared u
regards
Shanu -
Unable to insert and retrieve Unicode data using Microsoft OLE DB Provider
Hi,
I have an ASP.NET web application that uses OLEDB connection to Oracle database.
Database: Oracle 11g
Provider: MSDAORA
ConnectionString: "Provider=MSDAORA;Data Source=localhost;User ID=system; Password=oracle;*convertNcharLiterals*=true;"
When I use SQL Develeoper client and add convertNcharLiterals=true; in sqldeveloper.conf then I am able to store and retrieve Unicode data.
The character sets are as follows:
Database character set is: WE8MSWIN1252
National Language character set: AL16UTF16
Select * from nls_database_parameters where parameter in ('NLS_CHARACTERSET','NLS_LENGTH_SEMANTICS','NLS_NCHAR_CHARACTERSET');
PARAMETER VALUE ---------------------------------------
NLS_CHARACTERSET WE8MSWIN1252
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CHARACTERSET AL16UTF16
I have a test table:
desc TestingUni
Name Null Type
UNI1 VARCHAR2(20)
UNI2 VARCHAR2(20)
UNI3 NVARCHAR2(20)
I execute the below mentioned query from a System.OleDb.OleDbCommand object.
Insert into TestingUni(UNI3 ) values(N'汉语漢語');
BUT when retrieving the same I get question marks (¿¿¿¿) instead of the Chinese characters (汉语漢語)
Is there any way to add the above property(convertNcharLiterals) when querying the Oracle database from OLEDB connection?
OR is there any other provider for Oracle which would help me solve my problem?
OR any other help regarding this?
Thanksusing OraOLEDB Provider.
set the environment variable ORA_NCHAR_LITERAL_REPLACE to TRUE. Doing so transparently replaces the n' internally and preserves the text literal for SQL processing.
http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements003.htm#i42617 -
Write / store xml data in Xe and retrieve stored data using pl/sql
Hi to all,
i'm searching a tutorial on:
A - how to write / store xml data in Xe and retrieve stored data using pl/sql
I don't want to use other technologies, because i use htmldb and my best practice is with pl/sql.
I was reading an ebook (quite old maybe) however it's about oracle 9 and it's talking about xmltype:
1 - I don't understand if this is a user type (clob/varchar) or it's integrated in Oracle 9 however i will read it (it's chapter 3 titled Using Oracle xmldb).
Please dont'reply here: i would be glad if someone can suggest me a good tutorial / pdf to achieve task A in Oracle XE.
ThanxThank you very much Carl,
However my fault is that i've not tried to create the table via sql plus.
Infact i was wrong thinking that oracle sql developer allows me to create an xmltype column via the create table tool.
however with a ddl script like the following the table was created successfully.
create table example1
keyvalue varchar2(10) primary key,
xmlcolumn xmltype
Thank you very much for your link.
Message was edited by:
Marcello Nocito -
Use Custom Extension Web Item to Retrieve DSO Data Directly
Hi experts,
Is it possible to use Custom Extension Item in BEx WAD to retrieve DSO data directly? The idea is to display master data for a line item (e.g. customer name, id, address etc.) in the header section of a Web Template. If it is possible, how can I implement that?
If not, is there any other possibility to fulfill the requirement?
Thanks in advance.
Regards,
JoonHi experts,
any update on this?
Thanks,
Joon -
Function Module to retrieve appraisal data using a Document ID (GUID)
Hi,
Is there a function module to retrieve appraisal data of a document using the document ID (GUID). The new Document ID is of 32 char length. I am working on version 4.7 110.
Edited by: Beril PC on Jul 16, 2008 8:01 AMcheck for functiona modules starting with phap* or hap*
Regards,
Divya -
Can I use thunderbolt to retrieve old data?
A few weeks ago my MacBook Pro wouldn't boot. I took it to the nearest apple store and they said they had to reformat my macbook's inner hard drive. With no other solution I gave them my MacBook. When I got it back they told me it has been formatted and updated to mavericks and they could only save some documents but none were important. I tried using DiskDrill and other softwares, though they did find all my pictures, documents, etc, I couldn't retrieve them as in the end I have to buy the software. So I was wondering, if the softwares did find the old data, can't I use a thunderbolt to connect my mac to another and retrieve the data?
Thank youSansouf wrote:
can't I use a thunderbolt to connect my mac to another and retrieve the data?
Thunderbolt is a data transmission protocol, it is not a data restoration application. If the 'another' you mention is a Mac with your data, you may use Thunderbolt or any other connection protocol to transfer data (such as Firewire or USB).
Ciao. -
How to store and retrieve blob data type in/from oracle database using JSP
how to store and retrieve blob data type in/from oracle database using JSP and not using servlet
thanksJSP? Why?
start here: [http://java.sun.com/developer/onlineTraining/JSPIntro/contents.html] -
Can we create TDMS file using C# and retrieve the data using a diadem
I want to write a tdms file from a dot net application and to use the diadem to retrieve the data and to create a user defined report
Hello,
If you want this kind of output, you can use Java Mapping e.g
1. Create your data type like this:
CHARSET 0..1
LOADMODE 0..1
CODEFORMAT 0..1
CURRENCY 0..1
SUPPLIERID_DOMAIN 0..1
ITEMCOUNT 0..1
TIMESTAMP 0..1
UNUOM 0..1
COMMENTS 0..1
FIELDNAMES 0..1
DATA 0..unbounded
ENDOFDATA
2.In your message mapping assign all the constants. You might want to concat all the values of the FIELDNAMES and output them to DATA
3.In your Java Mapping, replace all the XML fields including ,, with ,''',
4.In ID, do not use FCC.
Hope this helps,
Mark
Maybe you are looking for
-
Copy control problem : Delivery to Billing
Hi Guys, I am facing a strange problem regarding copy control between delivery and billing document. The case is as below: When I am creating an F2 Invoice from LF Delivery the header texts from the LF Delivery is getting copied into the header taxt
-
The "enter" key on the numeric keypad of my external mac keyboard has stopped working with my Macbook pro. If I plug the keyboard into any other computer, that entier key works fine. I'm using a standard Mac wired keyboard, & it's worked fine for 2
-
Edit with Photoshop - Output to PS CS3 always Adobe RGB???
I'm having trouble understanding why every photo I export from Aperture 2.1 to edit in Photoshop CS3 is exported to Photoshop in the Adobe RGB color space. My Nikon D3 is setup to record as sRGB, which I understand does not matter (e.g. Aperture sees
-
How can I create the effect in this photo?
I'd like to know how to create the orange and grey coloring on this photo. I have Photoshop CS6. Any help would be appreciated. I have been playing around to no avail. Thanks in advance.
-
How do I clear application level item of the last value it held?
See next post - I oopsed the first try. Edited by: user3034406 on Jul 28, 2009 1:48 PM