Ms SQL Server database import to Godaddy space database strategy

Source: Internet
Author: User
Tags sql server query godaddy server


I have bought a Godaddy deluxe Plan (Windows) host. I have read about how to upload the local MSSQL database to the Godaddy server, however, I have tested that the Godaddy host fully supports uploading local data through the SQL Server Enterprise Manager. Maybe I have not read it comprehensively, and some other people may have posted relevant posts, however, I 'd like to write it here to reduce the trouble for later users.



Go to the Godaddy management background> databases> sqlserver> Create Database



Here, the sqlserver database is created. In the "allow direct database access" option on the right side of the page, select "yes" to allow remote connection to the database, set the "SQL Server database/User Name" username and password. After the password is created, the "host name" address is displayed.



Okay. Open the SQL Server Query analyzer on the Local Computer and fill in the above parameters. The connection is successful. Haha.



This is what I will do next. I use the Enterprise Manager to execute SQL scripts everywhere in the database to be uploaded locally, and then run them directly through the query analyzer. For the first time, I did not succeed, if the error message shows that you do not have the user permission, re-view the SQL script and replace all the original usernames with DBO, I want to add users defined in SQL scripts to schemas through the Godaddy SQL Server Web Admin management background, but I did not try this step. After completing the preceding steps, run the SQL script again through the query analyzer. The created table and stored procedure are displayed on the Godaddy SQL Server Web Admin Management page, my work is half done.



Next, open the Enterprise Manager and export the data to the Godaddy sqlserver server. My local database backup file is about 120 MB, and the maximum number of table records is about 68000, data export takes 50 minutes.



The above is my upload process, which is mainly for new users to save everyone's time. In fact, Godaddy MSSQL is not as troublesome as many people have said. The above is my database upload process, but I also want to give you some tips:



1. Try to use nvarchar or ntext as the data type of text fields in the database. Do not select varchar as the data type. This is precisely why many people display question marks in Chinese on the page, this should be done locally before the database is uploaded.



2. There is no problem with the data type. The page still displays garbled characters. There are also many related posts in this forum. My website is developed using ASP, and this problem is also encountered, the solution is to add <% @ codePage = "936" %> to the header file. Some users only add <% @ Language = "VBScript" %>, you can change it to <% @ Language = "VBScript" codePage = "936" %>



3. Chinese character string variables are often prone to problems in use. You can add n before the variable to perform forced conversion of data types. The Code is as follows:

Conn. Execute ("select * from [user] Where name like '%" & T2 & "% 'order by id desc ")



During use, it is found that the query numbers or English are correct, but there are no records in the query Chinese. This is because the data type is ignored by sqlserver, Which is changed to the following:

Conn. Execute ("select * from [user] Where name like n' %" & T2 & "% 'order by id desc ")

Well, it's done.



Godaddy Official Website: www.godaddy.com

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.