Hello,
First try to register your database connection using Arc Catalog or server manager as above mentioned.
To make connection you need check database client is installed on ArcGIS server system.
After that you need to create version to have feature access as map services for editing.
After all that you are able to create or publish map service.
Publish a feature service from ArcMap—Documentation | ArcGIS Enterprise
Configure a database connection for ArcGIS Server—Documentation | ArcGIS Enterprise