Copy Views to another DB

[expired user #10274]'s profile image [expired user #10274] posted 7 years ago in General Permalink

Hi, I have question regarding copying database view to another databaze. For this purpose I am using Export function and then select target DB. It is working, but after copyping, views in new DB contains name of the original DB before tables name. For example, original view was "SELECT FROM name" and placed in "A" DB. After coppying to "B" DB, view is now "SELECT FROM A.name". This is quite problem, because I need fix this in every copied view. Is there any solution or am I using wrong copy pocedure?

ansgar's profile image ansgar posted 7 years ago Permalink

I think this is done by the server, silently. HeidiSQL cannot do much about that. You could try to manually recreate the views in the target database?

[expired user #10274]'s profile image [expired user #10274] posted 7 years ago Permalink

Thanks for this idea. I checked the commands during the export command and you are right, command to create new view does not contains DB name as described. So it must be server setting issue. Thanks!

Please login to leave a reply, or register at first.