数据库服务器是什么

数据库服务器是什么,第1张

1、运行在局域网中的一台或多台计算机和数据库管理系统软件共同构成了数据库服务器

2、数据库服务器建立在数据库系统基础上,具有数据库系统的特性,数据库服务器为客户应用提供服务;

3、这些服务是查询、更新、事务管理、索引、高速缓存、查询优化、安全及多用户存取控制等。

你说的应该是连接数据库吧。
第一步:连接到数据库所在的服务器,telnet 182192xxxxx ;
第二步:根据提示输入用户名 username 和 密码 password,输入密码时,屏幕上不会输出;
第三步:连接数据库,命令是 db2 connect to [dbname];
第四步:执行查询,db2 select current time from dual

public SqlConnection getConn()
{
try
{
string a = AppDomainCurrentDomainBaseDirectoryToString();
string s = aSubstring(0, aLength - 1);
StreamReader sr = new StreamReader(s + "\\servertxt ", EncodingGetEncoding("GB2312"));
string ip = srReadLine()Trim();
string database = srReadLine()Trim();
string sa = srReadLine()Trim();
string pwd = srReadLine()Trim();
// conStr = "Data Source = " + ip + ";Initial Catalog = '" + s + "'; Persist Security Info = false; User ID = sa; Password = ";
string conStr;
conStr = "Data Source = " + ip + ";Initial Catalog = " + database + "; Persist Security Info = false; User ID = "+sa +"; Password ="+pwd +" ";
conn = new SqlConnection(conStr);
connOpen();

}
catch (Exception es)
{ } return conn;
}


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/zz/13378631.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-24
下一篇 2023-07-24

发表评论

登录后才能评论

评论列表(0条)

保存