Hi,
Thanks for your question, on MS Q&A portal.
You can parameterize the database name. While creating linked service, you have the option to mention the server name, database name dynamically. Please check the below screenshot, when you click on the add dynamic content, you will get option to create a parameter.
Click on the + icon to create a new parameter by giving name and default value of parameter
Finally upon mentioning the name and default value of the parameter, you will be able to use the created parameter as below
Once we have parameterized the database name, whenever this linked service is used in any data set, you will be prompted to provide the value of dbname during run time. The value can then be passed on from pipeline to dataset through data set parameter.
Please let us know if it works. Please note that, you cannot parameterize part of the secret key. You can opt to store the credential alone in the secrets if need be, not the connection string, if it has to be parameterized.