Joker doesn’t want to know Batman’s secret identity because he likes the rapport they have going; he isn’t trying to find out who Batman is so he can attack his civilian identity or out him to the world, he doesn’t care about that at all. And he certainly doesn’t want to kill Batman because then he would have no nemesis, nobody to butt heads with, no Holmes to his Moriarty. TAS Joker put it best when he said “without Batman, crime has no punchline.”
The Joker doesn’t want to kill Batman because the Joker wants Batman to kill him.
He knows that Batman has a moral code, he knows his One Rule™. Batman won’t kill anyone, but the Joker will; the Joker knows that the world will be a better place when he is dead, a safer place, but Batman will never kill him because of his One Rule™. Plus, as a celebrity in the world of crime, the Joker has the best lawyers money can buy who ensure that even the state can’t kill him either. He’s untouchable, and because he’s considered legally insane (being insane does not mean he’s crazy, being insane means he’s not responsible for his actions) he is sent to a psychiatric hospital instead of prison, so he is protected even further because patients at Arkham aren’t allowed to intermingle like inmates at Blackgate; there are a lot of patients who would love to kill him, but they can’t reach him.
The Joker is trying to goad Batman into breaking his One Rule™ because then he will have won. Joker has no self preservation instinct, he doesn’t care about his own life, or anybody else’s life, he’s trying to prove a point. He wants to make it clear that life is meaningless, that nothing is sacred, that rules and moral codes and reservations are all pointless and empty threats. If and when Batman kills Joker, he will cease to be Batman, and the dead Joker will have had the last laugh.
It’s his “one bad day” philosophy taken to an extreme; he wants to push Batman to the edge, but he doesn’t want to push him over, he wants him to jump voluntarily.