Use Azure data sync with localdb - azure

B"H
How can I use Azure Data Sync with localdb?
Please note: I am not asking about using it with a "Local Database" as in an on-prem database. I am speaking specifically about the technology (particular Sql Server Edition) known as localdb. As in (localdb)\MSSQLLocalDB.
The issue is adding the localdb instance to SQL Data Sync Agent. The agent must be run under an entity (windows login) that has permission to run as a service. It can not be run using a windows live identity which is what the users are usually logged in as. Yet it also needs to have permissions to the database in localdb.
Use Case:
I have a central database running in Azure. With multiple users with laptops and limited internet connection, running local apps (some built in Access). Connecting directly from the apps to Azure is too slow or otherwise impractical. Therefore I install the lightweight localdb as a cache for the users data. Which will be merged using Azure Data Sync.
I am currently using a solution built directly on Microsoft Sync Framework. However there is a maintenance overhead on that solution. So I would like to migrate to the Microsoft maintained Azure Data Sync.
Thank you

B"H
Ok, it was actually a silly mistake.
You actually can run the SQL Data Sync Agent using a windows live identity. You just need to use the local user name. Which is the name of the folder for that user in the Users folder. You must also use the name of the computer in the format MyComputer\localUserName.
Once I was running the SQL Data Sync Agent under the currently logged in user - who also has access to the DB - everything else ran smoothly.

Related

Looking for suggestions for running a VB6 application in the "cloud"

I have a Win32 application written in VB6 that uses an MS Access database as its data file.
I have about 30 clients who use this application. Each currently has it setup in their local network. Some clients have a Terminal Server for staff to access their network remotely.
A number of my clients are inquiring about the possibility of using the application in the cloud.
I am considering the possibility of ultimately making the application web based in some form, however that will take many months to do. So, in the meantime, I am looking for suggestions as to how clients could run this application in the "cloud".
Would it be possible to run it using Microsoft Azure in some way?
I am also wondering whether I could rent a Virtual Private Server myself, and then set it up to allow multiple clients to connect to it (with each using their own individual data file). My main question around this option is whether there would be additional license costs for users who need to connect (eg. like the old Terminal Services "Client Access Licenses").
One function of the application is that users are able to "attach" electronic files (word documents, pdf's etc) to file notes. These "attachments" are stored in a subfolder of the data file location (ie they are not stored in the data file). So the solution must be able to support uploading local documents to the "cloud" service.
Any ideas would be most welcome.
Many thanks,
Rohan
You could try it with "Virtual Machine" feature of MS Azure.
Acces portal.azure.com
In the left navigation bar, choose "Virtual Machine"
Click "Add", type "windows" into the search field & press
Enter
Choose the Windows VM you want
Connect, upload your VB6 app & test it...
Please be inform that some Windows VMs require MSDN subscription or cost very much.
The Azure feature you are looking for is likely Azure RemoteApp. It allows for desktop applications to be installed in the Azure "cloud" and then used by users from any device using Remote Desktop Services functionality. This way you can control the environment where the application is installed, and not have to configure every users device; which is especially helpful with older legacy applications like VB6 apps.
https://www.remoteapp.windowsazure.com/en/
EDIT: Unfortunately on August 12, 2016 Microsoft announced they are discontinuing Azure Remote App. New purchases of RemoteApp will be discontinued October 1, 2016, and the service will be replaced with an offering from Citrix called Citrix XenApp Express.
I think you should simply create a virtual server for each of your clients. Do not create 1 virtual server for everyone, that will be a nightmare and very insecure for client data.
The clients would still just access over terminal services or Remote Desktop as they have before, just the server is now in the cloud.
Then you can bill each client for the what you are charged for their server.
RUN EXCEL/ACCESS DATABASE ON THE CLOUD WITHOUT PROGRAMMING!
I can solve your problem without using Azure or similar. We would first convert your Excel/Access database to a Progen4GL-based applications, which will then run on the cloud. See downloads on www.progencloud.com.
If you can, send us a similar Access/Excel file. We will convert it to a Progen4GL database that you can run the on the cloud with full read/write access. As Progen4GL reads in Access/Excel files without programming, we can do it for your for nothing. It takes only a few minutes for the to conversion to a Progen4GL Database. We will return it to you as a Cloud application. See Progen DataOWL on www.progencloud.com and try it yourself. You will need some help from us to run it on the Cloud as the website doesn't have full details.
Ravi Raizada raviraiz#aol.com
www.progencloud.com

Windows Azure - migration questions

After global overview about Windows Azure platform i still have some questions in my mind i would like you to kindly answer. Hope it will be also usefull for some people besides me.
One of my application uses sql server db for text data and second db which is just simply images db (folder structure own db) where
images are stored and by using ftp my aplication can download/upload
there. The question is: a) If i would go azure does "sql azure" is
place where can i place my sql server db? b) What about my folder
structure database - is there some place on azure storage i could put
my folders containing images and configure ftp to it? I heard about
BLOBS but can i ftp to it?
Is there possibility to place Windows forms application to Azure that it could work as remote application which specific users could
access instead of installing on every client machine?
Regarding Worker role - is there possibility to just simply move Windows service application to azure as worker role or there are some
things which has to be rebuilt to work in azure?
If i would go azure does "sql azure" is place where can i place my sql
server db.
You could definitely use SQL Azure to host your SQL database. Other alternative would be to use a SQL Server inside a Virtual Machine.
What about my folder structure database - is there some place on azure
storage i could put my folders containing images and configure ftp to
it? I heard about BLOBS but can i ftp to it?
Blobs is definitely the place to store files and folders though they don't support FTP. However there are many storage explorers available (both free and paid), using which you can upload files and folders from your local computer into Azure Blob Storage. Another alternative would be Azure File Storage.
Is there possibility to place Windows forms application to Azure that
it could work as remote application which specific users could access
instead of installing on every client machine?
Yes, it is possible. Please look into Azure Remote App Service.
Regarding Worker role - is there possibility to just simply move
Windows service application to azure as worker role or there are some
things which has to be rebuilt to work in azure?
You can't deploy a Windows Service application as is into a Worker role. You have to tweak your code a bit. Other alternatives that you may want to look into is hosting your Windows Service in a Virtual Machine (to the best of my knowledge, it should be without any code changes) or converting your Windows Service into a WebJob.
In addition to everything that Gaurav mentions and as he alludes to, you can also investigate Azure Files. You can mount file shares from any onprem application. Since Azure Files supports the SMB protocol, you can use standard file system API to interact with it.
https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files.

How can I deploy my database from SQL Server 2008 Express to Azure SQL Database

I am using Visual Studio Community 2013, SQL Server 2008 R2 Express Edition for an MVC web application using entity framework code first migrations for my database.
I am trying to get my local application hosted on the Microsoft Azure platform.
I have registered for a trial account which expires in 30 days, and deployed my MVC5 app out which has been successful.
However, this app requires a database which I am struggling to deploy.
What is the easiest way to get my database deployed out to Azure as I do not seem to have the :
"Tasks" -> "Deploy Database to Microsoft Azure SQL Database" option available to me in SSMS.
I have extracted a Data-tier Application of my local database and have it stored on my C drive, however if I connect to my Azure Account in a second window, and right click the server then select Deploy Data-tier Application, it fails on "Creating schema object in database" with the following error:
TITLE: Microsoft SQL Server Management Studio
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------ ADDITIONAL INFORMATION:
Users cannot be mapped to certificates, asymmetric keys, or Windows
logins in this version of SQL Server. (Microsoft SQL Server, Error:
40528)
I'm assuming its tried to create my local account plus the IIS APPPOOL account I had to set up to host the website on my local network, however I do not see a way of removing them from the .dacpac export.
When I refresh the Databases node, there is still no database, I'm fairly lost now as to how I might get my db deployed to this server?
If you can extract a compatible Data-tier application and then Deploy it to your target server using your current version of Management studio, then this approach should work, see this link for more reading on ensuring your database is compatible.
Failing this, as was in my case. I downloaded Management Studio 2015, which gave me the option to deploy database to Azure by simply right clicking the required database.
Again, this threw up the error regarding my database level IISAPPOOL user, but not my server account user. As a way around this, I took a backup/restore of the database and removed this user then deployed the copy database obviously minus the problem account.
Now all that was left to do was add a transform to my Release web.config with the Azure connection string as provided on the Azure dashboard, and re-deploy the website.
Problem solved.

Keeping database objects in sync using Azure

I'm in the process of creating an Azure Website, and using SQL storage in Azure for database connectivity as well. If I wanted to follow a simple model of (website instance\database_instance):
TEST - test.website.com\test_database
STAGING - staging.website.com\staging_database
PRODUCTION - website.com\production_database
How would I go about syncing database object from TEST->STAGE->PROD? On local database, I used to use redgate tools, but I don't know if I can still use those with Azure.
I should add, I'm using Visual Studio 2012 with Azure Tools installed.. I'm not sure if there's a database project I can use to promote database objects when I publish as well?'
Presumably you used Red Gate SQL Compare and SQL Data Compare? If so, these should work with SQL Azure so long as you're not using a very old version.
Could you try it and if you come across a problem, let me know, and I'll see what I can do to escalate it.

How to create tables in windows azure?

I am new to windows azure.Can anyone please tell me the process of creating database and tables in windows azure and how to connect to that connection to application .we have windows azure account .please clarify my doubts.any of pdf books for deploying the rest wcf services in cloud let me know the links.
Thanks,
It is May 2014 and that Silverlight online tool just is not really much better.
Best approach is to use SSMS (SQL Server Management Studio) you can even use the free tools tool.
Connect to your Azure with the portal supplied server url / port ... and then your username /password.
Say you scripted out an existing database tables and want to execute that script, you have much more freedom and control with SSMS than online.
For table creation note that a few caveats, One that is common is that not all of T-SQL is supported and a typical script from another database table(s) you end up needed to strip off the two "ON [PRIMARY]" parts of the create statement
Click on the database server in the management portal. 1st thing you would do is manage the allowed IP Addresses which can access this server/database. Allow your local IP address there. After that you have 2 choices:
Use Sql Server Management Studio - It does not have the table editor and you would need to write T-SQL scripts manually.
Use Silverlight based database management utility - to access this, click on the Manage Url link as shown in the screenshot below.
Since you cannot have wizards for Adding/Editing tables, constraints or keys for Azure DB, even if you have connected it through MS SQL Server Management Studio, you can use RazorSQL for this purpose. It gives you a feeling like you are playing with your azure DB in management studio, same as you do with your normal DBs

Resources