Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
how to schedule powershell commands for clone a db in smsql 5
2010-08-05
09:24 AM
2,465 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
i want to schedule a clone job in smsql 5
in the wizard you have no option to do this
with powershell commands executed in the netapp cli works
when i make a sqljob wiht powershell option d'osnt work
how i can schedule my job in sql or task scheduler
thx for help
andy
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
here is the solution:
powershell.exe -ImportSystemModules clone-database -Server Servername -Username admin -Password P@ssw0rd -ServerInstance Instance -Database DBName -TargetDatabase DBName_Clone -TargetServerInstance Targetserver -MountPointDir c:\Mountpoint -UseMountPoint
you can schedule this batch by Windows Task Scheduler or in a SQL Job.
I have created a SQL Job with a detach Step first.
