I have local database with a lot of data for developing a site...now I want to publish this project.
I wanna know. how Can I bring this data from local to online database?
While you haven't specified database, tools, the answer can be extraordinary as well.
Let's imagine that you have local MS SQL DB and Azure SQL db.
There is not a standard method how to do this.
Right click on the database. Generate scripts.
Then select all objects that you need
then go to advanced and change types of data to script to:Scheme and data
as the result you will have full damp of your database that you have to run on AZURE SQL.
ps. more ideas only if you provide more details
That I usually use is Azure and you can publish you app and database to it direct from VS. Of course you can do is separate db or app.
https://learn.microsoft.com/en-us/visualstudio/deployment/deploying-applications-services-and-components-resources?view=vs-2022
Related
I opened a thread here:
SQLite Database vs online database C# UWP
but I have a second, more general question that was not answered:
How do I distinguish data of each user from all the others after sync between multiple SQLite files and one SQL server?
I mean, since the SQLite is offline and local db solution, I did not implement any user/password thing.
But since multiple users will be syncing between their Host and Client app via SQL temporary database, I don't know what is the usual technique to achieve this.
My theory is to force host app user for user/password creation and store that data in one of the SQLite tables locally. Then, I should use SQLite-Sync
to pull all current users' data from SQLite and combine it with his specific user credentials.
But, since I never used SQL (only SQLite) I don't know how user management works. Here is my question then:
How do I separate each users' data from the others?
Is the user assigned to each row of data like an additional field in order to distinguish specific users' data?
Or is there a separate table for each user? Or maybe there are different databases for each user? (sorry if my theories are too nooby).
EDIT:
I just had another idea, maybe it is possible to avoid SQL server mediation if I manage to parse user SQLite data directly between the two apps? Something like this: How to do sync with local database and parse?
but in UWP vs Android.
I'm working on a Windows Forms application in VS 2013 that requires saving data. I can't find a good solution for this, since:
A SQL Server database will work fine, but it will force the user
to have SQL Server installed on their computer.
The same applies to Access or Oracle DB.
DataSets require a database connection,which leads me to 1) and 3).
Text/XML files don't satisfy the
security requirements and will seem like a very primitive solution.
So , in essence, when the user installs the application, on its
first deployment it must create a database and keep it for future
access, without requiring the user to have any special programs
installed (e.g. SQL Server). I apologize if this question seems
stupid.
This is in two parts - how to create a database application and how to access it for initialisation.
Option 1 - if you can resolve the problem of installing SQL Lite/compact using the suggestions above then you can use Entity Framework with code first to create the database and tables. There are plenty of examples only a Google search away.
Option 2 - create an Access database (an MDB or ACCDB file) with blank/empty tables and deploy this as part of your application. You can the access this with a suitable connection string - again, Google will solve that one.
Use SQL Compact Edition .
Using LINQ to SQL you can create a Database/Tables for the first time deployment.
Please Refer the Link http://msdn.microsoft.com/en-us/library/bb399420(v=vs.110).aspx
We currently facing the problem to provide an offline version of a Server-Client-App (WCF/Silverlight). On our server we currently working with a heavy weight MSSQL Server, storing global and user data.
Now, to provide an offline version, we have to provide a local database subset. It will have to store a lot of data anyway (probably >6GB).
Now we don't want anyone to be able to modify or even see the db structure and data. But as far as I know, localdb or SQL Express have always the problem, that a local admin with knowledge of sql can open and manipulate the db with sa.
What would your suggestions be?
I am currently learning about EF and have come into a scenario where the data should be used in both an online and offline mode.
It is assumed that the user will have to use the system first while connected to obtain the data used offline.
I thought about serializing the queries but IQueryable/ObjectQuery are not marked as serializable.
How would I go about being able to store results from a few queries locally and then restoring them in offline mode so the use can continue to use the app? I could spend days researching this but I hope somebody can point me in the right direction.
EDIT
It is worth noting that the master SQL Server instance is a shared server that has very minimal features installed. Replication for example, is not installed.
Assuming you are using SQL Server, you vcould take a look at SQL server compact.
http://msdn.microsoft.com/en-us/data/ff687142.aspx
You could copy data from your main DB into a locally stored CE database then switch to this for offline.
I have created a new MVC3 project and used the ADO.NET Entity Data Model to map out my existing database. It worked great.
Now, that is a database I don't want to affect when doing development of my web app, so I was looking to now attach that data model to a local database (haven't selected one yet, suggestions welcome. I was thinking SQL Server CE or MySQL).
Does anyone have any ideas on how to do this? I'd be nice to keep the existing connection string to my live database as well as this development database environment.
You can generate another matching DB using whatever technology you want (though it would be good to keep them similar to your production DB) and then have a Web.Debug and a Web.Release setup.
If you look at swapping out the configuration, connection string portion of your web.config file you can easily swap from development to production.
http://msdn.microsoft.com/en-us/library/dd465326.aspx
This provides the relevant information for the transform statements in your Web.config file, but from the sounds of it you can simply swap the connection portion of your web.config and get what you want.
Is the existing database on your machine, or on a server somewhere?
If it's on your machine, just back it up and restore it to a different database; i.e. if your database is called XYZ, back it up and restore it to a database called XYZ-Testing. You can then connect to and use XYZ-testing without affecting XYZ.
If the existing database is on a server somewhere, the easiest solution is to install SQL Express on your machine, and then backup the database on the server and restore it on your machine.
Doing this will make your life much easier than trying to use a different database type (SQL CE or MySQL).
Another option would be to use SQL Server Data Tools (SSDT) free download, add-in to VS or stand-alone if no VS, and then to create a local database project for development. I wrote a blog post about using SSDT as well.