If the client refuses to take your advice, the question is, is that what you are selling to the client?
I went solo, as a database consultant, after twenty years as a programmer, and as an instructor. I settled in early to a model that said the primary thing of value that I was transferring to the customer was advice and know-how.
Sometimes people hired me just to fix database corruption. Come in, find out what's wrong, fix it and get out.
Sometimes people hired me to reorganize a database whose performance had become unacceptable. In these cases they normally wanted me to transfer my knowledge to the local talent, so that they would not have to hire "an expensive guy from out of town" the next time.
Nearly always, my clients had a competent programming staff of their own. Being a competent programmer does not necessarily mean that you are a good database jockey. It can help you, or it can hurt you.
Every now and then, I would run into a client whose demand was "fix it, but don't change anything." Generally, these were difficult clients, although there were exceptions.
If the "fix it, but don't change anything" edict can be translated to "repair the physical design, but leave the logical design intact" then you can actually do what the client wants.
I'm actually annoyed when people refer to me as a "guru" or a "wizard". Magic has nothing to do with what I used to do for a living. It's just analysis, diagnosis and repair (or redesign). I was annoyed whn John Masterson suggested, diaparagingly, that I would conduct an exorcism on a system that might be demon possessed. But I know he was only kidding.
In general, the Wienberg laws of consulting apply:
Law one: "There's always a problem, no matter what the client says."
Law two: "It's always a people problem, no matter what it looks like at first."
But the real problem is when when they hire you to be a contractor, but they really need a consultant. It's like a lousy driver bringing a car into Jiffy lube. An hour later, when he drives away, his reaction is, "this car still drives lousy".