SQL Server - automatically stop/restart sql service

Asked By pete008
14-Feb-08 04:26 PM
I would like to be able to automatically stop a sql service running on sql
2005 express, use a script to transfer files over to another server and
restart the service automatically.

Any ideas of how I can do this?
Statisticsio
(1)
Directory
(1)
Readme
(1)
Xcopy
(1)
RSS
(1)
  Jason Massie replied...
14-Feb-08 04:33 PM
You can use a batch file that does a net stop, copy and net start. Schedule
it with task scheduler.


--
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
  pete008 replied...
14-Feb-08 05:14 PM
When it does a copy and it is only copying one file, not the entire directory.
The directory has 4 folders and 1 readme file and it is copying the readme
file.

Any ideas?
  Jason Massie replied...
14-Feb-08 05:22 PM
xcopy /S

Documentation for the other switches is available by running xcopy /?

--
Jason Massie
Web: http://statisticsio.com
RSS: http://feeds.feedburner.com/statisticsio
Create New Account
help
SQL 2005 default directory SQL Server How do I get sql to default to a particular directory when saving query files, instead of that Projects directory? SQL Server New Users Discussions Registry (1) Ekrem (1) Directory (1) Önsoy (1) There are some default directory settings that you can change via Registry Editor \ SSMS, however there is no such an option to change the default directory for saving *.sql files I'm afraid. - - Ekrem Önsoy keywords: SQL, 2005, default, directory description: How do I get sql to default to a particular directory when saving query files, instead of that Projects directory?
directory listing in SSIS SQL Server Hey everyone, I am trying to download a directory via FTP and then import all the tables to a DB. The number of files and their names are unknown. I would probably need some technique to perform a directory listing. ( On the remote directory or its local copy). Do you know how this could be done in SSIS? Thanks S SQL Server DTS Discussions ForEach (1) SSIS (1) SHave (1) FTP (1) DB (1) Directory (1) Files (1) Sqlis (1) Have you looked at the ForEach Loop Task. It will enumerate files in a given directory and if you want their subdirectories also. Looping over files with the Foreach Loop (http www.sqlis.com | http: / / www.sqldts.com | http: / / www.konesans.com thanks! big help. keywords: directory, listing, in, SSIS description: Hey everyone, I am trying to download a directory via FTP and then import all the tables to a DB. The number of files
Active Directory Groups and SQL Database security SQL Server Hi there. . . . . . . . . . . . . . . I'm new to SQL2k5 and we've just implemented Active Directory. Is it actually possible to use Active Directory groups to control access to Databases. Or can someone please advise me the way Active Directory groups can be used to control SQL Database security or whats the best practice approach? Many thanks. . . . . . . . . . . . SQL Server Discussions SQL Server (1) Active Directory (1) Database (1) LeoThanks (1) Leo (1) Grantdbaccess (1) C2f088ac1a2a (1) Grantlogin (1) For SQL reply. Is there any documentation you can point me to on how to use Active Directory groups to grant db permissions and roles. Thanks Excuse me for my ignorance. But does on your SQL Server. - - Regards, LeoPasta - http: / / sqlblogcasts.com / blogs / leopasta / default.aspx keywords: Active, Directory, Groups, and, SQL, Database, security description: Hi there. . . . . . . . . . . . . . . I'm new to SQL2k5 and we've just implemented Active Directory. Is it actually possible to use Active Directory groups to control