Missing database when reinstalling TFS: Tfs_Analysis - sql

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

Related

SSDT failing to publish: "Unable to connect to master or target server"

I'm attempting to use SSDT to publish to a SQL Server database in Azure. When I do so, I am seeing the following error:
Unable to connect to master or target server 'DATABASE_NAME'. You must have a user with the same password in master or target server 'DATABASE_NAME'.
Ignoring the fact that it's listing a database name as the server name in the error, I'm not sure how to resolve it. When I specify the target database, I can successfully Test Connection. I can also connect using the same creds to the database through SSMS.
After researching the error, it seems like it is often that the firewall for the database in Azure does not include the IP address of the machine you're publishing from. It not only contains my IP, but I added another firewall rule to allow every IP (0.0.0.0-255.255.255.255) to eliminate the firewall as a potential cause of the problem.
Any ideas?
This is a known issue. This happens due to the new compatibility level 140 for newly created SQL Azure databases. The issue has been documented here and updating SSDT from here to the latest version may solve the issue.
Alternatively, you can change the compatibility level of your database to 130.
ALTER DATABASE database_name
SET COMPATIBILITY_LEVEL = 130;
Hope this helps.
Initializing deployment (Start)
Initializing deployment (Failed)
*** Could not deploy package.
Unable to connect to master or target server 'DbName'. You must have a user with the same password in master or target server 'DbName'.
Issue occurred while deploying build through VisualStudio-2015 and it support to publish database on the database servers whose version up to only 2016.
Solution: For SQL server 2017 we need to Publish Database with Visual Studia 2017 only. Need to upgrade SSDT.
Faced same issue when trying to deploy a DB from local SQL Server to Azure SQL DB via SSMS.
Tried to alter source DB's compatibility level to 130, still got same error.
Tried to add same user logins to master DB, no help.
Eventually, started looking for other approaches. Succeeded by using Data Migration Assistant, as instructed in https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate.
My situation was slightly different in that I had exported an Azure database (with compat level 140) from SQL Azure and then tried to import it into a local SQL Server 2017 installation - using the latest SSMS 2017 that I just installed yesterday - and still got this message.
Turned out that although I did have latest SSMS installed, I was actually opening SSMS 2016 by mistake! So be sure to select and pin the correct version to avoid it happening again. Just typing 'SSMS' into the Windows Start menu may not show both.
So if you use SSMS to import you only need the latest version, and no separate tools.
Footnote: Even after opening the correct SSMS version I got another error - something about contained databases.
An Azure database is a 'contained' database (or at least mine was) - meaning that its user logins are embedded in the database. This isn't enabled by default apparently in standard SQL Server 2017.
After running this in the local SQL in master I was able to import it successfully.
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
When this happened to me it was due to the version of tools I was using. I thought it strange that the most recent SqlPackage.exe I found in C:\Program Files (x86)\Microsoft SQL Server didn't work and publishing from visual studio did, so I found the most recent
under the visual studio directories:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150\SqlPackage.exe
* to publish to a SQL Server database in Azure*, you can use "Data Migration Assistant" (DMA).
I just tried it and it works smoothly without any issues (firewall and compatibility level)
please refer to this link SQL Server database migration to Azure SQL Database
for step by step: 10. How to migrate the SQL database to Azure with the Azure Database Migration Service
I got the same error while trying to update a local SQL Server database from Visual Studio database project (i.e. not i Azure). Turns out the problem was I was running SSDT for Visual Studio 2017 while using Visual Studio 2015. Visual Studio discovered an updated version of SSDT (just happened to see it in notifications!), pointing to the right Visual Studio version. Now it works!
My setup: BizTalk Server 2016 forces me to use Visual Studio 2015. My local database is on SQL Server 2017. Using SSDT for Visual Studio 2015 works for updating databases in SQL Server 2017. Just so you know. ;)
Most of the sources recommend to set COMPATIBILITY_LEVEL = 130; and, usually, it solves the issue. Unfortunately, this did not help me.
In my case, I had to downgrade SQL Server 2017 on my machine to SQL Server 2016 Developer Edition.
I ended up having to install DacFramework.msi on the SQL server that my azure runner agent was installed to get past this error. My server is a VM running in our network. not running in azure...
the description on the msi says:
'This installer database contains the logic and data required to install Microsoft SQL Server Data-Tier Application Framework (x64).'
Try to connect to the SQL Azure database using Sql Server Management Studio and the ip getting listed in the management studio is the right ip address. Try to add to the SQL Azure firewall rules. The ip address listed in the firewall page of Sql Azure portal is not accurate.

Deploy SQL Database to MS Azure Storage - Error: 40804 [duplicate]

I'm trying to move my databases to a newer Azure subscription. I used to simply click "Deploy to Azure" on a local database from SSMS and have it deployed to a specified Azure server. Importing/Exporting a BACPAC file also works. However, I can't seem to do any of this on the new server. I keep getting the error:
"The service objective 'Web' specified is invalid."
Googling around, I found this thread explaining the need to update the CREATE DATABASE template to accommodate Azure Databases (Azure upgrade, I'm guessing). However, the hotfix provided is specifically for SQL Server 2014 and I'm using SQL Server 2012. I checked other cumulative updates for 2012 here but found no fix for the issue.
Is there any other way I can fix this without having to upgrade to 2014?
Just to summarize my software versions:
SQL Server 2012
SQL Management Studio 11.0.2100.60
Local database: SQL Server 10.50.16000
Old Azure server: SQL Server 11.0.9230
New Azure server: SQL Server 13.0.15
You are getting this error because the latest V12 servers are not supporting the Web and Business Editions anymore. If you don't want to upgrade to SSMS 2014, you can create a V11 server and import your DB on this server. However this is only a temporary solution as Web and Business edition databases will be retired in September. At this point you will have to work with the latest tools to avoid this problem.
There is a Hotfix for it you can download and install on your machine. Please navigate to:
https://support.microsoft.com/en-gb/kb/2936603
You need to enter your email then download link will be sent to your email address. Then install it on your machine and you can see the following options:
Install the database as a Data Project into Visual Studio,
Set the target framework in the properties window to SQL Azure,
Build the project and resolve any unsupported issues.
Publish to your azure site.
I have tried the above and did not work for me - this solution worked!

Advanced TFS 2013 install pointing to TFS 2010 database

I'm in the middle of what Microsoft calls an advanced TFS 2013 installation on new hardware. I want to point it at my current database running TFS 2010 on a different server and wanted to know if I can do this or if there are any tools available to upgrade the existing database.
I upgraded the SQL Server running the TFS2010 databases to SQL Server 2012 and can connect so that is not an issue. I'd like to keep the same databases for obvious reasons and could not find any info on a road map to do so.
Anybody have any insight?
Thanks.
Just in case anyone comes in here and is looking for an answer. It is possible to install TFS2013 on one box and point to databases that were created in TFS2010, but those databases must be converted to SQL Server 2012.
What I did was to upgrade our SQL Server from 2008 to 2012 and the tfs databases were still accessible to users on tfs 2010. Then you go to the tfs 2013 administrator and attach a collection. You put your server name into the available servers edit control and you'll see your project collection database. The first part of the attach process is an evaluation and if something bad happens, at least it's in the analysis phase. Make sure you have a database backup and then click through so that the operation starts.
After the database is attached through tfs, you have some work in sql server to do. First detach the collection in tfs 2013. Then, in sql server, backup the project collection database again and copy it to your new tfs 2013 server running sql server. Then, again in sql server, detach the database.
Then go back to tfs 2013 and in sql server restore from the backup you created. Once that is done, in the tfs 2013 interface attach the collection and you're good to go.
Hope this helps.

Export SQL database (all tables) from remote server

I'm current using a 3rd party product, which uses an SQL Server database. I've been asked to take a copy of the database for our own backup/security purposes, but I'm having trouble.
To access the database I'm currently logging into one of my companies servers using remote desktop, where SQL Server 2005 Express is installed. Using that instance of SQL Server I then connect to the 3rd party's SQL server.
when I execute Tasks -> Back Up..., it appears to work, but the files are stored locally on the remote SQL Databases server, which my IT teams tells me is expected.
I tried using Tasks -> Generate Scripts... but the option to "Script Data" isn't available, either because it's SQL Server 2005 Express, or because the database is remote (not sure which, but probably one of those).
I've tried other things that I can't recall at the moment, and I'm out of ideas.
Can anyone suggest something that will let me get a 'local' copy of the remote databases table structure AND data?
The Generate Scripts wizard is unavailable because you are using a very old version of Management Studio Express. The 2012 version will work just fine against 2005 instances, but there is no longer an Express edition anyway, because all of the SSMS features are now available without any license.
Download the latest versions here:
https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
I list downloads for the older versions at the bottom of this post:
https://blogs.sentryone.com/team-posts/latest-builds-management-studio/
Backups do generate locally. That is to be expected, as your team has already told you. You can generate it locally and then download it with a tool such as an FTP client. I highly recommend Redgate tools. See http://www.red-gate.com/products/dba/sql-backup/ It's a great tool and has some network backup options built in to ship your backups elsewhere. If it's a one-time thing, Redgate also has tools for that too, e.g. SQL Compare and SQL Data Compare.
The solution you pick really depends on how frequently you have to run and download backups locally and how big the DB is.

Connection failing when I try to process a cube in BIDS

There is probably a simple answer to this question but I do not have much experience with SQL Server/SSAS. I can connect to my local server PCNAME\SQLEXPRESS in SQL Server 2008. On that server I have made a database, some dimension tables, and a fact table that I intend to build a cube from.
I have been following tutorials on the internet on how to build a cube. I can successfully make a data source that connects to PCNAME\SQLEXPRESS, as well as make a data source view from it.
The problem is that after I build the cube, I get A connection cannot be made. Ensure that the server is running. and cannot process the cube. BIDS is displaying the star schema of my tables just fine, recognizes the relationships via foreign keys, etc... so I figured the server was running since it could access all of that data.
Does anyone know why this is happening, and if my server really isn't running can someone tell me how to start it? I am using SQL Server 2008 R2.
Thanks,
Logan
edit: I just tried to change the server name to PCNAME\SQLEXPRESS instead of localhost in the Properties->Deployment option menu. I get A connection cannot be made to redirector. Ensure that 'SQL Browser' is running.
I solved this problem - for people that find this page on Google in the future: when I first installed SQL Server, the SSAS part failed to install. I uninstalled SQL Server and when I reinstalled, I looked deeper into the issue. Apparently one of the services needed to run SSAS has a weird bug where it cannot be started if your Event Log is full. I finished the installation of SQL Server, cleared my Event Log (Administrative Tools -> Event Viewer -> Click Each Log and go to Action -> Clear All Events), and then started the SSAS service in the SQL Configuration Manager.
You can start by going to "Programs->Microsoft SQL Server 2008->Configuration Tools->SQL Server Configuration Manager". Once there, you need to start the services "SQL Server", "SQL Server Analysis Services", and maybe try starting "SQL Server Browser", though I believe that is not necessary.