Ranking in a funny way

Date     Category     Rank by Date     Rank by Category     RANKING
01/01/2010     A     1          1          1
05/02/2010     A     2          2          1
18/02/2010     A     3          3          1
30/06/2010     A     4          4          1
12/07/2010     B     5          1          2
20/07/2010     B     6          2          2
29/08/2010     B     7          3          2
31/08/2010     B     8          4          2
02/09/2010     B     9          5          2
30/11/2010     A     10          5          3
02/12/2010     A     11          6          3
04/12/2010     C     12          1          4
06/12/2010     C     13          2          4
By using the ranking function, I can obtain the ranking by date and category easily (with the use of partition). However, I have problem in getting the output for the last column (RANKING). Can somebody find a solution for this?

May be this
with t
as
select to_date('01/01/2010','dd/mm/rrrr') dt, 'A' category from dual union all
select to_date('05/02/2010','dd/mm/rrrr'), 'A' from dual union all
select to_date('18/02/2010','dd/mm/rrrr'), 'A' from dual union all
select to_date('30/06/2010','dd/mm/rrrr'), 'A' from dual union all
select to_date('12/07/2010','dd/mm/rrrr'), 'B' from dual union all
select to_date('20/07/2010','dd/mm/rrrr'), 'B' from dual union all
select to_date('29/08/2010','dd/mm/rrrr'), 'B' from dual union all
select to_date('31/08/2010','dd/mm/rrrr'), 'B' from dual union all
select to_date('02/09/2010','dd/mm/rrrr'), 'B' from dual union all
select to_date('30/11/2010','dd/mm/rrrr'), 'A' from dual union all
select to_date('02/12/2010','dd/mm/rrrr'), 'A' from dual union all
select to_date('04/12/2010','dd/mm/rrrr'), 'C' from dual union all
select to_date('06/12/2010','dd/mm/rrrr'), 'C' from dual
temp as
select dt, category, last_value(x ignore nulls) over (order by dt) x
  from (
         select dt, category, decode(lag(category) over(order by dt), category, null, rownum) x
           from t
select temp.dt, temp.category, temp1.rno
  from temp,
       (select x, rownum rno
          from (select distinct x
                  from temp
                 order by to_number(x))) temp1
where temp.x = temp1.x
order by 1
             

Similar Messages

  • Prob in using rank in pl/sql ,need logic same of rank function in any way

    I have a query as of the following <br>
    <br>
    SELECT sr_no,cod_acct_no,dat_arrears_due,amt_arrear_due<br>
    FROM ( select cod_acct_no,dat_arrears_due,sum(amt_arrears_due) <br>amt_arrear_due,rank() over (partition by cod_acct_no order by <br>dat_arrears_due asc) sr_no<br>
              from arrears_table <br>
              where amt_arrears_due > 0<br>
    and dat_arrears_due <= to_date('31/10/2006','dd/mm/yyyy')<br>
    and COD_ARREAR_TYPE = 'C'<br>
         group by cod_acct_no,dat_arrears_due<br>
         ) Z <br>
    WHERE z.sr_no <=5 <br>
    <br>
    I have to use this in a cursor in pl/sql but because i have rank analytic function <br>
    I am facing a compilation error ORA-06550: error <br>
    <br>
    Can you give me a logic which gives same output as of above <br>
    <br>
    Regards<br>
    vamsi krishna<br>
    <br>
    <br>

    [1]: (Error): ORA-06550: line 5, column 28: PLS-00103: Encountered the <br>symbol "(" when expecting one of the following: , from <br>
    <br>
    My oracle version is <br>
    Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production<br>
    PL/SQL Release 8.1.6.0.0 - Production<br>
    CORE 8.1.6.0.0 Production<br>
    TNS for 32-bit Windows: Version 8.1.6.0.0 - Production<br>
    NLSRTL Version 3.4.1.0.0 - Production<br>
    <br>I think it is comming for rank function it self <br>
    <br> will this version support analytic (rank) function's in pl/sql cursors<br>
    Regards<br>
    vamsi krishna<br>

  • T60 clock running in a funny way

    My computers clock is not keeping track of time. It is moving but not necessarily forward or in the right paste. Automatic update is not working at all and manual time adjustment is constantly required. I all ready tried to replace BIOS battery. Any ideas?

    Hi,
    If you run Linux OS on dual boot on your T60,even on a separate drive ,it happens each time you switch OS ,as Linux and Windows dont use the same way to calculate time and send differrent informations to Bios...
    Best regards
    Eric

  • My mack turns off unexpectedly, after 20 time rebooting then turned on, but has horizontal strip line and works in a funny way? can you please help

    Dear All,
    I have a MacBook Pro, just today started to play up and turned off by it self.  I tryied to boot it and restared but the screen was black. 
    Then I spend hours turend off and restart it.   Now it is on saft mode?  and has horizontel strip lin.   Can you help please? 
    David

    Obvioulsy some hardware is failing. Hard drive possibly, graphics card, CPU???
    You could try running the AHT http://support.apple.com/kb/ht1509
    or get support
    Genius reservation http://www.apple.com/retail/geniusbar/
    check warranty https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • Is rank() really better than rownum for top-n-queries?

    Several sources say that for Oracle databases rank() should be used instead of 'rownum <= n' for top-n-queries. But here we have an application, where we a lot of top-n queries are executed on a big table with several million rows and rank() has a quite bad performance. I get much better results when I use a query with rownum <= n but the programmer of the application doesn't want to change it in the software because of those articles about rank() and rownum. I wonder, whether it is possible, to find a better form of the rank()-query or an additional index, that gives me the same performance.
    To explain my case I created the following example (if you try it, be aware that depending on the size of your dba_objects view you might need up to half a gig free space in your tablespace for this example).
    create table big_objects
    as
    select
    ascii(m.alpha)*100000+o.object_id object_id,
    o.owner owner,
    o.object_type,
    m.alpha||'_'||o.object_name object_name,
    sysdate-400+mod(100*object_id+99*ascii(m.alpha),365)+24/(o.object_id+ascii(m.alpha)) created,
    o.status
    from
    (select distinct
    upper(substr(object_name,1,1)) alpha
    from
    sys.dba_objects
    where
    upper(substr(object_name,1,1)) between 'A' and 'Z') m,
    sys.dba_objects o
    order by
    object_name;
    create index bigindex_1 on big_objects (owner, object_type, created);
    analyze table big_objects compute statistics;
    So my table looks a bit like dba_objects but with much more rows and I made a synthetic "created" date which is more similar to my real case, where top-n means a date selection of the newest records from a certain type.
    Here is the size of the segments on an nearly empty 11gR2 database:
    select segment_name, bytes, blocks from sys.dba_segments where segment_name like 'BIG%'
    SEGMENT_NAME BYTES BLOCKS
    BIGINDEX_1 75497472 9216
    BIG_OBJECTS 142606336 17408
    On my database the example table has approx. 1,9 Mio rows:
    select count(*) from big_objects;
    COUNT(*)
    1884246
    and some 1,4% of those rows have owner = 'SYS' and object_type = 'INDEX'
    select
    count(*)
    from big_objects
    where owner = 'SYS'
    and object_type = 'INDEX';
    COUNT(*)
    25896
    But I want to find only the 10 newest indexes for the owner SYS. I think the typical rank() approach would be:
    select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created
    from
    ( select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created,
    rank() over (order by created desc) rnk
    from
    big_objects
    where
    owner = 'SYS'
    and object_type = 'INDEX')
    where rnk <= 10
    order by created asc;
    OWNER OBJECT_TYPE OBJECT_NAME OBJECT_ID STATUS CREATED
    SYS INDEX B_COLLELEMIND 6600515 VALID 15.04.2010 19:05:55
    SYS INDEX V_I_WRI$_OPTSTAT_IND_OBJ#_ST 8600466 VALID 15.04.2010 19:09:03
    SYS INDEX G_I_RLS 7100375 VALID 15.04.2010 19:23:55
    SYS INDEX V_I_DIR$SERVICE_UI 8600320 VALID 15.04.2010 19:31:33
    SYS INDEX L_I_TSM_DST2$ 7600308 VALID 15.04.2010 19:36:26
    SYS INDEX L_I_IDL_UB11 7600235 VALID 15.04.2010 19:57:34
    SYS INDEX V_I_VIEWTRCOL1 8600174 VALID 15.04.2010 20:19:21
    SYS INDEX L_I_TRIGGER2 7600162 VALID 15.04.2010 20:31:39
    SYS INDEX L_I_NTAB1 7600089 VALID 15.04.2010 21:35:53
    SYS INDEX B_I_SYN1 6600077 VALID 15.04.2010 22:08:07
    10 rows selected.
    Elapsed: 00:00:00.22
    Execution Plan
    Plan hash value: 2911012437
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1427 | 188K| 1400 (1)| 00:00:17 |
    | 1 | SORT ORDER BY | | 1427 | 188K| 1400 (1)| 00:00:17 |
    |* 2 | VIEW | | 1427 | 188K| 1399 (1)| 00:00:17 |
    |* 3 | WINDOW SORT PUSHED RANK | | 1427 | 79912 | 1399 (1)| 00:00:17 |
    | 4 | TABLE ACCESS BY INDEX ROWID| BIG_OBJECTS | 1427 | 79912 | 1398 (0)| 00:00:17 |
    |* 5 | INDEX RANGE SCAN | BIGINDEX_1 | 1427 | | 9 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    2 - filter("RNK"<=10)
    3 - filter(RANK() OVER ( ORDER BY INTERNAL_FUNCTION("CREATED") DESC )<=10)
    5 - access("OWNER"='SYS' AND "OBJECT_TYPE"='INDEX')
    Statistics
    1 recursive calls
    0 db block gets
    25870 consistent gets
    0 physical reads
    0 redo size
    1281 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    2 sorts (memory)
    0 sorts (disk)
    10 rows processed
    As from the index only the first two columns are used, all the 25896 records that I found above are read and sorted just to find the ten newest ones. Many unnecessary blocks are read and luckily all needed database blocks were in memory already. In our real case quite often a lot of physical reads are performed, which makes the performance of the application even worse.
    In my following example with a "rownum <= 10" all three columns of the index are used and the number of block gets is much, much smaller than in the rank() example.
    select
    owner,
    object_type,
    object_name,
    object_id,
    status,
    created
    from
    big_objects
    where
    (owner, object_type, created)
    in
    ( select
    owner,
    object_type,
    created
    from
    ( select /*+ first_rows(10) */
    owner,
    object_type,
    created
    from
    big_objects
    where
    owner = 'SYS'
    and object_type = 'INDEX'
    order by
    owner,
    object_type,
    created desc
    where rownum <= 10
    order by created asc;
    OWNER OBJECT_TYPE OBJECT_NAME OBJECT_ID STATUS CREATED
    SYS INDEX B_COLLELEMIND 6600515 VALID 15.04.2010 19:05:55
    SYS INDEX V_I_WRI$_OPTSTAT_IND_OBJ#_ST 8600466 VALID 15.04.2010 19:09:03
    SYS INDEX G_I_RLS 7100375 VALID 15.04.2010 19:23:55
    SYS INDEX V_I_DIR$SERVICE_UI 8600320 VALID 15.04.2010 19:31:33
    SYS INDEX L_I_TSM_DST2$ 7600308 VALID 15.04.2010 19:36:26
    SYS INDEX L_I_IDL_UB11 7600235 VALID 15.04.2010 19:57:34
    SYS INDEX V_I_VIEWTRCOL1 8600174 VALID 15.04.2010 20:19:21
    SYS INDEX L_I_TRIGGER2 7600162 VALID 15.04.2010 20:31:39
    SYS INDEX L_I_NTAB1 7600089 VALID 15.04.2010 21:35:53
    SYS INDEX B_I_SYN1 6600077 VALID 15.04.2010 22:08:07
    10 rows selected.
    Elapsed: 00:00:00.03
    Execution Plan
    Plan hash value: 3360237620
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 10 | 760 | 17 (0)| 00:00:01 |
    | 1 | SORT ORDER BY | | 10 | 760 | 17 (0)| 00:00:01 |
    | 2 | NESTED LOOPS | | | | | |
    | 3 | NESTED LOOPS | | 10 | 760 | 17 (0)| 00:00:01 |
    | 4 | VIEW | VW_NSO_1 | 10 | 200 | 2 (50)| 00:00:01 |
    | 5 | HASH UNIQUE | | 10 | 200 | 4 (25)| 00:00:01 |
    |* 6 | COUNT STOPKEY | | | | | |
    | 7 | VIEW | | 11 | 220 | 3 (0)| 00:00:01 |
    |* 8 | INDEX RANGE SCAN DESCENDING| BIGINDEX_1 | 1427 | 28540 | 3 (0)| 00:00:01 |
    |* 9 | INDEX RANGE SCAN | BIGINDEX_1 | 3 | | 2 (0)| 00:00:01 |
    | 10 | TABLE ACCESS BY INDEX ROWID | BIG_OBJECTS | 3 | 168 | 6 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    6 - filter(ROWNUM<=10)
    8 - access("OWNER"='SYS' AND "OBJECT_TYPE"='INDEX')
    9 - access("OWNER"="OWNER" AND "OBJECT_TYPE"="OBJECT_TYPE" AND "CREATED"="CREATED")
    Statistics
    1 recursive calls
    0 db block gets
    26 consistent gets
    0 physical reads
    0 redo size
    1281 bytes sent via SQL*Net to client
    524 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    1 sorts (memory)
    0 sorts (disk)
    10 rows processed
    I made this comparison with the Oracle versions 10.2 and 11.2 and the result was more or less the same. How can I change the rank() query in a way that only the small number of really needed blocks are read from the database?

    this was exactly the hint, I was looking for. Generally speaking hints are not the preferred way to go to tune queries. They can have nasty side-effects when data changes.
    Now the rank()-query is similar fast and much better to read than my fast one with three nested SELECTs.
    Your rownum query was needlessly complicated, and could be simplified to:
    select owner, object_type, object_name, object_id, status, created
    from (select owner, object_type, created
          from big_objects
          where owner = 'SYS' and
                object_type = 'INDEX'
          order by created desc)
    where rownum <= 10
    order by created ascand very likely get the same speed.
    One more question. How did you format those sql queries and results. When I copy/paste them into the editor of forums.oracle.com the format allways gets lost.To preserve formatting use {noformat}{noformat} before and after the section you want ot keep formatted.  In general, if you want to see how someone generated an effect, reply to the post and hit the quote original icon.  You will see all the formatting codes used in the original.
    John                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • A funny problem ..?

    hi every1,
    I am trying to create a ADT binary tree. The insert method works in funny way. If i try to add new items by let is say: bst.inesert("a"); .... ("x"); it works fine. Even if i keep a for and next loop and populate it it is okay and searches the item fine too. But the problem is that i have to read data from a file and pupulate the tree. it populates the tree also but when i try to search for the item. it returns null. Where can something go wrong? i search for an item as follow:
         String temp1=new String("as"); //THIS IS IN MY FILE AND READS IT FINE TOO
              if (bst.findNode(temp1)!= null)
                   System.out.println("Found " +bst.findNode(temp1).getItem().toString());
              else
                   System.out.println("Item " + temp1 + " is not found.");
              System.out.println("Size " + bst.size(bst.root)); //THIS ONE WORKS FINE
    my insert method is:
         public void treeInsert(Object newItem) {
    TreeNode thisNode = root;
         boolean exitWhile = false;
    if ( thisNode == null )
    // The tree is empty. Set root to point to a new node
    // containing the new item.
    root = new TreeNode( newItem);
    else
                   while (!exitWhile){
                        if (comparator.compare(thisNode.getItem(), newItem) < 0)
                             if (thisNode.getLeft() != null)
                                  thisNode = thisNode.getLeft();
                             else{
                                  exitWhile = true;
                                  thisNode.setLeft(new TreeNode(newItem));
                        else
                             if (thisNode.getRight() != null)
                                  thisNode = thisNode.getRight();
                             else{
                                  exitWhile = true;
                                  thisNode.setRight(new TreeNode(newItem));
    }

    You had a problem with your search method but you seem to have accidentally posted the code of your insert method instead.

  • Edited or ranked photos - how does LR3 store the files?

    Hello - I am using iPhoto as my photo presentation repository. Once I edit photos in Lr3, I want to be able to simply drag them or import them into a new even in iPhoto. How do I do this? I am not sure that LR3 categorizes the edited photos (or higher ranked) in any different way. Thats why if I could simply drag and drop from the LR interface into the iPhoto new event, I'd be in better shape. But, that doesnt work. Any suggestions?
    Thanks

    I think in Lightroom you need to do a File->Export and then place the exported file into your iPhoto repository.
    I think in the long run, you would be better off using Lightroom to manage and edit your files and create slideshows, as this is how it was designed to be used, as this is the most efficient way to use Lightroom; instead of Lightroom as an editor and iPhoto for photo management or slideshows.

  • Some questions about quality of displayed video, matching scaled object, and a funny issue occurs in my VI

    Hi, 
    I am doing a pattern recognition project and come up with a VI (please find attached). There are something I am not sure and would like to ask:
    1. The VI works, but in a funny way: most of the time I have to switch the "Create Template/Search for pattern" button twice in order to get the VI works fine (there were only a few times I just need to click the button once). What is the problem here and how to fix it?
    2. I understand that IMAQ Match Pattern works with RGB images. So is there anyway I still can get RGB images pass through IMAQ Learn Pattern, IMAQ Match Pattern, whilst the 2 "Template" and resulting "Image" are still displayed in color mode.
    3. Is there anyway I can still detect the object if scaling becomes an issue (as I need to move from far distance to approach the object)? To address this issue, do I need to use IMAQ Match Geometric Pattern, which I learn from somewhere in the forum that it took a lot more time to match my result comparing with IMAQ Match Pattern?
    Thanks very much.
    Solved!
    Go to Solution.
    Attachments:
    pattern_recog.vi ‏128 KB

    Sorry about silly question 2 (RGB <--> color). Actually, in my VI all the IMAQ Extract, IMAQ Pattern Match, etc.. can only work with Grayscale (U8) images. Whenever I switch the images to RGB (U32) there will be errors of Incompatible image type (error-1074396077). As I understand, IMAQ Extract and IMAQ Pattern Match should be able to work with RGB (U32) images. Am I right?
    Attachments:
    pattern_recog_test1.vi ‏128 KB

  • Equilateral triangle Java Graphics - problem

    Hello There,
    I've tried to depict a class which draws equilateral triangles
    The triangle will be drawn, provided if we pass to it the x,y coordinates and the length of the side(which is similar since they are equilateral) i.e. g.fillPolygon(e.getPolygonXPoints(), e.getPolygonYPoints(), 3);Currently I have a problem in the way the triangle is drawn - though it is equilateral but it'd drawn in a funny way ( the base's two points have different X coordinates)
    I'm not sure How can I fix that - please help
    Below is my code
    package shapes.noninheritance.triangle;
    * Created by IntelliJ IDEA.
    * User: kblau
    * Date: 15-Feb-2009
    * Time: 19:02:09
    * To change this template use File | Settings | File Templates.
    public class EqTriangle {
        private int side;
        private int x;
        private int y;
        private int[] polygonXPoints;
        private int[] polygonYPoints;
        public EqTriangle(int x, int y,int side) {
            this.side = side;
            this.x = x;
            this.y = y;
            double angle = 0;
            double r = (side / 2.0) / Math.sin(Math.PI * 60. / 180.);
            this.polygonXPoints = new int[3];
            this.polygonYPoints = new int[3];
            for (int i = 0; i < 3; i++) {
                this.polygonXPoints[i] = (int)(x + r * Math.cos(angle + i * 2. * Math.PI / 3.));
                this.polygonYPoints[i] = (int)(y + r * Math.sin(angle + i * 2. * Math.PI / 3.));
        public int getSide() {
            return side;
        public void setSide(int side) {
            this.side = side;
        public int getX() {
            return x;
        public void setX(int x) {
            this.x = x;
        public int getY() {
            return y;
        public void setY(int y) {
            this.y = y;
        public int[] getPolygonXPoints() {
            return polygonXPoints;
        public void setPolygonXPoints(int[] polygonXPoints) {
            this.polygonXPoints = polygonXPoints;
        public int[] getPolygonYPoints() {
            return polygonYPoints;
        public void setPolygonYPoints(int[] polygonYPoints) {
            this.polygonYPoints = polygonYPoints;
        public double calculatePerimeter()
            return 3*this.side;
        public double calculateArea()
            return (Math.sqrt(3)/4)*(this.side* this.side);
    }

    Hi, could you perhaps post an SSCCE of your problem?

  • Authentication freezing occasionally in OD

    We're having problems with our two Xserve G4s which are both running OS X Tiger Server 10.4.6. Call the first server "filesrvr" and the other "mailsrvr" (which in addition to mail also provides web and file sharing services). Both are running behind a firewall with mailsrvr on a DMZ visible to the Internet. The filesrvr is the DNS and OD Master, and the mailsrvr a DNS slave and OD replica. The mailsrvr is operating in a beta capacity at the moment while we address these problems.
    As far as I can tell, the DNS and basic aspects of OD are working correctly: both systems have proper forward and reverse local DNS names, and the hostname is being set correctly on both systems. We had problems with a prior incarnation of the servers because DNS and OD were set up in a funny way and in the wrong order: this led to all sorts of lookupd-related crashes, but the servers have been wiped clean since and carefully rebuilt from scratch. We haven't seen anything that looks like the prior problem and both servers are much more stable now.
    That being said, there still appear to be two problems, both on the mail server side. Any suggestions would help:
    1) Every few days, OD-related authentication freezes up for a period of time. Sometimes it will come back on its own within fifteen or twenty minutes, at other times we must do a hard restart to reset the problem. The affected services are: Tiger Server Admin (port 311), SMTP, POP3, IMAP, SSH, AFP, SMB, and FTP. Console logins are also rejected during these periods. I'll supply details for what I think is happening here with log listings.
    2) Several times a day (say two to three times a day), the Tiger Server Admin (servermgrd on port 311) becomes non-responsive. It doesn't matter whether you run the Server Admin client application locally on the Tiger Server, or via another machine. It also doesn't seem to matter if you have an active session already running or not. It just seems to cut in and out on its own. The good news is that usually within ten minutes it always comes back up on its own. I don't find anything in the logs related to servermgrd during these outages. I also don't see anything 'funny' about the instance of servermgrd running at the time.
    I'm not sure if these two problems are related. The authentication issue seems more serious since it affects the availability of mail service to our users which needs to be up and running at all times.
    I'll supply details below, but the bottom line is that I suspect memberd and/or lookupd (or something they both depend on -- like the NetInfo database) is not working quite right. I've been reading up on postings related to these two daemons and wonder what would be an appropriate course of attack.
    In <http://discussions.apple.com/thread.jspa?threadID=492829>, one recommendation is to run "/sbin/fsck -y" in safe mode looking for any problems, and then to manually rebuild the NetInfo database. Obviously memberd and lookupd depend on their caches and the databases they make use of to be in working order. The suggestion is to check for file system issues and rebuilt the NetInfo database.
    In <http://discussions.apple.com/thread.jspa?threadID=132009> the recommended course of action is to flush the memberd cache using "sudo memberd -r" from time to time (elsewhere it is suggested to do this once an hour via a crontab entry, and also to issue a "/usr/sbin/lookupd -flushcache"). The idea here is to make sure the caches are kept fairly fresh.
    I'm a bit torn about how to attack this problem -- it seems a no-brainer to:
    1) Run Disk Utility "Verify Disk" and "Verify Permissions" checks on filesrvr and mailsrvr.
    2) Run "/sbin/fsck -y" on filesrvr and mailsrvr until no problems are reported.
    3) Insert the following line into the root user's crontab to clear out the memberd and lookupd caches once an hour:
    @hourly /usr/sbin/memberd -r; /usr/sbin/lookupd -flushcache
    I'm a little hesitant to rebuild the NetInfo database right now. There's a number of special accounts defined there that will simply be a pain to rebuild. My thinking is that I'll make the three changes above and stop just short of rebuilding NetInfo. If authentication fails again on mailsrvr in a similar way then I'll run the Disk Utility and fsck fixes again but also go one step further and rebuild NetInfo.
    Does anyone have thoughts for other things to try?
    <details>
    We've seen the first type of failure (authentication stops working) four times in the past two weeks, and it's happened in a number of different ways. Here are some of the details, with log snippets (the only interesting activity is in /var/log/system.log):
    The first time authentication stopped working was on June 6th at about 3:15am. I happened to be awake at the time working on something else -- checking for mail periodically but otherwise not logged onto mailsrvr. We use InterMapper to probe all of the server ports and make login checks, and I received a flurry of failures (on the ports listed above). The system had been running without incident for about 36 hours since the last reboot, with only a few mail users accessing the system plus InterMapper's probes every two minutes or so, and not much else going on. In the logs (below), it's clear that the original memberd daemon (process 55) exited abnormally. Launchd created a new instance of memberd (process 23431) which stayed up about eleven minutes before it also crashed. Launchd fired up one more instance of memberd (process 23901), which then stayed up for several days until we took it down for a backup. It was when this final instance of memberd came up that authentication started working again. I also verified that I could not log in via SSH while authentication services were down.
    Here's a log snippet (I've omitted log entries which are clearly part of normal operations -- like Cyrus's checkpointing of the mail database every thirty minutes and InterMapper's probes):
    Jun 6 03:13:44 mailsrvr memberd[55]: Fatal error -1 submitting to kernel (1: Operation not permitted)\n
    Jun 6 03:13:44 mailsrvr memberd[23431]: memberd starting up
    Jun 6 03:15:18 mailsrvr sshd[23399]: fatal: Timeout before authentication for <<my IP address>>
    Jun 6 03:24:34 mailsrvr memberd[23431]: Fatal error -1 submitting to kernel (1: Operation not permitted)\n
    Jun 6 03:24:34 mailsrvr launchd: Server 0 in bootstrap 1103 uid 0: "/usr/sbin/memberd -x"[23431]: exited with status: 1
    Jun 6 03:24:34 mailsrvr memberd[23901]: memberd starting up
    On June 12th, we suffered a similar failure. All of the authentication-based services listed above suddenly stopped responding. At the time, I had an open SSH connection running on root@mailsrvr, looking into unrelated issues, so while authentication was down I probed around a bit. I noticed right off that there was nothing funny in the logs as before -- no smoking gun indicating the memberd daemon. In fact, there was nothing in the logs to indicate that there was any problem at all!
    However, I noticed from my bash session that if I did an "ls", the shell would list files without problem, but if I did an "ls -l", the command would hang until I issued a CTRL+C. I surmised that the reverse lookup of the user ID or group ID wasn't working correctly, either because memberd or lookupd or something deep in the system related to user or group names wasn't running right. Since this hangup occurred during business hours, it was necessary to restart the server to get it back online ASAP, so unfortunately I couldn't spend more time investigating the state of the system.
    The next glitch occurred on June 14th. Once again, all of the authentication-based services when down. The only spurious entry in our logs was related to servermgrd (which provides service on the Tiger Server port 311). I don't think this daemon was the cause of the problem, but an indicator that something else was going on at the time. At the time of the failure (about 16:02), we were receiving FTP probes from mainland China (a host at 219.136.191.93) at intervals of 75 seconds or so to keep under the radar. I also don't think this was the cause of the problem. By 16:10 the problem had cleared itself up without my interaction or the need to restart the server.
    Jun 14 16:01:39 mailsrvr ftpd[14832]: FTP LOGIN REFUSED (PASS before USER) FROM 219.136.191.93 [219.136.191.93]
    Jun 14 16:05:11 mailsrvr servermgrd: [41] error in getAndLockContext: flock(servermgr_netboot) FATAL time out
    Jun 14 16:05:11 mailsrvr servermgrd: [41] process will force-quit to avoid deadlock
    Jun 14 16:05:11 mailsrvr launchd: com.apple.servermgrd: exited with exit code: 1
    Jun 14 16:05:11 mailsrvr launchd: com.apple.servermgrd: 9 more failures without living at least 60 seconds will cause job removal
    Jun 14 16:05:21 mailsrvr servermgrd: servermgr_dns: hostname and DNS entries for this server are synchronized
    Jun 14 16:09:26 mailsrvr ftpd[15037]: FTP LOGIN REFUSED (PASS before USER) FROM 219.136.191.93 [219.136.191.93]
    Jun 14 16:09:27 mailsrvr servermgrd: TIME-CHECK: NSLXStandardRegisterService took 255.824166 seconds!\n
    The next day (June 15th), we saw a similar outage which lasted a bit less than fifteen minutes. Our friends in China had been probing our FTP port for several hours before this occurred:
    Jun 15 12:48:28 mailsrvr ftpd[10559]: FTP LOGIN REFUSED (PASS before USER) FROM 219.136.191.93 [219.136.191.93]
    Jun 15 12:49:30 mailsrvr servermgrd: [15310] error in getAndLockContext: flock(servermgr_netboot) FATAL time out
    Jun 15 12:49:30 mailsrvr servermgrd: [15310] process will force-quit to avoid deadlock
    Jun 15 12:49:30 mailsrvr launchd: com.apple.servermgrd: exited with exit code: 1
    Jun 15 12:49:30 mailsrvr launchd: com.apple.servermgrd: 9 more failures without living at least 60 seconds will cause job removal
    Jun 15 12:49:36 mailsrvr servermgrd: servermgr_dns: hostname and DNS entries for this server are synchronized
    Jun 15 12:49:44 mailsrvr ftpd[10600]: FTP LOGIN REFUSED (PASS before USER) FROM 219.136.191.93 [219.136.191.93]
    Jun 15 12:50:53 mailsrvr ftpd[10635]: FTP LOGIN REFUSED (PASS before USER) FROM 219.136.191.93 [219.136.191.93]
    Jun 15 12:55:31 mailsrvr servermgrd: [11272] error in getAndLockContext: flock(servermgr_dhcp) FATAL time out
    Jun 15 12:55:31 mailsrvr servermgrd: [11272] process will force-quit to avoid deadlock
    Jun 15 12:55:44 mailsrvr launchd: com.apple.servermgrd: exited with exit code: 1
    Jun 15 12:55:44 mailsrvr launchd: com.apple.servermgrd: 9 more failures without living at least 60 seconds will cause job removal
    Jun 15 12:56:03 mailsrvr sshd[11398]: fatal: Timeout before authentication for <<my IP address>>
    Since June 15th we've been running without incident, I'm happy to report. It's possible that the failures have been related to periods in which a number of changes have been made to the LDAP and NetInfo databases via Workgroup Manager. I'm going to keep a log from now on to see if there's a correlation there. Since June 15th, we've made only minimal changes.
    </details>
    1.42GHz Mac Mini   Mac OS X (10.4.6)   1GB RAM, SuperDrive, Airport

    Ah, forgot to add that I'm running version 1.1, if that makes a difference. Sounds like it's been causing trouble...

  • I want to change my Apple ID email but it won't let me.

    The original email I put as my Apple ID has been deavtivaed because I haven't used it in a while, so I want to change my Apple ID email to my current email. However, when I go online to change it, it tells me "this email address is already verified for another Apple ID". I don't recall making an Apple ID on this new email, but I'm guessing I created without realizing it. Is there any way I can delete the Apple ID on my new email and then change it? Or can I merge the two IDs?

    Ok I'm goin to call your old Apple ID #1 your new email you want to use #2 and another email #3.
    - go to http://appleid.apple.com
    - select manage your apple id
    - sign into #2
    - edit primary email and change it to #3
    - save changes and sign out
    Now
    - sign into #1
    - edit primary
    - change it to the email that was used for #2
    - save changes
    - check #2's email inbox for verification email
    - verify account
    If done correctly you should be fine, also in terms of #3 that would be an email you have that you dont mind being an apple id that you wont use. Sorry for the funny way of explaining just thought it would be shorter to type out lol.
    Note: Once changes have been made you must sign out of features such as iCloud, iMessage, FaceTime, iTunes & App Store as they will still display the old Apple ID. Sign in with new email but same password as normal.

  • Moving mail to folders - is it possible to type the name of the folder, vs scrolling?

    Apologies in advance if there is already an answer to this question in the forums; I searched with every combination of the subject I could think of...
    Context: my iPhone 4 syncs with an IMAP mail server.  I have lots of folders on the server, and I can see all of them on the iPhone.  I know how to use the "file" button at the bottom of an email, to move the message to a folder.
    Question: is there a way to "open" the keyboard during the filing process, so that I can type the name of the folder, rather than scrolling through the folders?
    Thanks for your help.

    It also works  with google mail.
    For someone looking for help you sure have a funny way about you. Trying to narrow down where and under what circumstances a problem occurs is called troubleshooting. Showing that mail's imap works with gmail and google should al least give you pause to reconsider your out and out assertion that the problem has to be solely with mail and perhaps lead you to look at the possibility of an issue with the interaction between mail and godaddy. Just because someone who answers the phone at godaddy says the problem has to be in mail don't make it so.
    You know were all just users here, no one is getting paid. Those of us who try and help users like yourself are doing it to give something back to the community. You don't like my help, fine don't take it but check the attitude at the door.
    Hope you get your problem fixed.

  • Ipod cannot be synced. The required file cannot be found

    Up until recently, the only thing there was wrong with my Ipod was the occasionally "100% freeze that only could be solved by draining the Ipod from battery", which it did less than three times a month. Then this sunday, when I was going to work (nightshift) I took the bus as usually, and listened to music on my Ipod for about half an hour.
    I hear music and podcasts from my ipod when I work, I connect my ipod to a jackstick and connect it to the radio of the wagon I drive around in. And then it started acting weird. The sound seemed to freeze up, but after 1 min or so, it played a fraction of a second and seemed to freeze up again. So I held down the toggle button and menu button, which did restart it as it should.
    I chose the same podcast and it started playing as if nothing were wrong. But then it did the same thing, and on the display where the name etc. of the item I was playing were supposed to slide from one side of the ipod to the other, was moving a bit and then coming to a complete stop, and then it would move a bit again.
    So I drained it from battery, and recharged it, when I got home from work. When I woke up I tried to play the same podcast, without listening to it, though, it did play, but the timer moved awkwardly, the seconds moved in a funny way.
    Then I tried using the restore function, in Itunes, thinking it would perhaps erase some bad software and installing it all over. But now When I try to synchronize the ipod with my itunes library, it synchronizes a few songs and then the red circle that comes with 'do not disconnect' disappears from the ipod and itunes says "the ipod 'name of ipod' cannot be synced. The required file cannot be found."
    After that the picture with the red circle and the'do not disconnect' freezes up, and the only way to turn it back on is to hold down the menu and toggle buttons, as if trying to get the ipod to go into disk mode. Also, Itunes can't see the ipod anymore.
    I went to the shop yesterday and said there was something wrong with it prior to my restoring it, but the guy in the shop made it sound like it was my fault for pressing the restore button, and that it would most likely start working if the software on it were updated.
    The software on my ipod is up to date, and I've tried removing and reinstalling the newest version og Itunes.
    I'm sorry for the wall of text that just hit you headon, but I hope that telling all the details might shed some light on my problem.
    I hope someone out there can help me, or refer me to another topic with a solution. I just realized how addicted I am to that little piece of hardware.
    Thanks in advance

    UPDATE:
    I've just made an interesting discovery (at least I'd like to think so myself:).
    When I got home from the gym today I plugged my ipod in the computer to recharge the battery (I had without any incidents heard around 60 songs). When Itunes detected my ipod it didn't recognise the library on my ipod and it wanted to restore the ipod and copy it's current library onto the ipod. Fine, I thought since it's completely indifferent. Only Itunes started with error 69 again.
    So I thought, to heck with it.
    I deleted my library 100 %, and I've just finished the hard work of sorting out my new library and my new playlists. I only added music, about 1600 tracks and synced - WITHOUT any errors occuring. I tried then to add the podcasts, of which there are 61 and Itunes was able to sync 55 of these before getting the error 69, the last 5 being podcasts of older date, which it hasn't had any problems with earlier.
    So right now, I'm thinking can the podcasts interfere with me syncing songs? or something far out like that?
    btw. itunes recognises the library on the ipod, so I don't think that's a problem anymore.

  • If I purchase a Mac can I convert my PC files saved on a backup to my Mac?

    If I buy a Mac, can I convert my PC files, folder, saved on a backup to my Mac

    Did you use a backup program?  The backup program could have saved the data in some funny way.
    If you copied them  with Windows copy  & paste or drag & drop,  you will be able to read the files on the mac.  You can run Windows on the new Macs.
    What type of files are we talking about?  Microsoft has office for the Mac. Word, Excel, Powerpoint files are supported.
    Robert

  • +/- buttons stopped working in Project 2010

    I'm running Project Pro 2010 on a Windows 7 laptop, but not connected to a server. This morning when I came in an opened up my project I couldn't show subtasks in my project by clicking on the + sign in front of the summary task. The cursor was a outline
    + and all it would do was select a task or open a task when I clicked or double clicked. I had to shut everything down and restart my PC and now it works like it should.
    I could show the subtasks by clicking on the Outline ribbon button and select show subtasks, but that is 3 clicks (select tasks, click Outline, click show subtasks) instead of 1 and a real pain. 
    What is going on? How do I get the cursor to work as it should without having to reboot?

    This could be related to an old issue where the video card/graphics rendering interacts in a funny way.
    Did you have an external monitor (docking station or the like) connected when you shut down the laptop and not so when you started the laptop the day after?
    Or another combination of having the laptop primary display being other than the built-in laptop screen?
    /Lars H
    //Lars Hammarberg www.connecta.se

Maybe you are looking for

  • Routing Issue with 3550

    I am having a routing issue with a 3550 switch. I have 5 vlans and I need one of the vlans to access a different router based on destination IP rather than our edge router. I have entered a static route on the 3550 that points to the secondary router

  • How do I sync (copy) my iPhone's content to my PC?

    Here's the deal.  I'm using a computer that currently has an iTunes sync to a device I no longer intend to use.  I have my dad's iPhone in my hand and I want to get some music on it (specifically, I want to rip a CD to it).  I do grasp that iTunes de

  • Database Engine won't start - master DB log file issue

    I had a server patched and reboot yesterday and now the SQL services won't start because it's saying it can't find the master log file. I checked the path and the log file is present. Any suggestions. 2014-04-21 09:48:55.22 Server      Microsoft SQL

  • What are some new features in 5.1.1

    I have been using FCP 5.0 and was wondering what are some of the new features in 5.1.1? I am thinking about upgrading to it. Thanks in advance

  • Connect BW to another Source System

    Hello Gurus, I have a problem. We have to connect a BW Dev System to R3 Dev System, but I want to do some DEMOS to my client so I need to connect the same BW DEV System to another DEV System (IDES). When I finish the DEMO I should connect this BW DEV