Dear all,
How to drop SQL Server Database by using VbScript? .. please advise
Regards
Winanjaya
Printable View
Dear all,
How to drop SQL Server Database by using VbScript? .. please advise
Regards
Winanjaya
What do you mean by 'dropping' a database?
Look into the SQL-DMO.
"Dropping" in SQL usually refers to "Delete". I assume he wants to delete Delete an SQL server DataBase.Quote:
Originally Posted by aidan
Are you sure you want to perform this kind of action using VBScript?Deleting a entire db is a bit dangerous and should be done manuallu.
But if thats what you want use ADO...
Here is an article which discusses about Dropping DB.
http://www.aspfree.com/c/a/MS-SQL-Se...2000-Part-3/2/
Actually, when he said drop, I assume he means he wants to detach it, not delete it.
If its "Detaching" then there is a built in stored proc that comes in master Database, one just need to pass the Database name to detach.Quote:
Originally Posted by SeanGrebey
Though "Drop" usually means Delete, there is a SQL Command called Drop which can be used to Delete Database(IN SQL Server), Table etc.