Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to copy local .mdf file to my remote server #22

Open
stpriyanka opened this issue Jun 30, 2015 · 2 comments
Open

how to copy local .mdf file to my remote server #22

stpriyanka opened this issue Jun 30, 2015 · 2 comments
Labels

Comments

@stpriyanka
Copy link

Hi
I started working on a project from scratch using bettercms a month ago. now I have my own remote server in azure where i want to deploy my project . But how can i copy the local .mdf file to remote server ? all my bettercms files are stored in local .mdf file.
I tried to back up with sql script but i got an error like Index was out of bound array.

@Adomavicius
Copy link

Unfortunately, if you are using a local .mdf file you will not be able to simply upload it to Azure, as is outlined in this discussion: http://forums.asp.net/t/1957553.aspx?steps+to+go+from+local+mdf+to+azure+sql+db .

You will have to deploy the database to Azure SQL or some other Azure supported alternative. The method I found to do the former is this:

  1. Attach your local .mdf file in SQL Server Management Studio. (source: https://learningsqlserver.wordpress.com/2011/02/13/how-can-i-open-mdf-and-ldf-files-in-sql-server-attach-tutorial-troublshooting/);
  2. Once you have the database attached, you can deploy the database to SQL Azure (source: http://stackoverflow.com/a/20815564);
  3. Change your connection string to fit the SQL Azure credentials.

@sherry098
Copy link

sherry098 commented Jun 7, 2019

Hi,

In order to copy the local .mdf file to Azure you can use the reliable application named as SysTools SQL to Azure Migration Software. The utility just requires the .mdf files for carrying out the migration process.

To migrate or copy .mdf files to Azure follow these simple steps:

https://www.systoolsgroup.com/sql-server/azure/

1- Launch and run SQL Server to Azure DB Migrator Tool
2- Choose Scan Option and Auto Detect MDF file version
3- Preview database objects like tables, triggers, views, etc before the migration process
4- Now, migrate SQL Server database to Azure SQL database

To know the process in detail don't forget to read this article :

https://sqltechtips.blogspot.com/2019/06/upload-sql-database-to-azure-sql-server.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants