Deploy materialized view with database link using another user
Here is the solution I am using for now.  I don't like it, but until I find something better, it's the best I can do.


At the start of the deployment a public database link with named credentials is created that uses the same name as the private database link will use.
The materialized view is created and works because it is using the public link with embedded credentials.
A procedure is created owned by "Another User" (AU) that uses an execute immediate to create the private database link.
The procedure is run to create the private database link.
The procedure is dropped.
The public database link is dropped.


Unfortunately this requires the swapping the existence of both the public and private database links before and after any deployment that creates materialized views using links.  The temporary creation of a public database link with embedded credentials is also a security risk and is in fact a problem we are trying to solve.