Team Foundation Server 2012 Update 2 - Scheduled Backups Wizard - backup

After applying Update 2 - the Scheduled Backup is now a build-in feature (not requiring Power Tool). I have difficult understanding the required permissions required to dump a backup on a file-share. Even when trying to dump the backup on a local share - \mytfs2012server\c$\Backup - the wizard ends up with a:
TF401002: The SQL Server Database Engine failed to save the database backup to path... Please grant SQL service account read/write access to that folder.
The message is very simple. I have tried different things - without success. With Update 1 + Power Tools I succeeded to use the wizard after some tweaking. Anyone that can list the permissions required for the Scheduled Backup for Update 2?
Edit:
Update 3 did not change anything for me. However it looks like Update 4 will. From this page it looks like Update 4 will include changes regarding backup:
Scheduled Backups configuration is no longer blocked if the SQL Server service for TFS 2012 is running as a virtual account (for example: NT Service\MSSQLSERVER).
In TFS 2012 Update 2 and Update 3, transactional backups record a failure when they try to run while a full or differential backup is running.
Scheduled Backups no longer run transactional backups if a full or differential backup is running. Instead, the job will be suspended until the other backup has finished running.

I had the same Problem.
Infrastuctur: TFS 2012 Update 2, SQL Server 2012
Solution:
I created a simple shared Folder like \BACKUPSERVER\TFS_Backup$ on the DB Backup Server.
I configured the TFS admin and the SQL Admin with Full Control in the Security and Share Permissions.
Now the Backup Job is running.
But now i have an other Problem:
After running a Full Backup the Transaction-Logs were not truncated, does any one have the same Problem or maybe an solution?

Are you using virtual accounts for the server? Something like 'NT Service\MSSQLSERVER'? If so be aware that they aren't supported in the Scheduled Backups Wizard in both TFS 2012.2 & 2012.3.
You either have to create the backup plans manually or switch the SQL service account to a domain account or Network Service.
EDIT:
As per the comments, TFS 2012.4 RC2 and up has removed this restriction

Related

Invalid drive specification and how to restore with other server

I've created an agent job in SQL Server 2008 with steps:
Backup
Transfer File (to another server)
Restore (to another server)
Step 1 backup has been successful, but when process transfers the file, it fails with message
invalid drive specification
I've added IP of destination server on Windows credential, and I try to run the syntax in CMD it works:
exec xp_cmdshell 'xcopy D:\folder\file_name*.ext \\desination_IP\folder\'
When I try with SQL Server 2017, it works. Is there any difference between 2008 and 2017? Please let me know
Then go to the next step restore, what I want is to restore the database from server A to server B. Example I have 2 servers with the name A server and B server i put the job in A server and the job consists of step backup, step transfer file and step restore. I transfer db to B server then i want to restore database in B server from A server with agent.
The question is, is that possible? Can somebody help me with the query to restore a database from another server? Thanks
Check to see what user the SQL Agent service is running as, if it is Local System, you'll need to change it to an account that has access to the destination folder.

Can I restore a SQL Server instance from file backups only?

Our windows 2016 server failed to restart after a windows update yesterday.
In order to avoid the update that crashed it issue (whatever it was), I'm in the process of rebuilding it clean.
So I've reinstalled Windows Server 2016, and SQL Server 2016 (same version we were using before).
I have a full system backup from a couple of days ago viz Windows SErver Backup.
What I am having a hard time finding is information on
"How do I restore a SQL Server instance directly from Win Backup files?"
I have recreated the same named instance we had before (so that the file paths match, etc.) - but I have no idea how to make that work? Can it possibly be as simple as shutting down SQL Server temporarily - using Windows Backup to restore the necessary C:\Program Files\Microsoft SQL Server\MSSQL13.SOURCEGEARVAULT\?
Or is there more to it than that? If so, where can I find instructions for this?
If I had a true backup of the database - and not simply the filesystem - I would have access to lots of how-to's - I've done that before. But I don't have that - I just have the raw filesystem a day before it died.
Any pointers would be appreciated!
UPDATE: per feedback - moved this to: https://serverfault.com/questions/914463/can-i-restore-a-sql-server-instance-from-file-backups-only

Missing database when reinstalling TFS: Tfs_Analysis

I am trying to install TFS 2013 on a server that previously had TFS 2015 installed, then removed.
When the process runs, there are a number of databases it can find, that need to be removed. I have removed these, but it is saying there is still one database: Tfs_Analysis.
I have looked in the server and I cannot see the database in the list of databases. I have full permissions on the server, so it is not a case of it being there and I cannot see it.
What is really confusing me is that SQL Server will allow me to create a database with the same name and remove it.
I have restarted the SQL Services and have also restarted the server. Can anyone suggest what I am missing?
When you connect to the database from SQL Management Studio, choose Analysis Services as the server type
Now you should see Tfs_Analysis under the list of databases and you can delete it so the TFS 2013 setup doesn't give you any trouble

Migrating SQL Server database from AWS to Azure

I have a large database in an AWS instance running SQL Server 2008 on a Windows Server 2008 R2.
The database is constantly changing and writing information, and its size is about ~100GB
I wish to migrate from our Amazon services to Microsoft Azure.
But I cannot afford any lost of information more them for more than 20-30 minutes
I don't mind using the Azure SQL or running a SQL Server under a VM in Azure Cloud, but I must keep the databases live and updated, there are few main tables that information is being added to them constantly
What would be the best way to do so ?
if you are using an AWS instance and not RDS and you are going to an Azure instance and not "Azure SQL Database" you can use log-shipping or something similar to get the downtime down to a few seconds: http://msdn.microsoft.com/en-us/library/ms187103.aspx
The steps you need to take:
Take full backup on AWS
restore full backup without recovery on Azure
take log backup on AWS
restore log backup without recovery on Azure
repeat 3 and 4 until the time it takes is short enough (you probably want to script this out)
take app offline
take another log backup on AWS
restore that log backup WITH recovery on Azure
repoint App to Azure
bring App online again.
3, 4 and 5 is what log-shipping would automate, but you could just write a powershell script too.

Azure Bacpac file Restore Error

I do the daily bacpac file backup from Azure database using RedGate Azure Backup tool.
Until 31st of May, All my Bacpac files can restore to Local SQL2008R2 database using DAC Client Tool.
Starting from 1st of June, I got error like:
Failure Creating schema objects in database
'XXXXX' System.Data.SqlClient.SqlException (0x80131904): Cannot
find the object "dbo.XXXX" because it does not exist or you do not have per
missions.
When I check it table still exist in DB.Also No idea for this.
Is there anyone face that kind of missing table, invalid Column.. etc
RedGate Azure Backup is deprecated now. The DAC Client Tool (DacCli.exe) has been integrated into SSMS 2012 and SSDT. You could try updating your DAC Client Tool to the latest version (1.6 from 1.2)
SSMS 2012 Data Tools now allow you to Import Data-tier Applications. Take a look at the Data-Tier Application Framework Feature in SQL 2012 downloads. View this MSDN article for reference.
I use the free utility SQL Backup and FTP to backup Azure SQL Databases to a local .bacpac file. The free version allows you to backup up to 2 different databases and then the paid versions are very reasonable (i.e. Professional version is $70 or so).
http://sqlbackupandftp.com/
It actually runs on a schedule for me, automatically emails me the results of the backup and stores it on my Google Drive (even with the free version - I just have it store the timestamped backups in the file folder of my Google drive).
The procedure I use to restore it to a local database is:
Back up SQL Azure to .bacpac file
Login to local database server as sa
Right-click Databases
Click Import Data-Tier Application
Select .bacpac file either from Azure or local disk
Enter the name and the locations to store the data and log files
If necessary, set the original database to single user mode and delete it
If necessary, rename restored database to original database name
Note: Must use SQL Server 2012 (or later) management tools