How to get Database name of a specific Database in a stored procedure.
Step 1 -Open a command prompt window on the machine in which SQL is installed. Go to Start → Run, type cmd, and hit enter to open the command prompt. Step 2 -SQLCMD -S servername\instancename (where servernameb= the name of your server, and instancename is the name of the SQL instance). The prompt will change to 1→.
Database cloning is the process of creating a point-in-time copy of a production database or its backup set.
To get the current database name use select db_name()
.
DB_NAME(Transact-SQL)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With