Visual Studio LightSwitch HTML project will not deploy database schema to Azure SQL Database - azure-sql-database

I ran into deployment issues, so I created a test app to prove out the deployment process. I've kept everything as "out of the box" as possible:
I've created a simple (one table and one screen) VS2013 LightSwitch HTML client app, but the deployment fails, because it will not deploy the database schema.
I've created the Azure website and linked it to my Azure SQL Database, also the "Deploy database schema" checkbox is checked in the wizard.
It seems that my only option at the moment is to manually create the DB objects, which seems kind of absurd.

I have found a workaround to this issue.
It seems that the problem stems from not having the deployment credentials. What I have found is that if I attempt to deploy the server project there is a drop down list box that's supposed to be populated with available destinations. At the first attempt the list comes up blank but if I proceed to publish a message flashes up confirming a new set of credentials has been downloaded. After that I found I am able to publish the main project itself database objects as well.
In short; make sure you are properly logged in even if you have to log out and then in again, and also have deployment credentials up to date.

Related

Publishing with .dbproj turns off transparent data encryption

I noticed in the Azure Dashboard that something was turning off Transparent Data Encryption (TDE) on my database. I had turned it on through the Azure Portal. Realized that something in my dbproj publish process included:
SET ENCRYPTION OFF
There is no obvious option that would do such a thing in the publish screen.
After lots of trial and error, I found that deselecting the checkbox Deploy database properties stopped the publish script from including the junk about turning off encryption. Then it was a matter of finding which db property was causing this.
I saw my dbproj target platform was set to Microsoft Azure SQL Database not Microsoft Azure SQL Database V12. V12 is what has TDE, the old db does not.
Once you go to the properties on your dbproj (right click proj > properties), go to project setttings, change to V12, then click on Database Settings. Go to Miscellaneous tab and check Encryption enabled. Voila, you're done. Make sure you have Deploy database properties re-enabled in your publish settings.

How to setup MS SQL for Lightswitch intrinsic deploy - exception occurred when building the database for the application

Question
Sign in to vote
0
Sign in to vote
VS2013 Community html project, SQL2014 Standard db
Does anyone have a good walkthrough of deploying with an intrinsic db? Deployment with external db works fine, but not with intrinsic.
F5 build works fine on localhost with external or intrinsic db, server deploy to IIS/SQL works fine with external db... just not with intrinsic db...
None of the docs I have found are real detailed about how to setup sql server to handle the intrinsic deployment.
Created the sql project, selected that in LS app properties. Do I create a DB on the SQL server or does LS do that? The Publish dialog on the database step says the admin account will be used to "create and update" the db. Have tried sql admin account with and without specifying a target db. Can the user account be the same as the admin account? Tried that both ways.
Moved from RDS to a fully managed SQL instance and now works. – user5050939 just now edit delete

SQL 2012 - SSIS Package not populating Text file when scheduled

I'm working on SQL 2012 Enterprise and I have a set of SSIS package exports which push data out to text files on a shared network folder. The packages aren't complex and under most circumstances they work perfectly. The problem I'm facing is that they do not work when scheduled - despite reporting that they have succeded.
Let me explain the scenarios;
1) When run manually from within BIDS, they work correctly, txt files are created and populated with data.
2) When deployed to the SSISDB and run from the Agent job they also work as expected - files are created and populate with data.
3) When the Agent job is scheduled to run in the evening, the job runs and reports success. The files are created but the data is not populated.
I've checked the reports on the Integration Services Catalogs and compared the messages line by line from the OnInformation. Both runs reports that the Flat File Destination wrote xxxx rows.
The data is there, the Agent account has the correct access. I cannot fathom why the job works when started manually, but behaves differently when scheduled.
Has anyone seen anything similar? It feels like a very strange bug....
Kind Regards,
James
Make sure that the account you have set up as the proxy for the SSIS task has read/write access to the file.
IMX, when you run an SQL Agent job manually, it appears to use the context of the user who initiates it in some way. I always assumed it was a side effect of impersonation. It's only when it actually runs with the schedule that everything uses the assigned security rights.
Additionally, I think when the user starts the job, the user is impersonating the proxy, but when the job is run via the schedule, the agent's account is impersonating the proxy. Make sure the service account has the right to impersonate the proxy. Take a look at sp_grant_login_to_proxy and sp_enum_login_for_proxy.
Here's a link that roughly goes through the process:
http://www.mssqltips.com/sqlservertip/2163/running-a-ssis-package-from-sql-server-agent-using-a-proxy-account/
I also recall this video being useful:
http://msdn.microsoft.com/en-us/library/dd440761(v=SQL.100).aspx
I had the same problem with Excel files. It was permission rights.
What worked for me was adding the SERVICE account to the folder's security tab. Then the SQL Agent can access the files.

How to build vb.net application so that database is easily connected when published?

I've made VB.NET application in VS2010 that uses a 2007 Access database, called MenuDB.mdb. During development, everything was fine.
Now that I'm publishing it, I'm getting weird errors because for some reason the app isn't connecting to the database.
I install the application and run it but as soon as it opens it gives this error:
System.Data.OleDb.OleDbException (0x80004005): Could not find file
'C:\Users\Administrator\AppData\Local\Apps\2.0\Data\OV86PXJA.K3R\8575R5AY.95Z\menu..tion_0d4fa454d69e8e6b_0001.0000_8340d263807cbb71\Data\MenuDB.accdb'.
I know the problem has to do with the way I'm relating the application to the database, but I don't know which way is right. In Solution Explorer I changed the Build Type of MenuDB.accdb to "Content" (earlier it was embedded resource". But it doesn't work either way. In my App.config I have the following connection string:
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\MenuDB.accdb"
I want that when I deploy the application, the database should just sit in the application folder, wherever it gets installed. How can I do that?
Edit
I don't mind deploying it in such a way that I need to paste the database somewhere myself on the target machine - as long as it works.
If you have multiple users using the same or similar database, and dont have access to a SQL server (MySQL, MSSQL, or others), then co-locate the database at a central location (preferably network location) that all the users will have access to and change the connection string to accomidate the database location being on the network.
Just let it be known, Access can handle up to 10users when doing simple data retrieval/submission but if you ever have it open while others are accessing via data objects, then you may lock them out.

Azure SQL database working when ran locally but not when published to Azure

This has been cracking me up for a few days now and I just can't solve it.
I followed an online tutorial showing you how to connect and use an Azure database using the model first approach within Entity Framework. With this you had to set up database migrations as to update the Azure database when publishing the website to Azure.
I had already created a database on Azure so I thought I would take the approach of using a database first model (also it didn't require migrations to be setup) and used the Entity Framework wizard to create my model. Everything worked perfectly and when I run my MVC website locally it connects to my Azure database and shows the data, etc. However, when I publish the website to the Azure website, for some reason, when I click on tab that uses the controller that gets data from the database, I get an error:
Sorry, an error occurred while processing your request.
I have checked my connection strings and they all seem OK and as I said, when I run it locally I can get the data from the Azure database. For some reason, though, I can't get the data once its published.
Any ideas?
Thankyou everyone for your help.
I didn't even think of turning on the copy local however when I checked it it was set to true. So no answer there :(
Next I added the customerrors mode to off to try and get a more detailed description. The error I got was huge and really didn't make much sense so i did the usual thing and googled the error and I found this
Can anyone spot why I keep getting this error testing the EF 5 beta
As soon as I read it i knew this would fix it. I originally setup the project as a .net 4.5 project until I realized that azure websites didn't work with 4.5 yet so I changed it to .net 4 once I uninstalled EF and reinstalled it everything work.
Thanks for all your help. This has been stopping me doing anything for a few days :P