Database hangs after retrieving some records....

hi,
I create a two level B+-tree index, for the first level i'm using key as logical database name, for the second level B+-tree i'm using some other field in my data. I am retrieving the records based on logical database name. I am using C++ to implement my index.
In the following code i'm retrieving records from database. Program is behaving differently for different logical database names. For example in my database i have around 4 lakhs records with logical database name 'A' and around 1 lakh of records with logical database name 'B'. The following code displays all B records but programs hangs after retrieving some A records.
I'm using PAGE_SIZE=8192, numBuffers=2048, and runnig in Fedora Core3.
DbEnv myEnv(0);
     myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
     myEnv.set_data_dir("/home/raviov/new/database");
          try {
               myEnv.open("./", DB_CREATE | DB_INIT_MPOOL, 0);
          catch (DbException &e) {
               cerr << "Exception occurred: " << e.what() << endl;
               exit(1);
          db=new Db(&myEnv,0);
          db->set_pagesize(PAGE_SIZE);     
          db->set_bt_compare(compare_int);
     dbname=itoa(p);
     try
     db->open(NULL,
               "treedb.db",
               dbname,
               DB_BTREE,
               0,
               0);
     catch(DbException &e)
          cerr << "Failed to open DB object" << endl;
          exit(1);
     db->cursor(NULL,&cursorp,0);
     key=new Dbt();
     data=new Dbt();
     while(ret=(cursorp->get(key,data,DB_NEXT))==0)
          j=*((int*)key->get_data());
          q=(*((struct tuple*)data->get_data())).startPos;
          r=(*((struct tuple*)data->get_data())).endPos;
          s=(*((struct tuple*)data->get_data())).level;
          cout<<"position : "<<j<<"\t";
          cout<<"start : "<<q<<"\t";
          cout<<"end : "<<r<<"\t";
          cout<<"level : "<<s<<"\n";
     if(ret==DB_NOTFOUND)
          cout<<"no records";
          exit(1);
     if(cursorp!=NULL)
          cursorp->close();
     try
          db->close(0);
     catch(DbException &e)
          cerr << "Failed to close DB object" << endl;
          exit(1);
     myEnv.close(0);

HI Andrei,
thank you for giving reply, I'm not using any secondary indecies, subdatabases and not using any threads.
the following code displays index...
#include <stdio.h>
#include <db_cxx.h>
#include <iostream.h>
#include <db.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
int PAGE_SIZE=8192;
int numBuffers=2048;
char *itoa(const int x)
      char buf[100];
      snprintf(buf, sizeof(buf), "%d", x);
       return strdup(buf);
int compare_int(Db dbp, const Dbt a, const Dbt *b)
  int ai;
  int bi;
  memcpy(&ai,a->get_data(),sizeof(int));
  memcpy(&bi,b->get_data(),sizeof(int));
  return(ai-bi);
struct tuple
       int startPos;
       int endPos;
       int level;
main()
     FILE *fp;
     int i,j,k,l,m,n,total=0;
     char dbname[500],filename[500],str [500];
     tuple t;
     Db *db;
     Dbt key,data;
     DbEnv myEnv(0);
     myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
     try {
            myEnv.open("/home/raviov/Desktop/example", DB_CREATE | DB_INIT_MPOOL, 0);
       catch (DbException &e) {
              cerr << "Exception occurred: " << e.what() << endl;
              exit(1);
     for(n=0;n<=84;n++)
          db = new Db(&myEnv, 0);     // Instantiate the Db object
                db->set_bt_compare(compare_int);
           db->set_pagesize(PAGE_SIZE);
          strcpy(filename,"/home/raviov/Desktop/GTCReport/code/sequence/splitter/tree/");
          strcat(filename,itoa(n));
          fp=fopen(filename,"r");
          if(fp==NULL)
               cout<<"error in opening the file";
               exit(0);
          while(fgets (str , 500 , fp)!=NULL)
               sscanf(str,"%d(%d,%d,%d,%d)",&i,&j,&k,&l,&m);
               key=new Dbt(&i,sizeof(int));
               if(total==0)
                    strcpy(dbname,itoa(j));
               t.startPos=k;
               t.endPos=l;
               t.level=m;
               data=new Dbt(&t,sizeof(t));     
               if(total==0)
                    try
                         db->open(NULL,
                         "tree.db",
                                   dbname,
                          DB_BTREE,
                            DB_CREATE,
                            0);
                    catch(DbException &e)
                           cerr << "Failed to create DB object" << endl;
                         exit(1);
                    total=99;
               int ret=db->put(NULL,key,data,DB_NOOVERWRITE);
               if(ret==DB_KEYEXIST)
                    cout<<"key already exist\n";
                    exit(1);
               delete key;
               delete data;
          total=0;
          fclose(fp);
          try
               db->close(0);
          catch(DbException &e)
                 cerr << "Failed to close DB object" << endl;
               exit(1);
     myEnv.close(0);
}The following code retrieves the records from database that we had built above...
#include <stdio.h>
#include <db_cxx.h>
#include <iostream.h>
#include <db.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
int PAGE_SIZE=8192;
int numBuffers=2048;
char *itoa(const int x)
      char buf[100];
      snprintf(buf, sizeof(buf), "%d", x);
       return strdup(buf);
int compare_int(Db dbp, const Dbt a, const Dbt *b)
  int ai;
  int bi;
  memcpy(&ai,a->get_data(),sizeof(int));
  memcpy(&bi,b->get_data(),sizeof(int));
  return(ai-bi);
struct tuple
       int startPos;
       int endPos;
       int level;
main()
     FILE *fp;
     int i,j,k,l,m,n,total=0;
     char *dbname;
     char filename[200],str [100];
     tuple t;
     Db *db;
     Dbt key,data;
     Dbc *cursorp=NULL;
     int ret,x=4;
     char *ravi;
     int p=84763;
     int y=2134872;
     int r,s,q,count=0;
     DbEnv myEnv(0);
     myEnv.set_cachesize(0, PAGE_SIZE * numBuffers, 0);
     myEnv.set_data_dir("/home/raviov/new/database");
          try {
                  myEnv.open("./", DB_CREATE | DB_INIT_MPOOL, 0);
           catch (DbException &e) {
                  cerr << "Exception occurred: " << e.what() << endl;
                  exit(1);
          db=new Db(&myEnv,0);
          db->set_pagesize(PAGE_SIZE);     
          db->set_bt_compare(compare_int);
     dbname=itoa(p);
     try
          db->open(NULL,
                "tree.db",
                 dbname,
                 DB_BTREE,
                 0,
                 0);
     catch(DbException &e)
            cerr << "Failed to open DB object" << endl;
          exit(1);
     db->cursor(NULL,&cursorp,0);
     key=new Dbt();
     data=new Dbt();
     while(ret=(cursorp->get(key,data,DB_NEXT))==0)
          j=*((int*)key->get_data());
          q=(*((struct tuple*)data->get_data())).startPos;
          r=(*((struct tuple*)data->get_data())).endPos;
          s=(*((struct tuple*)data->get_data())).level;
          cout<<"position   : "<<j<<"\t";
          cout<<"start : "<<q<<"\t";
          cout<<"end   : "<<r<<"\t";
          cout<<"level   : "<<s<<"\n";
          delete key;
          delete data;
     if(ret==DB_NOTFOUND)
          cout<<"no records";
          exit(1);
     if(cursorp!=NULL)
          cursorp->close();
     try
          db->close(0);
     catch(DbException &e)
            cerr << "Failed to close DB object" << endl;
          exit(1);
     myEnv.close(0);     
}

Similar Messages

  • ResultSet "hangs" after every 10 records

    Hi
    Please could you somebody help me.
    I have extracted a ResultSet from a database which contains between 100 and 200 records (5 field each).
    If I call rset.next(), printing a count after each call my program hangs for about 2 minutes after every 10 records.
    For example:
    int count = 0;
    while(rset.next()) {
    System.out.println("" + ++count);
    Prints:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    Waits here for two minutes and then carries on
    11
    20
    Waits again for 2 minutes etc.
    Has anyone had this problem or does anyone know how to fix it?
    FYI: prstat reports tiny CPU and memory usage so the hardware is not responsible.
    Thanks a lot in advance

    Hi All
    It must be network - setFetchSize is unsupported in both Statement and ResultSet in the driver set I am using.
    It is running through a 10baseT switch at the moment which may be the problem so I will stick it on the backbone and try again.
    Thanks again for your help.

  • Database Hanging after Alter Database Suspend Command

    I issued the command for testing
    Alter database suspend
    Its hanging for more than 2 rhrs,I suspect there are some users connected to it...
    How to login and resume the DB for the USers
    Can i ask them to disconnect from the DB

    And your version number is?
    You suspect there are connected users?
    Is there some reason you can't query gv$session?
    Can you ask them to disconnect from the database?
    I don't know ... can you? <g>
    I know I certainly would.
    What is the business case that you are doing the suspend?

  • Queries on oracle hang after index creation

    Hi,
    I have a problem where queries issued on an oracle database hang after I create indexes on some of the tables used by these queries.
    I have a script where I drop indexes :
    DROP INDEX EVP_PCON00_CDSITC_IX;
    DROP INDEX EVP_PCS202_STIMP1_IX;
    DROP INDEX EVP_PECT00_ONAECT_IX;
    DROP INDEX EVP_PVAL01_ONAVAL_IX;
    After this script I load data into those tables.
    Then I launch another script where I recreate the indexes I just dropped :
    CREATE INDEX EVP_PCON00_CDSITC_IX  ON EVP_PCON00(CDSITC) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    CREATE INDEX EVP_PCS202_STIMP1_IX  ON EVP_PCS202(STIMP1) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    CREATE INDEX EVP_PVAL01_CDORIV_IX  ON EVP_PVAL01(CDORIV) TABLESPACE TS_ODS_INDEX;
    COMMIT;
    When the script ends, I try to execute a query using some of the tables I created indexes on :
    SELECT ...
    FROM ....
    WHERE ....
    The query never return a result set, it just hangs, I look at the session browser in toad and the scan of the first table used in the query hangs.
    When I drop those indexes and re execute the query everything works fine.
    Thanks
    Edited by: 946359 on Jul 13, 2012 9:20 AM

    This is the result I get :
    Execution Plan
    Plan hash value: 1198043594
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 1343 | 12 (17)| 00:00:01 |
    | 1 | HASH UNIQUE | | 1 | 1343 | 12 (17)| 00:00:01 |
    |* 2 | HASH JOIN OUTER | | 1 | 1343 | 11 (10)| 00:00:01 |
    | 3 | NESTED LOOPS OUTER | | 1 | 1257 | 9 (12)| 00:00:01 |
    | 4 | NESTED LOOPS OUTER | | 1 | 1033 | 8 (13)| 00:00:01 |
    | 5 | NESTED LOOPS OUTER | | 1 | 809 | 7 (15)| 00:00:01 |
    |* 6 | HASH JOIN | | 1 | 585 | 6 (17)| 00:00:01 |
    | 7 | NESTED LOOPS | | | | | |
    | 8 | NESTED LOOPS | | 1 | 490 | 3 (0)| 00:00:01 |
    | 9 | TABLE ACCESS FULL | EVP_PTIP00 | 1 | 452 | 2 (0)| 00:00:01 |
    |* 10 | INDEX RANGE SCAN | EVP_PTIC00_CDROLE_IX | 1 | | 1 (0)| 00:00:01 |
    |* 11 | TABLE ACCESS BY INDEX ROWID| EVP_PTIC00 | 1 | 38 | 1 (0)| 00:00:01 |
    | 12 | TABLE ACCESS FULL | EVP_PTIF00 | 1 | 95 | 2 (0)| 00:00:01 |
    |* 13 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 14 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    |* 15 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 16 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    |* 17 | TABLE ACCESS BY INDEX ROWID | EVP_PTAB00 | 1 | 224 | 1 (0)| 00:00:01 |
    |* 18 | INDEX RANGE SCAN | EVP_PTAB00_CLTABL_IX | 1 | | 1 (0)| 00:00:01 |
    | 19 | TABLE ACCESS FULL | EVP_PRIB00 | 1 | 86 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - access("EVP_PRIB00"."NOTIER"(+)="EVP_PTIP00"."NOTIER")
    6 - access("EVP_PTIF00"."NOTIER"="EVP_PTIP00"."NOTIER")
    10 - access("EVP_PTIC00"."CDROLE"='EMP')
    11 - filter("EVP_PTIC00"."CDDDRX"='CL' AND "EVP_PTIP00"."NOTIER"="EVP_PTIC00"."NOTIER")
    13 - filter("EVP_PTAB00_SITF"."CDTABL"(+)="EVP_PTIP00"."CDSITF")
    14 - access("EVP_PTAB00_SITF"."CLTABL"(+)='SITF')
    15 - filter("EVP_PTAB00_TITR"."CDTABL"(+)="EVP_PTIP00"."CDTITR")
    16 - access("EVP_PTAB00_TITR"."CLTABL"(+)='TITR')
    17 - filter("EVP_PTAB00_RMAT"."CDTABL"(+)="EVP_PTIP00"."CDRMAT")
    18 - access("EVP_PTAB00_RMAT"."CLTABL"(+)='RMAT')

  • What to do when database hang

    Hi all,
    May I know what to do when database hangs after shutdown immediate command perform? Can I use kill process command to stop Oracle process?

    Hello,
    see documentation for details of immediate-clause:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref589
    You can do an shutdown abort instead, but then sql is terminated. You can read details here: http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/start.htm#sthref595
    Greets,
    Hannibal

  • Check Writer Hangs after 10G database upgrade

    Hi Gurus,
    Can anybody let me know how i can trace check writer concurrent process.
    It seems to hang after we upgraded the database to 10g version.
    Thanks,
    S.

    The log file shows
    /u31/oracle/fimsprodappl/pay/11.5.0/bin/PYUGEN
    Program was terminated by signal 11
    Should i do some thing with PYUGEN (rebuild/relink) after 10G database upgrade.
    We are on HP-UX 11 (PA-RISC) 64 bit.
    S

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • How to retrieve linked records effciently from the database

    Hi,
    I have some records in database related to supply chain.
    e.g. N1 supplies item I1 to Node N2 is represented as N1 I1 N2.
    Now I want to find all parent nodes or say chain of nodes supplying to particular node in an efficient way.
    Can you please tell me how I can do it with efficient query. Currently it needs multiple queries & performance drops considerably.
    Regards,
    Veena

    please check the link
    http://wiki.oracle.com/thread/1246329/findrecentmostrowsaddedinatable?t=anon
    Here you can find the new inserted data/ modified data from a table.

  • Pixelbender 2.5 always hangs after some time

    When I'm using Pixelbender 2.5, after 3 or 4 re-builds and moving the slider several times, the PixelBender just hangs (doesn't respond anymore).
    Before it hangs, everything behaves normal as expected.
    This doesn't happen with Pixelbender 2.x.
    All Pixelbender Plugins in Photoshop, After Effects or applied as Flash Shaders work fine, though. It seems to be the PixelBender 2.5 application itself.
    I don't know if this is because of the code I've written, but I can compile and restart it with 2.1 as long as I want, but on 2.5 it hangs after 3 or 4 restarts.
    I'm using:
    Win7, 64Bits, with 4GB RAM, 2.5 GHz Core Duo T9300,
    nVidia 8600M GT with 512MB RAM
    I just hope that the next release will be more stable, because I like the new features in 2.5. (like the image inputs don't get swapped like in 2.1)

    We haven’t managed to repro this problem yet – we’ve run it on a couple of different machines using 2.5 and tested it repeatedly and can’t get it to fail. So, we have some more questions:
    * What mode are you running in? GPU,CPU or Flash?
    * If GPU, do you only see this hang in GPU mode, or can you reproduce it in CPU or Flash mode?
    * If GPU, what is the date and version number of the NVIDIA GPU driver you is using? (and is it up to date – new drivers can be downloaded here http://www.nvidia.com/Download/index.aspx?lang=en-us)
    * When you hit "Build and Run" are you changing anything? (e.g. editing the filter code, changing modes, changing images etc.)
    * Can you make the images you’re using available to us?
    Thanks
    Bob

  • How to recover my database after lose some archivelogs?

    How to recover my database after lose some archivelogs?
    What should I do next?
    When I make a point-in-time recovery, I get the following message:
    Oracle Error:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01152: file 1 was not restored from a sufficiently old backup
    ORA-01110: data file 1: '/u01/app/oracle/oradata/rcatalog/system01.dbf'
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 09/25/2008 16:41:19
    RMAN-06053: unable to perform media recovery because of missing log
    RMAN-06025: no backup of log thread 1 seq 17 lowscn 798237 found to restore
    RMAN-06025: no backup of log thread 1 seq 16 lowscn 796977 found to restore
    RMAN-06025: no backup of log thread 1 seq 15 lowscn 781378 found to restore
    RMAN-06025: no backup of log thread 1 seq 14 lowscn 759019 found to restore
    RMAN-06025: no backup of log thread 1 seq 13 lowscn 709039 found to restore
    RMAN-06025: no backup of log thread 1 seq 12 lowscn 708479 found to restore
    RMAN-06025: no backup of log thread 1 seq 11 lowscn 676234 found to restore
    RMAN-06025: no backup of log thread 1 seq 10 lowscn 646686 found to restore
    RMAN-06025: no backup of log thread 1 seq 9 lowscn 645207 found to restore
    RMAN-06025: no backup of log thread 1 seq 8 lowscn 645199 found to restore
    RMAN-06025: no backup of log thread 1 seq 7 lowscn 595363 found to restore
    RMAN-06025: no backup of log thread 1 seq 6 lowscn 557197 found to restore
    RMAN-06025: no backup of log thread 1 seq 5 lowscn 519102 found to restore
    RMAN-06025: no backup of log thread 1 seq 4 lowscn 519053 found to restore
    RMAN-06025: no backup of log thread 1 seq 3 lowscn 492824 found to restore
    RMAN-06025: no backup of log thread 1 seq 2 lowscn 476888 found to restore

    Mixing thread
    yours recovery asking a lot of archivelog ,you are in the situation now like you are in no archive mode recovery..which requires last cold backup.
    What you can do is restore yours old backup with its old controlfile and then recover till before that miissing log by using recover database using backup controlfile.
    Khurram

  • Database design: add attribute to some records of the table.

    I have table T(ID, Name, Group, <some 10 columns more>), sample data:
    1, 'a', 'group1',...
    2, 'b', 'group2',...
    3, 'c', 'group1',...
    4, 'd', 'group1',...
    5, 'e', 'group3',...Column "T.Group" puts record to some kind of logical group, some records belong to "group1" some not, as you see.
    In such situations there come business need oftenly:
    "Add to group1 T-s one additional attribute/column called A".
    Where to define column A in such situations, and is there for the decision some aspects like table T size (in rows) or other aspect that can make the design solution different?
    I understand this way, that new table S(T_ID, A) should be created for this business need. The column A should not be created in table T, that would be wrong solution because some T-records doesn't need that attribute.I understand that, if table T is small in size then it is no problem creating new child-table S, but if T would be very big table then better would be to create the column A in table T.
    Can you agree/disagree with my understanding?

    CharlesRoos wrote:
    Should i then create table called "T_details" where i would but all attributes that come with new business requirements and belongs to certain T-records?
    Or do you suggest to add the columns only and only always to table T even if some T-records doesn't need the new attribute?If every master records(rows) will have only one child records(it means one to one relationship) then only add new column else if there will one to many relation ship then create new table(child)

  • USING WEBUTIL TO READ TEXT FILE INTO TABLE HANGS AFTER CERTAIN NUMBER OF RE

    Dear
    when we use webutil to retrieve data from text file into database table
    (using text_io) it hangs after certain number of records ( approx. 1300
    records) while the total number of records to be inserted in the table exceeds
    12000 records while it works properly on forms6i with the normal text_io any
    help please...?
    thanks and regards

    WebUtil uploads the files as Binary - so yes you could have some issues if you have a Unix host - however, that would only mean that there is an extra character to trim off of the end of the line read by Text_io.

  • About populating a non-database item in a multi-records block

    Hi, all
    I have a problem about populating a non-database item in a
    multi-records block. This block is set to database block with a
    controlled item which needs to be populated after query. so I
    create a post-query trigger, but my problem is when the records
    listed in this block are less than 10 ( the record number is set
    to 10), the trigger fires no problem. but when the retrieved
    records are greater than 10, the error message is 'post query
    trigger raised unhandled exception ora 01403'. anyone can help me
    fix this problem?
    Thanks in advance
    Diana

    Diana,
    When you have an unbound item in a block and want to fetch
    some data into it you need to write a post-query trigger.What
    you have done is right.But it seems that u are getting a No data
    found error.I am sure about how u r populating data into that
    field.If u have written a select statement to fetch the data in
    post-query trigger, kindly handle an exception and find out the
    problem.Having a look at ur code(pos-query) would be much more
    helpful for giving a better solution.Try this a let me know.
    Thanks
    Vinod.

  • ADF application hangs after  $$added root$$ message in the logs

    Hi ADF Gurus,
    We have an ADF application which freezes after we create a row in a particular VO,
    When debugged in Jdev, the application seems to hang when either of the below log messages appear. Does anybody know what these messages mean? Just hoping for some hint as to where the problem might lie. The table where the new row is added has about 150,000 records in it
    Log messages:
    <PCollNode> <checkForSplit> [50545] $$added root$$ id=-2
    <PCollNode> <checkForSplit> [50546] $$added root$$ id=-73
    <PCollNode> <checkForSplit> [50636] $$added root$$ id=-2559
    Environment details:
    Jdev: 11.1.1.5.0
    Database:11g
    Thanks
    -Venkat

    duplicate post: ADF application hangs after  $$added root$$ message in the logs

  • Retrieve All records and display in Report using CAML query in Report Builder if Parameter value is blank

    Hello Experts,
    i have created a report where i have one parameter field where user will pass parameter(e.g. EmpId). As per parameter record will fetched to report if no parameter is passed then it will display all records. I have done it by taking SqlServer Database as datasource.
    by using Following method
    Now i would like to do it by taking Sharepoint List as Datasource. For that what would be the CAML Query.
    Here is my existing CAML query.
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>Employees</ListName>
      <ViewFields>
        <FieldRef Name="Title" />
        <FieldRef Name="FirstName" />
        <FieldRef Name="LastName" />
        <FieldRef Name="FullName" />
        <FieldRef Name="UserName" />
        <FieldRef Name="Company" />
      </ViewFields>
      <Query>
        <Where>  
    <Eq> 
        <FieldRef Name="Title" />
      <Value Type="Text">    
       <Parameter Name="EmployeeId"/>    
    </Value>
    </Eq>                  
        </Where>
      </Query>
    </RSSharePointList>
    The above code is working if i am passing an employeeId to Parameter. If nothing is passed, it is Not retrieving any record.
    Please suggest
    Thank you
    saroj
    saroj

    Your problem follows the well-established pattern of using an "All" parameter filter in SSRS. There are a few approaches depending on the size of your data. The easiest one is to return all data from CAML and then filter it within SSRS, the following thread
    provides some examples,
    http://stackoverflow.com/questions/18203317/show-all-records-some-records-based-on-parameter-value.
    Other options include passing all of the possible values within the CAML query when "All" is selected, using multiple Report Files to distinguish between both CAML queries, or to use multiple datasets with some logic to show/hide the correct one.
    Dimitri Ayrapetov (MCSE: SharePoint)

Maybe you are looking for

  • Itunes 10.4 - Smartlist & interlacing critierias

    Hi, I miss the 3rd button (the one with dots :-) in the smartlist window for interlacing the different criterias after installing Lion and iTunes 10.4???? I installed iTunes 10.4 64-bit on a pc with windows 7 and it doesn't creates the same bug(?). H

  • Can I use Facetime on my i-touch 4 while in China?

    I will be traveling to Shanghai in a week and I want to use facetime with my daughter.  We both have the newest generation I touch.  I know China has some restrictions on internet, so I wanted to find out if this affected my i-touch.

  • How do i un authorise

    Hi.. How do i unauthorise a computer (3) that are no longer in use i.e i have formatted my harddrive 4 times now and itunes says i am using 4 out of 5 of my licenses or whatever but i only have computer now (single boot) help plz

  • VOD in VO instead of french

    Guess what ? I'm kind of lazy...I hate to watch movies in any foreign language before I see them in French...I've just rent a movie on Apple TV which was supposed to be in French, and it's not ! No line saying it was to be in English...Is there any w

  • Flash player 14 on Mac

    I can't install flash player 14 on my mac. It gets to 95% then stalls. Ive tried to uninstall, delete from eveywhere, emptied the trash...everything but it wont make a difference? Any one got any ideas?F