0

Environment: Shared Hosting
- No MSSQL control panel
- Only have mssql management studio

MSSQL Server: Remote
- YES Remote SQL Connections
- NO FTP
- NO Shared Drive

Is there a way to backup MSSQL 2005 or 2008 databases to my local machine or shared server? Ive read and tried Microsofts SMO code base and it looks like it backs the files up to the SQL server or shared drive only. Backup type im looking to make is a .BAK type.

2 Answers2

0

You may use a code which is similar to the one below.

BACKUP DATABASE [DATABASENAME] TO DISK ='\SERVERNAME\C$\BACKUPFILENAME.BAK'

With this (C$) you need not create a new share instead you can use the existing Administrative Share on the target server. However the user taking the backup needs to have administrative privileges on the target server.

Nomad
  • 471
  • 2
  • 3
  • The MSSQL servers cannot talk to the shared servers. Only access I have to the MSSQL servers is via sql management studio express. –  Aug 03 '10 at 09:54
  • If you don't have access to any remote server - try to backup your database in folder where your database located (it definitely should be accessible). After that you cant try to upload your database backup to any accessible remote server using commands executed via xp_cmdshell or so on... – Sergey Nov 16 '10 at 18:25
0

No, what you ask for is not feasible. And would likely result in trouble with your hoster -they should handle backups through the control panel. If they do not, contact their support and ASK. Do not play around in their environment without actually knowing what you do.

Backups always originate on the SQL Server and can there go to discs or reachable network drives.

TomTom
  • 50,857
  • 7
  • 52
  • 134