Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们的应用程序托管在多层环境中。当应用程序服务器创建与 SQL Server 的连接时,它会在其默认数据库(假设 xyz)上打开连接,但是当使用相同连接字符串的数据服务器在默认数据库和主数据库上打开连接时。
有什么理由吗。有任何想法吗 ?
检查数据服务器上的连接属性。驱动程序(OLEDB、ODBC、ADO.NET)都应该能够识别它们连接到的默认数据库。我的猜测是,由于驱动程序属性,数据服务器驱动程序默认连接到主数据库。