The type of loan you will be able to qualify for to obtain a second mortgage depends on several factors. Credit scores below 620 and delinquent credit will eliminate any possibility of a HELOC (Home Equity Line of Credit). A second mortgage can be obtained down to 580 credit score, and certain debts or other delinquencies may have to be paid off to obtain a "stand alone" second mortgage.
If your credit will not allow you to obtain a HELOC, then you should really evaluate the full picture concerning your first mortgage and the debts you are needing to consolidate and take this route.
I can help guide you to what types of solutions may be possible, but really need more details about: 1) Current mortgage payoff, a conservative estimated value of the home, current terms of your mortgage, how long have you had this mortgage, any prepayment peanalties??? 2) Credit? Any idea of your credit scores? What has made your credit "not great", any 30 day delinquincies? Bankruptcies? etc. 3) Job related, income related status, i.e. less than two years employment, self employed?
That should get a start on things.
Generic questions are hard to answer, I really need more details, unless the answer in the first paragraph fulfills what you are wanting to know.