January 2025 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Tags
-
Recent Posts
Categories
Tag Archives: checkDbexist
Check existing databases then create
— CHECK existing databases for existence. if exists (select * from master..sysdatabases where name = ‘dbName’ ) drop database dbName GO create database dbName on primary (name = ‘dbName’, filename = ‘C:\data\dbName.mdf’), log on (name = ‘dbNameLOG’, filename = ‘C:\data\dbName.ldf’) … Continue reading
Posted in SQL, Tools and Tricks
Tagged checkDbexist
Comments Off on Check existing databases then create