What are you using for your database management - Oracle or MS SQL?
When you say you "cloned the database", what exactly did you do?
When you installed ALM 12 and it go to the point where it asked you if you wanted to create a new Site Admin schema or upgrade an existing schema, what did you select?
The qcsiteadmin_db contains within its tables references to the DB server. If you did not manually change these in the cloned database before installing ALM 12, then they still point to your production database server and are causing your problems.
If I was you, what I would do (working with a SQL environment) is
1. Clean install ALM 12 and create a new Site Admin schema in the process.
2. Create one new project on the ALM 12 system to get the encrypted passwords you need to put in the project dbid.xml files.
3. Copy you databases just for the projects from the production to the test environment
4. Manually update the dbid.xml files
5. Restore (via Site Admin) the projects in your ALM 12 environment.
(Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)