Wednesday, March 7, 2012

Copy a view

Hi

At home i have sqlserver and at work we have sqlserver
At home i have make some views i also would like to use
on the server at work
To day i try to use import from my server to the server at work
but when i import my views the views become a table on the server at work

Is there a way to copy/import the views on from my server at home to the server at work

On my work can i connect to my server at home, so this is not the problem.

Or shall i make new views on the server at work?

Alvin

You could script the views to files (at home) and then take the scripted views to work, open them and execute and the views will get created on your work Server

In Server Management Studio, right click the view you want to script and choose

Script View >> as CREATE >> to File...

The file created will have an extension of .sql but it is a text file...

OR

If you can connect to your server from work, you can do the above, but change >> to File TO >> to New Query Editor Window and then you can cut/paste the script into your work server and execute to create the view...

|||

Thanks

Alvin

No comments:

Post a Comment