Made backup of the old DB and transfered it to the new server. Then restored it and tried.
STSADM –o addcontentdb –url http://ssps001:7242 -databasename _wss_content_old -databaseserver SDBA001
But if failed and upgrade.log at (C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12LOGS) stated:
: Upgrade failed.
: Invalid object name 'dbo.trace_xe_action_map'.
: Invalid object name 'dbo.trace_xe_action_map'.
So with a little bit of searching I found that out I have to create a synonym in the context to the database:
use
go
CREATE SYNONYM . FOR .;
CREATE SYNONYM . FOR .;
go
And after this it worked and database got attached succesfully.