SQL Server - Copy database from one server to another

CipherIS
CipherIS used Ask the Experts™
on
Is there a way to copy a database from one server to another without performing a backup?  

I want test to copy a database in the production server.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
IT Engineer
Distinguished Expert 2017
Commented:
If you don't want to do backup then you must stop SQL services, copy over all databases (without system)
Then run new SQL and attache databases.

Author

Commented:
Thanks.  I did backup the database.  Can't stop the services.  So, guess I will need to log onto the server and copy the file to the test server.

Thanks.
Stuart DrydenAutomation solutions architect & senior technical support engineer

Commented:
There is an AWSOME powershell module for exactly this.  it makes it easy any convenient beyond belief - including in an Aure environment if that is what you need.  Check out the powershell gallery and search for 'DBATOOLS'

i promise you will be impressed!

or directly to their website.  its a free module !

edit***

never mind, dont go there, the module is rubbish and expensive !!

why do people on here always close the question and score the first half helpful answer?

maybe other people have ideas too that can contribute ?

https://dbatools.io/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial