I want to copy a VIEW
from one server to another. I could copy tables but I can't copy views. Is there a way to do so?
Thanks
Sql-server – Copying View in Management Studio
sql serverssms
Related Question
- Sql-server – Replicating a View to a Table. Issues with schema binding, view indexing
- SQL Server Management Studio – Backup Not Shown When Restoring
- Microsoft SQL Server Management Studio – default table view, default table parameters
- Sql-server – Disable SQL Server 2012 Management Studio remote access
- Sql-server – Indexed view in SQL Server
- SQL Server – Grants for User to See All Tables and Views
Best Answer
The easiest way if you just want to do a quick
CREATE VIEW
on your destination server would be to script it out:The possible choices as a destination for the
CREATE VIEW
script can be a new query window, a file, the clipboard, or an agent job. If you need to run this create script at a later date, the file destination is probably your best bet. But if you want to run it immediately, and you have access to the server, just script it to a new query window and connect to your destination instance/database and run theCREATE VIEW
script.