server explorer
2.right click on data conncetions then select add connection.
add connection dialog box will appear
3.here enter your server name.select use sql server
authentication(or windows) then user name and password.
4.then select the database below and click next.you
will see the conncetion appeared under Data connections.
5.now to publish database as script file right click
on the connection then select publish to provider.
database publishing wizard will appear.
6.then clicking next after next complete all steps by
selecting your database and location where to publish
the script,others.at last step click finish then
your script file will be generating.
7.run this script file in any blank database to
get the copy of your database.