연결된 서버는 SQL Server가 원격 데이터 소스에서 데이터를 읽고 원격 데이터베이스에서 명령어를 실행할 수 있는 기능을 제공합니다. 이 페이지에서는 Cloud SQL 인스턴스 권한, 연결된 서버를 구현할 때 고려해야 할 사항 및 연결된 서버 사용의 제한사항에 대한 정보를 제공합니다.
연결된 서버 인스턴스 권한
연결된 서버를 설정하려면 다음 인스턴스 및 사용자 권한이 필요합니다.
ALTER ANY LINKED SERVER: Cloud SQL은 인스턴스에 cloudsql enable linked servers 플래그를 추가할 때 이 권한을 부여합니다.
ALTER ANY LOGIN: Cloud SQL은 Cloud SQL 인스턴스의 관리 권한 사용자에게 이 권한을 자동으로 부여합니다. 이 권한을 사용하면 Cloud SQL의 로그인과 연결된 서버의 보안 계정 간의 매핑을 만들 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-19(UTC)"],[],[],null,["# About linked servers\n\n\u003cbr /\u003e\n\nMySQL \\| PostgreSQL \\| SQL Server\n\n\u003cbr /\u003e\n\nLinked servers give SQL Server the ability to read data from remote data sources\nand execute commands on remote databases. This page provides information about\nCloud SQL instance permissions, things to consider when implementing linked\nservers, and the limitations of using linked servers.\n\nLinked server instance permissions\n----------------------------------\n\nTo set up linked servers, you need the following instance and user permissions:\n\n- `ALTER ANY LINKED SERVER`: Cloud SQL grants this permission when you add the `cloudsql enable linked servers` flag to your instance.\n- `ALTER ANY LOGIN`: Cloud SQL automatically grants this permission to the administrative user for the Cloud SQL instance. This permission allows you to create a mapping between a login on Cloud SQL and a security account on a linked server.\n\nFor a list of the default permissions available for Cloud SQL instances, see\n[Default SQL Server users](/sql/docs/sqlserver/users#default-users).\n\nFor information about how to grant the `ALTER ANY LINKED SERVER` or `ALTER ANY\nLOGIN` permission to additional accounts, see the example at [Granting server\npermissions](/sql/docs/sqlserver/users#grant-command).\n\nConsiderations when using linked servers\n----------------------------------------\n\nThis section has recommendations for handling security, performance, and\nreliability on linked servers.\n\n### Security\n\nTo mitigate potential\n[security vulnerabilities](https://www.netspi.com/blog/technical/network-penetration-testing/how-to-hack-database-links-in-sql-server/),\nyou need to ensure that linked servers have strong security protocols in place,\nsuch as the following:\n\n- Implement appropriate authentication and authorization mechanisms, such as [SSL encryption](/sql/docs/sqlserver/configure-ssl-instance).\n- Implement strict [password policies](https://learn.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver16).\n- Ensure that only authorized users have access to the linked server.\n- Ensure that sensitive data is properly encrypted and secured.\n- Ensure that logins only have access to the resources that you use during the configuration.\n\n### Performance\n\nThere are a few factors that might impact performance on linked servers:\n\n- Linked servers can introduce latency and degrade performance when queries are complex, depending on the volume of data each server transfers. This can cause problems for applications that require real-time data synchronization.\n- When you use linked servers to run a query, a database engine creates a new connection and fetches data for every query you run. Data isn't cached and the server might [copy the entire table across the network](https://www.brentozar.com/archive/2021/07/why-are-linked-server-queries-so-bad/) every time you use a linked server.\n- Cloud SQL can't [create an optimized execution plan](https://datasteve.com/2020/04/02/linked-server-in-sql-server-the-good-the-bad-and-the-way-to-make-it-perfect/) for the remote server because it doesn't know how the remote server handles indexes and statistics.\n\nTo optimize performance, do the following:\n\n- Carefully design your queries and ensure that only the necessary data is being transferred between servers.\n- Leverage the [SQL Server distributed queries\n feature](https://learn.microsoft.com/en-us/host-integration-server/core/query-processor2).\n- Distribute queries across multiple servers.\n- Regularly monitor and optimize your linked server configuration to help ensure that it's running smoothly.\n\n### Reliability\n\nAny interruptions or failures in the link between servers can lead to\nsignificant downtime and potentially cause data loss.\n\nTo ensure reliable operation, it's important to implement appropriate failover\nand redundancy mechanisms. This can include the following:\n\n- Implement a backup linked server for failover.\n- Monitor server availability and performance.\n- Regularly test and validate your linked server configurations.\n\nLimitations\n-----------\n\nLinked servers for Cloud SQL have the following limitations:\n\n- Linked servers can't use data sources other than SQL Server.\n- Active Directory Authentication isn't available for linked Servers.\n- If you're using Private Service Connect to connect to a Cloud SQL instance, then you need to [enable Private Service Connect outbound connectivity](/sql/docs/sqlserver/about-private-service-connect#psc-outbound) to use linked servers.\n\nFor a full list of limitations for linked servers, see [Unsupported features \\&\nservices](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-editions-and-components-2019?view=sql-server-ver16#Unsupported).\n\nWhat's next\n-----------\n\n- Learn how to [enable, add, and configure linked\n servers](/sql/docs/sqlserver/manage-linked-servers)."]]