SQL...what happens when a service is stopped and someone is logged on

Hello,
Question. I have a SQL database. It is new and currently how I back it up is I log everyone out, stop the sQL services and the database service, and drag and drop the instance (DATA) to an SSD drive.

What happens if I stop the SQL services when people are logged in? Does this lead to database corruption?

I know Symantec's backup product has an agent that backs up the database for me while people are logged in and I do not have to stop the services. The product is finally stable.

How do you backup your SQL databases, what is the best way? I watched several TECHNET videos on the subject.

Thanks,
LVL 2
dronethoughtAsked:
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.

Carl TawnSystems and Integration DeveloperCommented:
You shouldn't need to stop the service at all. SQL Server has a proper backup engine of its own, that backups databases without any downtime.

Basic syntax for a SQL backup is:
BACKUP DATABASE [YourDatabaseName]
    TO DISK = N'<path_and_name_for_backup_file>.bak'

Open in new window

You only need to BAK file to have a backup of your database, not the entire installation directory.
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
dronethoughtAuthor Commented:
Thank you.
0
dronethoughtAuthor Commented:
Dear Carl,
Forgot to ask, the syntax is used in which program...I am new to SQL.
Thanks.
DT
0
Carl TawnSystems and Integration DeveloperCommented:
Normally it would be through SQL Server Management Studio, sqlcmd (command-line client), or as part of a scheduled SQL Server Agent job.
0
dronethoughtAuthor Commented:
Thank you!!
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 2008

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.