ERROR 24011 Data source is not registered with the server and data will be copied to the server
Referenced means you update SQL server table, online map will automatically updated.
Copied means you update SQL server table, online map will NOT get update, until you re-publish again copy updated info from SQL server to portal again.
Old ESRI document
https://enterprise.arcgis.com/en/server/10.3/publish-services/windows/24011-data-source-is-not-registered-with-the-server.htm#:~:text=The%20reason%20for%20this%20is,geodatabase%20registered%20with%20the%20server.
New ESRI document
https://pro.arcgis.com/en/pro-app/latest/help/sharing/analyzer-warning-messages/24011-data-source-is-not-registered-with-the-server-and-data-will-be-copied-to-the-server.htm
SQL server connection are using Windows authentication, while registared data store connection are using SQL server management authentication. That cause the error.
Step 1. check database connection authentication mode
Step 2. Check Registered Data store on arcgis server database connection authentication mode
Step 3. Warning each layer source could use different SQL server connetion authentication mode. Each layer SQL server connection authentication mode does not nessecary be the same as your database connection mode. In my case, my school layer is using SQL server management authentication instead of Windows authentication, which is different from registered data store on arcgis server connection authentication mode( windows authentication), That cause the error.
Step 4. you must save pro project and re-open before you reset datasource, otherwise, you will get error,
A check constraint violation has occurred.
Step 5. reset data source as windows authentication
Step 6. reset data source for all layers.
Step 7. Warning: Due to arcpro bug or whatever, you maybe need to save close project and re-open. Even copy paste whole arcpro project folder rename it. Otherwise, all above change will not take effect. ArcPro just failed to save SQL connection authen mode change.
Step 8. Error fixed. Successfully published.
Step 9. verify on arcgis server, it is reference, not copied.
Step 10. live map
https://transparentgov.net/json2tree/datahub.io/usgs/explore.html?backgroundlayerurl=https%3A%2F%2Fgis1.victorvilleca.gov%2Farcgis%2Frest%2Fservices%2FPublic%2FSchools_in_Victorville_CA%2FMapServer%2F0&layer=Schools&_center_zoom=15&_center_lat=34.54182451842289&_center_long=-117.32889764259595
https://transparentgov.net/json2tree/esri/server2/folder.html?org=https%3A%2F%2Fgis1.victorvilleca.gov%2Farcgis%2Frest%2Fservices&url=https%3A%2F%2Fgis1.victorvilleca.gov%2Farcgis%2Frest%2Fservices&arcgis_online_token=&select_folder=14&select_layer=0