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.
Related
I have two SQL server databases running on Azure - one Prod and one Test. I want every night, the Test server will automatically sync its data and structure (include any TABLE, Stored Proc changes ) with Prod - so Test is a mirror of Prod that can be used for development / QA.
I am wondering how to achieve this on Azure? Please note I would like this to happen automatically and on a schedule. Thanks everybody.
Azure the moment, we can use Azure data sync service to sync data between database. But we cannot use the service to sync Stored Procedures. For more details, please refer to here and here. So if we want to sync Stored Procedures, SQL Server Management Studio Generate Scripts Wizard is an easy means of producing a script that will copy all of your Stored Procedures to another database.
Besides, regarding how to create a schedule to start azure SQL data sync, please refer to the blog
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.
So far, when I make any changes to my local Db, to make those changes to sql azure db, I need to manually write script and run it on sql azure db. Is there any solution that help my sql azure db get updated quicker? Like right after I check in my code to source control, my sql azure db will be updated automatically? I do have one Db project in my solution. I heard about Redgate that might have some products that can solve my problem but I'm not sure. Any suggestion?
Ps: If this question is not appropriate to ask here, please warn me so I can delete it.
Edit: There is another way I normally use is to make a schema compare between db project and sql azure db and then update. This way I dont need to write script manually but I still need to do multiple steps to get db in azure updated.
For some unknown reasons, all of a sudden my sql servers master database has been corrupted and sql service won't run. I have spent hours and tried various things like trying to run the service under different accounts, also checked that no compression is set in the data folder etc but nothing seems to work. I copied master database from another instance and the service would start and I can connect to the database instance via management studio but I won't see my databases. I have backup of the corrupted master database (mdf and log file) but just wondering how can we fix this database to see all my databases? thanks
Just restore from the backup (good to have one!), it's the recommended way:
http://blogs.technet.com/b/fort_sql/archive/2011/02/01/the-easiest-way-to-rebuild-the-sql-server-master-database.aspx
In case you don't have a good backup, you will have to rebuild master database:
http://msdn.microsoft.com/en-us/library/ms144259%28v=sql.90%29.aspx
Copying over from another existing instance is not recommended.
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