We have a requirement where DB can be on Oracle or SQL server. We have same DB structure in both the environments. I have one dashboard which is developed using SQL server. Once we publish the dashboard, is there any option I can switch the databases from SQL to oracle on Tableau Server.
Once dashboard is published, I dont have desktop to change the data connection or datasource.
Not once you have published -- at that point you can only change the connection string (username/password, server, etc.)
You can switch back and forth between data sources while in Desktop, though (Data | Replace Data Source). This would allow you to create the report against one data source, then switch it to a different one before publishing.
Hope this helps!