I have an ASP.NET project under development with my team. and I want to create a database and share with with my teammates . So that they can make edits (Add table etc). When I open the database thats in the project It give me the following error.
One or more files do not match the primary file of the database. If you are attempting to attach a database, retry the operation with the correct files. If this is an existing database, the file may be corrupted and should be restored from a backup.
An attempt to attach an auto-named database for file xxxx.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Please help whats wrong!
at the end of the day, I want a database to share it with a team (or even better I want to host a database somewhere so that all of us can connect to it for FREE)
Please Help!.
Thank you for your time.
If you want to share a database, it's better if you create DB project form Visual Studio templates so you can have project that contain all your database objects as files, and by compare your project with your local DB you can merge the change from the DB to the project or from the project to the DB you can also create script for the data that should be exist in the DB and this script can run after deploy your DB project.
So here the scenario,
You create a local DB, and you create some tables
You create DB project inside your solution
You compare the DB with your DB project
You write the update of the compare which is some tables files
You check-in DB in TFS
Other developer Check-out the solution including DB project
Compare the DB project with local DB
Write update to the local DB
Now the other developer has the same DB
Thanks
M.Radwan
Related
I have created a site that uses MySQL and I want to get it online.
My question is:
What happens with the database that I created?
Will it automatically be saved in the host?
Will all the tables etc. remain the same?
Also, I have created an update module which connects to the database to store new data.
What happens in than case?
If anyone knows details about the whole process.
Please let me know!
Thanks in advance!
If you use local database for development, you need to export database from local database and import them into the database of your hosing provider or any other online database.
If you developed your site using the online database like database provided by the hosting site, there will be data and database as it is.
In your case the database is stored locally. So every change you make during development will be reflected only if your local database is imported to online database.
Have inherited a MySQL database that was completely trashed by the latest Windows 10 build update. The server lost all the user and schema information.
I restored the database back and recreated the users, set all the permissions etc. Obviously I would like to mitigate against this happening in the future but can see no obvious way from workbench to generate a script to create the users and set the permissions as you would from SQL management studio.
Is this possible?
Yes this is possible.
You can execute requests with a batch that is loaded by MySQL with a command from the shell to make what you want done.
I had not tested it myself but I think this link could be helpful.
I am doing constant upgrades to my clients website - and most upgrades include changes to the database structure.
Currently every time I change the structure, I build a seed file and run it when we go to the staging environment.
This is very time consuming and I can only assume there is a better way. Looking through PhpMyAdmin, there is a way to export just the database structure, but when I import this into my staging database it doesn't update the structure.
I tried following this thread, but I can't get anything to work: How do I migrate new MySQL database structure from dev to production website using the command line?
Is there a way to quickly dump database structure changes from one database table to another without changing the data?
I'm moving a SQL Server table from SQL Server 2008 R2 to MySQL on my c:\ drive by using SSIS.
In SSIS, I have created ADO.Net source and destination connections with a 64 bit unicode driver I downloaded and have managed to successfully to transfer the data from SQL Server to a newly created MySQL table.
However, even though all rows were copied successfully, the table doesn't show up in the MySQLdatabase with my other tables. SSIS put the table in a different directory from the one where the database tables are located. I don's see how to change the location. When I'm selecting a table in SSIS for the data to go to, it doesn't show the right list of tables.
It's showing tables located in c:\xampp\mysql\data\mysql while my database tables are located in c:\xampp\mysql\mydb. How can I access these new tables, or direct SSIS to use a different path?
Thanks for your response. I have a local instance of mySQL. As Ivan suggested, it is a problem with the connection I setup. I didn't see anyway to change that, since when you look at the connections offered in SSIS after picking "NEW" to create a new connection in the ADO.Net setup, there's a drop down menu with my existing connection and a few others but that's it, so what you have to do is opt for creating a new connection string, and in that set of menus I was able to add a new connection (the string is built for you), so when I redid the connection, and moved the next table it went into the database. So, that worked.
Just as an aside, Of course, I found that the transformation will only succeed if you run the following statement in MySQL: "SET GLOBAL sql_mode='ANSI' once you've started up MySQL from the XAMP control panel.
I'm developing an AIR app which will synchronise data between local SQLite db and server-side MySQL database.
The app is to be used by several users on any number of desktop computers. When a user first installs the AIR app the database and its tables will not exist locally. I would like the app to be able to download a single schema file with all the CREATE TABLE statements and execute them to set up the database tables locally prior to synchronising with server-side data.
I know that flash.data exposes the SQLSchema class which allows inspection of the database schema - but what I would like to do is build a local database from a downloaded schema.
Is this possible?
Thanks in advance.
Best wishes
This is possible.
My way of doing this is through URLRequest which brings back the sql text file with commands to populate tables in main database opened by AIR.