My Microsoft Moment

shaddowdragon

Well-Known Member
Joined
Dec 8, 2006
Messages
272
Reaction score
8
Location
Johannesburg
As it happens, I'm an old techie long since moved on. However this week, I was asked if I could help with an SQL back up script. I then had a Microsoft moment ...

SQL 2012 cannot back up to anything other than c: drive. Fortunately I was already sitting down and my mind drifted to my third blue screen on windows 7 a few weeks ago. Wanted to post the picture but I still cannot find it. The solution is sym links as it happens but come on!

I've had many Microsoft moments over the years but it will be nice to hear about other mbb users' moments. +1 if someone mentions one you already had.
 
huh?

You can backup to network shares. I haven't tried backing up to a local drive but I wouldn't think it would be a issue.

That's what I mean, most experts can figure something out in the end. If you do not have a "registered" backup set or your number :-) you will not figure it out. Try a straight restore \\mymachine\gregmcc\mydbbackup, then try it with a script in your program after. Let me know how it goes. NB: \\mymachine != \\sqlserver
 
Ummm this is very standard stuff in SQL 2012...

It can backup to any drive you want/UNC shares etc etc.... it does not take an expert to figure out.. maybe 10 minutes on Google if you are not familiar with SQL and backups.
 
As it happens, I'm an old techie long since moved on. However this week, I was asked if I could help with an SQL back up script. I then had a Microsoft moment ...

SQL 2012 cannot back up to anything other than c: drive. Fortunately I was already sitting down and my mind drifted to my third blue screen on windows 7 a few weeks ago. Wanted to post the picture but I still cannot find it. The solution is sym links as it happens but come on!

I've had many Microsoft moments over the years but it will be nice to hear about other mbb users' moments. +1 if someone mentions one you already had.

Hmmm I just tested this and backed up a database to my D: drive. This is using SQL Management Studio. Is it only via script that you can't back up to a different drive? Surely that should be possible too?
 
Hmmm I just tested this and backed up a database to my D: drive. This is using SQL Management Studio. Is it only via script that you can't back up to a different drive? Surely that should be possible too?

Hello

The script and Management Studio worked fine in 2008, its SQL Management Studio 2012 when both did not work.

"Operating system error 5: "5(Access is denied.)"." on the network path

If you map the drive, the script says it cannot find the file.

The share is accessible from the SQL server host machine, full permissions and everything.

Sym link works great.
 
Hello

The script and Management Studio worked fine in 2008, its SQL Management Studio 2012 when both did not work.

"Operating system error 5: "5(Access is denied.)"." on the network path

If you map the drive, the script says it cannot find the file.

The share is accessible from the SQL server host machine, full permissions and everything.

Sym link works great.

That sounds suspiciously like your permissions are a bit out.. nothing to actually do with SQL and everything to do with how the machine was setup.
 
That sounds suspiciously like your permissions are a bit out.. nothing to actually do with SQL and everything to do with how the machine was setup.

If that could explain why everything worked before the upgrade it would make sense. Anyhow, everything from file and share permissions has been checked. Firewall checked off then on with explicit permissions. Google has been googled and all the solutions go back to sym links. This is not to say I did not miss something however, its says I've tried. And shouldn't the new version be more, not less. Kinda like android revoking SD access in the latest iteration.
 
I tried in SQL 2012 and had no problems backing up to other drives. It does sound like permission problems of some sort.
 
If that could explain why everything worked before the upgrade it would make sense. Anyhow, everything from file and share permissions has been checked. Firewall checked off then on with explicit permissions. Google has been googled and all the solutions go back to sym links. This is not to say I did not miss something however, its says I've tried. And shouldn't the new version be more, not less. Kinda like android revoking SD access in the latest iteration.

Are your permissions on the SQL Service Account or something else?
 
Hello Ladies and Gents

Thanks for pointing me in the right direction. It is permissions against the machine account that must be granted then the script will run correctly. The gui run still does not work but it does not matter, the automated job works. "SQL service account needs share and NTFS permissions" to see the shares.

In the end, it was a Blond moment. Microsoft 1 Me 0
 
Top
Sign up to the MyBroadband newsletter
X