Database - phpmyadmin - database

I would like to know does database is erased on daily basis which is created PHPMyadmin
Yesterday I have created a database by clicking "new" option under the Server "phpmyadmin demo-MYSQL(root)".Today that database doesn't exist.Any suggestions please and let me know whether I have missed nay steps before creating a database

You were using a demo.phpmyadmin.net server which is not intended for production and which removes databases created by testers on a daily basis.

Related

postgres (pgAdmin) database connection issue

I'm a new sql user (3 days) and I'm having some problems querying data from database tables I've created, whereas there is no problems querying the default 'postgres' database tables. My first thought was that it was a access/privilege problem, but had no effect. I did also notice that my database activity in the dashboard is always idle, whereas the default postgres database is always active. So it looks like my database is available but not connected. Can I choose which database to connect to? Ive been checking the docs, but can't find how to make my database active. Any help appreciated. Thanks
When you connect to PgAdmin to a Postgres instance you get to choose which database you want your queries to work against. You can see an example here.
If you cannot see your database once you connect to the instance you might either:
1) not have the db created in that instance.
2) not have permissions to view/access it. For this one you may need to ask to the administrator of the db for the relevant permission grants.

Database Migration Approach

I have a few databases that I want to migrate to another server. These are production Databases, what is the best way to Migrate
1) Take full back up of the Current Databse and then Restore it on to the other Server.
or
2) Detach and then Copy the mdf/ldf files on the Destination Server and then attach the files there.
I know that after Migrating Sql Logins and Sql Agent Jobs will have to be created manually. Are there any other risks that come to mind?
Any help will be helpful.
Thanks,
Ben
For Login transfer use "sp_help_revlogin" you get the script
https://support.microsoft.com/en-us/kb/918992
this Stored procedure list out all the instance login not particular database login. One special thing about this stored procedure is no need to do orphaned fix. Just migrate the logins and check. It works.

Continuous Deployment in Cloud

I am assinged for the task of Continuous deployment from development server to production server.
In my development server all the database objects will be created under the 'DBO' Schema. But in Production server based on every Tenants company list differenet SCHEMAS will be there.
for E.g in my development server if a tablename is created like
dbo.ABC
dbo.XYZ
And while i creating a tenant(Omkar---db) (Sarkur,Mathur--- schemas), the database objects will be like
Sarkur.ABC, sarkur.XYZ
Mathur.ABC, Mathur.XYZ
Now, i have to compare these two databases to check whether any changes in structure of the database objects, addition / deletion of database objects. If so that changes has tobe synchronized in the production database.
If anyone know that how to compare these two different schemas object, pls let me know..
1 option that I know is looking suitable
Flyway :
It is Easy to setup, simple to master. Flyway let's you regain control of your database migrations with pleasure and plain sql.
Solves only one problem and solves it well. Flyway migrates your database, so you don't have to worry about it anymore.
Made for continuous delivery. Let Flyway migrate your database on application startup. Releases have never been this easy.
Big Plus It's Open Source framework!
http://flywaydb.org/

Attaching Database

I am very new to Sequel Server. For Practice, I created a Database where I imported some sample datasets (mostly excel files) via SSIS. The database consists of 6 tables. I was wondering if there is a way I can send the database (I created) via email or share it by any other way. Like Adventureworks was available for download and also for attaching to SQL SERVER, is there a way I can do the same for my practice database?
Thank you,
Regards,
Sourav
You can backup the database you created to a file and send it over to anyone. Right click on your database, Tasks -> Backup

Continuous delivery of SQL Database to Windows Azure by using Team Foundation Service

I have Continuous delivery from TFS running to Azure for the C# project and this is fine.
I now want to the Continuous delivery to work with my SQL database.
Currently I have a SQL 2008 R2 database which holds the database.
What is the best option to ensure I can deliver using Continuous delivery from TFS to include the database changes?
The important factor is it needs to be automated upon checkin to TFS.
I've just run into this problem and found guidance hard to come by but have managed it in my application, I'm very new to MVC and Azure so excuse me if this isn't too detailed.
Here's what I did;
In my Global.asax.cs Application_start() I added:
Database.SetInitializer(new MigrateDatabaseToLatestVersion<ApplicationDbContext, Configuration>());
Where ApplicationDbContext is the name of your context. Remember to add references to your Models class and Migrations classes.
When you do this, I think migrations are run on your database when the context is first called and it does not drop and recreate your database.
The one problem I had was that I was getting an error saying that objects already existed in the database because none of the migration data in the __MigrarionHistory table was in there so it tried to create the database from scratch. Luckily my application wasn't live yet so I could delete the tables and commit to TFS and it recreated everything and included all of the __MigrationHistory so now, any new code first migrations are run on the first hit and the database is updated. I wouldn't know what to do if this database was live!
Hope that helps

Resources