Godaddy的asp空間可通過DPW發布MS SQL資料庫

來源:互聯網
上載者:User
 前段時間購買了godaddy的Deluxe
Plan主機,大大小小網站一下子全都放上去了,差不多10來個,運行近一個月來,還算不錯,到目前為止還沒發現過宕機情況,並且所在共用IP也一直正
常,沒有被封。另外,有一個的好訊息,目前godaddy已經全面升級主機計劃,將Deluxe
Plan的儲存空間從100G升級到150G,而流量也從1000G升級到1500G,很划算吧。不過,Godaddy也有一個讓人頭痛的問題,就是MS
SQL資料庫。

  之前關注的焦點一直是Godaddy的空間、流量、國內訪問速度、售後問題,這幾個看起來都還不錯,而忽略了MS
SQL資料庫匯入問題。我通過後台建立了一個MS
SQL資料庫,但發現不能通過遠端控制進行發布,也不能通過備份bak的方式直接恢複。必須轉成csv才能匯入資料庫。非常麻煩,而且操作起來成功的幾率
也小。最後考慮是不是可以通過在其他服務商那裡購買MS
SQL資料庫然後,網頁存放在Godaddy空間,進行遠端連線。答案是否定的。Godaddy不允許去串連外部的MS SQL資料庫。這下可頭大了。

  網上搜尋了很多資訊,最後得到了比較好的解決方案。Publishing a Database Using the Database Publishing Wizard ,通過微軟的Database Publishing Wizard進行MS SQL資料庫發布。

  想到成功發行集資料庫,請先準備好以下工具:

1、Microsoft .NET Framework Version 2.0

2、Microsoft Core XML Services (MSXML) 6.0

3、Microsoft SQL Server Native Client

4、Microsoft SQL Server 2005 Management Objects Collection

5、Microsoft SQL Server Database Publishing Wizard 1.1

  別猶豫了,這些軟體少了一個都不行,全裝上。注意順序,最好按照上面1、2、3、4、5順序來安裝。

  再接下來就在DPW進行資料庫發布了,您可以看這裡的英文原版操作步驟,也可以按照以下中文步驟進行操作。

 用DPW發布您的資料庫
  1. 開啟DPW用戶端. 如果出現歡迎介面, 勾選“下次進入不再顯示”框.
  2. 點擊 下一步.

  3. 選擇原始伺服器介面中, 輸入您的本地SQL server的串連資訊.

  4. 完成串連資訊, 點 下一步. 進入選擇資料庫, 這裡會顯示你本地的資料庫檔案。

    注意: 如果你沒有看到你要發布的資料庫,就返回到選擇原始伺服器頁面,然後不要更改串連資訊再回到這頁面。如果這一步不行,請聯絡伺服器所有者尋求協助.

  5. 選擇你要發布的資料庫.如果你的資料庫包含禁止的對象,例如 full text catalogs 和 assemblies, 或者你不想發布所有對象, 就不要勾選Script all objects in the selected database.
     
  6. 下一步.
  7. 如果你沒有發布所有對象, 就會出現請選擇物件類型.
      如果你沒有發布所有對象
    1. 選擇需要發布的對象. 

    2. 下一步. 進入對象選擇類型屏. 如果你打算放棄並選擇所有對象,點選擇所有.

    3. 完成對象選擇,進入下一步 . 重複上一部操作指導進入選擇一個輸出位置頁面.
       
  8. 顯示 選擇輸出位置 頁面 (翻譯太費勁,下面的大家就自己摸索著翻譯下吧)

  9. Select the Publish to Shared hosting provider option. Select the appropriate Provider and Target Database from the drop down lists.
     
  10. If you have not yet configured a connection or need to make a new connection, press More. The Hosting Providers dialog displays.

    If You Have Not Configured a Connection
    1. Press New. The Provider Configuration dialog displays.
    2. Enter the following values:
      Name:
      Enter any name to represent the connection to the hosted service. You will enter names for specific databases later.
      Web Service Address:
      Enter
      the URL for the publishing service. The URL can be found in the
      database information section of your hosting control panel.

      Note:
      The service requires a secure (HTTPS) connection to protect data. If
      you attempt to connect using a non-secure connection, the connection
      will fail and you will be prompted to use a secure connection.

      User name:
      Enter your FTP account user name.
      Password:
      Enter your FTP account password.

      Note:
      Checking “Save Password” causes the application to store your password
      locally. If this is a public or shared machine, this may not be a
      secure choice.

    3. To enter a database, press New. This displays the Database dialog.
    4. Enter
      the appropriate configuration values. The configuration values can be
      found in the database information section of your hosting control
      panel.
      Server Name:
      Enter the full path to the database server.
      Database Name:
      Enter the name of your hosted database.

      Note:
      The database must be owned by the FTP account entered in the provider
      configuration. If you have multiple hosting accounts, be sure to use
      the correct credentials when configuring the Publishing Wizard.

      User Name:
      Enter your database user name. This is the same user name used to access the SQL Web Manager.
      Password:
      Enter your database password. This is the same password used to access your SQL Web Manager.

      Note: Checking Save Password causes the application to store your password locally. If this is a public or shared machine, this may not be a secure choice.

    5. Click OK
      to complete the database set-up. Repeat this step for each database you
      want to configure. If you have multiple databases owned by a single
      hosting account, they can all be entered under a single hosting
      provider entry.
    6. When you have completed entering databases, click OK on the Provider Configuration dialog to return to the Hosting Providers list. You can test your connection settings by pressing Test. This feature validates the connection to the web service but does not test connectivity to the database itself.
    7. Click OK to return to the Select an Output Location dialog. If the appropriate provider and database are not selected, select them in the drop down lists.
    8. Click Next to advance to the Select Publishing Options
      screen. Before this page is displayed, the service validates the
      configuration settings by connecting to the publishing service and the
      target database. If a connection cannot be established, an error
      message displays and the application remains on the Select an Output Location screen.
  11. The Select Publishing Options page is pre-populated with the appropriate default values. In most cases, these do not need to be modified.
    Drop existing objects in script:
    If True,
    the wizard checks if a published object exists in the database and, if
    found, drops the existing version before publishing.

    Note: Any data contained within dropped objects will be lost.

    If False,
    the wizard does not drop existing objects before inserting or modifying
    their structure. If an object of the type and name specified already
    exists, the wizard proceeds directly to data insertion. If the object
    does not exist, it will be created.

    Note:
    If the target database contains an object of the same name and type but
    with a different structure (for example, a table with a different
    number of columns), a publishing error may occur. Certain conditions
    may not report an error (for example, the database being published
    contains a table with fewer columns than the existing table). In such
    cases, the published database will not exactly match the local database.

    Publish using transaction:
    If True, the database is published as a single transaction. If an error occurs, all changes are rolled back.
    If False,
    published changes are committed as they are published. If an error
    occurs, the database may be left in a partially published state.
    Schema qualify:
    If True, objects are fully schema qualified in the script.
    If False, only the object name is used. It is recommended this option be True.
    Script for target database:
    Specifies
    the version of the target database. This must match the server version
    or publish will fail.  The wizard sets this value to the correct
    version.
    Types of data to publish:
    This section specifies what type of information to publish.
    Schema only publishes the structure of objects.
    Data only populates tables.
    Schema and data publishes the structure of objects and populates tables.

  12. Click Next to advance. This step brings up the Review Summary page, which displays the selected options and configuration. This is the last chance to review before publishing begins.

  13. Click Finish to begin publishing.

The Database Publishing Progress
screen tracks the progress of the publish.  Based on the options
selected, the wizard displays some combination of the following steps:

Gathering List of Objects to script:
The
wizard is communicating with your local SQL Server and determining what
objects must be scripted, including any objects you selected and their
dependencies.
Connecting to web service:
The Wizard is connecting to the web service and establishing a publishing session.
Scripting objects:
The Wizard is performing preliminary scripting of the objects to be published.
Processing:
The
wizard is completing local scripting of an object and transmitting it
to the Web service. The Web service is executing the script against
your hosted database server. The status message updates based on the
specific object being published at a given instance.

The
amount of time to publish a database varies based on complexity of the
database, number of objects, and the amount of data in tables. Most
databases complete publishing in under 30 minutes.

It is possible to abort processing at any point by pressing Stop. If an error occurs, a red link to more details is provided in the Message column. If publishing is aborted or an error occurs, you can use Back to move back through the screens and modify settings.

If publishing succeeds, press Close to close the application. Your database is now transferred to the hosting server and ready for use.

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.