SQL Server 2012

Out IT dept built a new SQL server. I have quite a few SQL statements that I need to move to the new server.  How can I do this?
pstreAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom ChadaraviciusSenior DeveloperCommented:
Use SQL Management Studio, or Navicat for SQL server.
You say, "quite a few" - export from the old server and import into the new server.
0
Aneesh RetnakaranDatabase AdministratorCommented:
I am assuming you are planning to move the databases from old server to a new server. Before you start, you need to gather the login credentials, then find out what applications are using those databases and make a plan to change the connection strings, then you move the databases either taking the databases  offline, the copying the database files over and attaching them or thru a backup restore method.
Better you do this on test server first
0
pstreAuthor Commented:
Aneesh, I wasn't asking about the databases or the login credentials.  I am asking about SQL statements
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Neil RussellTechnical Development LeadCommented:
As SQL Statements are pure ascii text, copy them to text files on disk on the old server and paste them from those files to the new server.

OR Do you mean that you have SQL Peocedures and/or functions compiled on the old server that you sould like to move to the new server?

More info would help us to answer.
0
pstreAuthor Commented:
I figured it out -- I just selected several statements at one time and did a copy and then pasted onto the other server.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vikas GargBusiness Intelligence DeveloperCommented:
HI,

If you want to copy the stored procedure / Views / functions you can right click on database and click on generate script.

Then select relevant objects and your script will be generated which you can save and run on the destination server.
0
pstreAuthor Commented:
I figured it out -- didn't understand the 2 answers others had given.  I selected several statements at one time, right clicked and selected copy.  I then went to the new SQL server and "pasted"
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.