上载现有数据库 [英] Uploading an existing database

查看:128
本文介绍了上载现有数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图上传我的ASP.NET网站的数据库.在本地计算机上,如果我从另一台计算机复制数据库,则必须通过SQL Server Management Studio附加数据库,然后在连接字符串中使用它,例如


我的数据库是大约.目前大小为10 MB.如果我通过ftp将其上传到App_Data文件夹,该如何附加该数据库?

在Plesk中,我可以选择创建数据库及其用户(如屏幕截图所示):

1)Web应用程序和服务-Plesk
![替代文本] [1] [![alt文本] [2] [![替代文本] [3] [![替代文字] [4] [ Your_Database_Name; UserId =您的用户名; Password =您的密码;"

用于编码的服务器名称:localhost
目录/数据库名称,数据库用户和数据库密码
您将需要使用plesk控制面板创建自己的文件

对于上载现有数据库所需采取的步骤,我将深表感激.我如何附上它?我必须使用什么连接字符串?
谢谢!

Hi,

I was trying to upload the database of my ASP.NET website. On the local machine, if I copy the database from another machine, I have to attach it through SQL Server Management Studio and then use it in the connection string like


My database is approx. 10 MB in size for now. If I upload it via ftp to App_Data folder, how would I have to attach this database?

In Plesk, I have the option to create the database and its user (as shown in the screenshots):

1) Web Applications and services-Plesk
![alt text][1][^]

2) Add New Database
![alt text][2][^]
and add new database user

3) Webadmin>ASP.ET Enterprise Manager
![alt text][3][^]

But this is for the new database I created. My problem is to upload an existing one.

There''s also a section in Plesk for ASP.NET settings (as shown below)
![alt text][4][^]
This has the option to change the connection string etc.

I also asked my hosting provider about the method to be followed for attaching the database that I would upload. This was the reply in quote.

mdf ldf files perhaps will be working at your local computer but this way database of mssql will not work on web server as on web server you will be required to create and restore your database backup file using plesk control panel.

Sample connection string for asp.net mssql `Standard Security`:
"Provider=SQLOLEDB;Data Source=Your_Server_Name;Initial Catalog=
Your_Database_Name;UserId=Your_Username;Password=Your_Password;"

Server name to be used in coding: localhost
Catalog/ database name , database user and database password
you will be required to create your own using plesk control panel

I would be really be appreciative for the steps I have to take to upload my existing database. How do I have attach it? What connection string I have to use?
Thanks!

推荐答案

他们告诉您您不上传它:您使用plesk控制面板创建数据库(大概他们已经为您可以执行此操作).然后,您将在任何脚本中运行,并根据需要填充任何参考/测试数据.创建数据库后,您可能可以使用SQL Management Studio连接和管理数据库.重新阅读他们提供的说明,并查看他们提供的任何常见问题解答-这里的任何人几乎都不可能知道对于未知Web主机需要采取的确切步骤.
They are telling you that you don''t upload it: you use the plesk control panel to create a database (presumably they have provided an interface for you to do this). You would then run in any scripts and populate any reference/test data as required. It may be that once the database is created you can use SQL Management Studio to connect to and administer the database. Reread the instructions they have provided and take a look at any FAQs they provide - it is almost impossible that anyone here would know the exact steps you need to take for an unknown web host.


这篇关于上载现有数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆