Running SQL Server 2012 in Container in Azure - sql-server

At work we load data into a SQL Server 2012 database, and create .bak files that are exported. Yes that is correct, due to compatibility issues, we need to use SQL Server 2012.
This process, which is probably running for 3-4 hours per day, is currently running on an on-premise machine, but we want to move it to Azure.
However, SQL databases in Azure are v2017+, but I have read that it's possible to run SQL Sever 2012 in a Docker container. Before I invest a lot of time into this idea, has any one tried to host an old SQL Server version in a Docker container in Azure?

As said, use a VM. Microsoft maintain VM images all the way back to 2008 plus you can integrate backup and automatic updates to the OS and SQL. Images are listed here and you can pay as you go or bring your own license:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/sql-server-on-azure-vm-iaas-what-is-overview
In the pay as you go model you can shutdown the VM (i.e. the VM itself not just the OS) and you won’t get charged for the VM or the SQL license. You will still get charged for storage. See here:
https://learn.microsoft.com/en-us/azure/azure-sql/virtual-machines/windows/pricing-guidance#pay-per-usage

Related

What are my options for accessing an SQL Server database through MS Access front-end while offline

I'm currently working on a project proposal which would require moving multiple Access databases into a new MS SQL Server database. The idea is to keep the front end program as MS Access so that the users are familiar with the process of inputting data and creating reports.
However, things get complicated in that the internet in the areas where the survey will be collected has poor connectivity and will be out from time to time. I had thought of a few ways of solving this issue but all of them are cumbersome:
1) Having a PC with a router that stores the SQL Server database in offline mode and the data entry PCs connect to the PC with the offline database through the router. The PC with the SQL Server database can then backup the db on the server when it has an internet connection.
2) Adding the data to MS Access databases that can then be merged with the SQL Server at specified increments (this would probably cause some issues).
We've done option 1 before for similar projects but never for connecting to an SQL Server database in offline mode. However, it seems feasible.
My question is: Does anyone know of a way of using Access as a front end application for SQL Server and being able to update data during times without internet connectivity? The SQL Server database would automatically assign primary keys, so, duplicate unique values shouldn't be an issue while syncing the data.
Thanks for your help. I've been having a hard time finding an answer on Google and syncing to databases is complicated at the best of times. I'm really just looking for a starting point to see if there are easier ways of accomplishing this.
I would run a the free editon of SQL express on all laptops. So the Access database would be the front end to the local edition of SQL express. SQL express can be a subscriber to the "main" sql database. You thus use SQL replication to sync those local editions of SQL server to the master server. Of course the main SQL server can't be the free edition of SQL server. So to publish the database for replication, you can't use the free edition, but those free editions can certainly be used as subscribers.
This approach would eliminate the need to build or write special software for the Access application. You thus do a traditional migration of the access back end (data tables) to sql server, and then simply run the Access application local with sql express installed on each laptop. You then fire off a sync to the main edition of sql server when such laptops are back at the office.
The other possible would be to adopt and use the net sync framework. This would also allow sync, and would eliminate the need to run sql expess on each machine. I think the least amount of effort is to sync the local editions of sql express with the main editon of SQL server running at the office (but that office edition of SQL server can't be a free edition).

Database Instant File Initialization For Microsoft Sql Server Local DB 2016 SP1

My company makes extensive use of Microsoft SQL Server Express Local DB 2016 (SP1) for code testing. I recently read about Database Instant File Initialization, and I believe this would improve the performance of our testing processes.
When I check the logs for the Local DB instance, they indicate that Database Instant File Initialization is disabled. I have made sure that my specific user has "Perform Volume Maintenance Tasks" permissions.
Does anyone know if this feature works in the Local DB version? If so, any thoughts on what I might be doing wrong would be appreciated.

Import a sample database into SQL Server on AWS RDS free tier

I'm signed up to Amazon Web Service (AWS) free tier, which allows you to run some very limited instances of EC2 and RDS for free.
I've created an RDS instance running SQL Server 2012 Express - this does not allow remote desktop access, so I also have an EC2 instance running Windows Server 2012 base, and I have installed SQL Server Management Studio and I'm able to connect.
I would like to import some kind of sample database - for example, Northwind, AdventureWorks, or anything that has at least a handful of tables and relationships. The reason is I want to just experiment and practice on a few things (for example, I want to try out the EXPLAIN feature to get to learn how the relational algebra works and how SQL plans out various test queries).
My problem is that Amazon's RDS does not allow me to restore a .BAK file, as local disk access is not allowed, and neither is FILESTREAM, so I can't just download a sample database backup and restore it.
Amazon document their workaround here, which involves creating a local instance of SQL Server on the EC2 instance (my machine with SQL Server Management Studio installed, which I have RDP access to), and use the Generate and Publish Scripts Wizard to import data from the EC2 to the RDS. My problem here is that I don't have enough disk space to install a local database instance - as I'm on the free tier I'm limited to 30GB total disk space for the server, so the OS + SQL Server Management Studio leaves just a couple of gigs. So I'm totally stuck.
Does anyone have any genius ideas here? Maybe some pre-made bulk insert scripts I can use (I can't find any) or some other solution? The database doesn't have to be big, just something to work with. Of course I could always pay to increase my disk space, and go through the whole tedious process outlined by Amazon, but I'd rather not!
Thanks
I got a perfect answer over on dba.stackexchange.com - there's a mini version of Northwind (2.6MB) here which has a script for creating the schema / importing the data. Thanks Tripp for suggesting I ask the question over there!

Use own MSSQL Instace for TFS

We have a single MS Server 2012 for hosting our MSSQL 2014.
On the Server we already installed two instances of MSSQL 2014.
One for the productive Business-Applications and one instance for the development Databases.
Beside the MSSQL 2014 installation we need to setup the TFS2013.
My question is if it is a good thought to make an own instance for the TFS or if we should just use one of the existing instances (Probably the dev) to store the databases.
We would love to use another instance because we would like to isolate the TFS Databases (so a restart of the TFS SQL Service should not affect the prod dbs) from the rest. We know that the administration needed for three instances is bigger than for two but we can neglect that.
Will there be a big loose in performance with a third instance, or isnt it that dramatic?
To avoid some anwsers, there is no possibility to implement the TFS or MSSQL on an other server(Because we just don't have any free resources).
The Server is from the hardware POV suitable and because we're a small company there won't be that much connections to the DB's (40 Employees to the Prod Instance, 3-5 Developers connecting to the DEV and TFS Instances).
The data tier of your TFS installation does not require any restarts. It's just a database that's created on your SQL Server.
The application tier of TFS is where the real work happens. This is where your users connect to and where the Windows Service and IIS websites are running.
It is no problem to use a shared SQL Server instance for installing Team Foundation Server.
If you want more information on how to install TFS checkout the ALM Rangers documentation. We have just released a new version of the guide that can be found here.
I would install also on a separate instance because the development or the production databases may require an SQL Server services restart which will cause a TFS unavailability.
Also you don't want to give permissions to the developers on TFS databases (usually developers are requiring higher permissions on their development databases, e.g. sysadmin for backup/restore)

Is it possible to create an SQL Server Azure VM but use your own license?

I have a program that is a .net console app that is intended to track information at a few websites daily and then put this data into an SQL database.
Previously I've had this program running on a scheduler on my computer but I'm about to take off on a 3 month vacation so I'm planning on deploying it on azure to run it while I'm away.
Last night I set up a SQL server VM. I got it all set up then I tracked the pricing and realized that using the SQL Server image increased the price by about 30$ per month compared to the Windows image (http://www.windowsazure.com/en-us/pricing/calculator/?scenario=virtual-machines)
I have an SQL Server license. So I was thinking of just setting up a Windows VM and then installing SQL server on it. THe only problem is that I'm going to have to copy the MSI over and install it etc. - it would take ages.
Is it possible to just create an SQL Server VM in azure and then enter my own license in there to avoid paying the extra 30$ per month?
By the way, is there a more economical way to get Azure to do this then using a VM? Really, it just needs to run daily and performance doesn't matter.
To answer your question directly: you can only utilise your own SQL Server license on an Azure VM if your organisation's agreement with Microsoft includes License Mobility (http://www.windowsazure.com/en-us/pricing/license-mobility/). If your are unsure or believe this is not the case then you cannot deploy your own license. This is exactly the same on Amazon Web Services (AWS).
SQL Databases for Azure Mobile Services that are under 20MB are free - that may be an option depending on your needs. (see point 5 on this page: http://www.windowsazure.com/en-us/pricing/details/mobile-services/).
You can try converting the .NET console application to Worker Role (PAAS) and use Web Edition of SQL Database (PAAS), and recalculate your TCO.
You can start with the SQL Server Trial image, then apply your own license on it (as on any trial installation).
You could also have a free Azure Web Site, with your code triggered as a "web job". For DB, there is a 20MB free tier for Azure SQL Database.
Why don't you just create a SQL Azure DB. They are only $4.95/mo for DB's under 100MB http://www.windowsazure.com/en-us/pricing/details/sql-database/
Saves the entire headache of running your own SQL Server.
Update: SQL Azure now has different pricing
As suggested in the comments, use Azure WebJobs and if possible a free SQL DB if you only have very limited data to track operation.
Under 20Mb free
~$5/mo for up to 2GB
More Details: http://azure.microsoft.com/en-us/pricing/details/sql-database/

Resources