Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 how to drop a database from specified location

Author  Topic 

udaymahajan
Starting Member

17 Posts

Posted - 2008-06-02 : 05:26:30
Hi i m Uday,i want to delete ie Drop a database from specified location
for this i used this query as
DROP DATABASE AdventureWorks1,'C:\Sql_dB_creator\sqlDB_creator\App_Data\AdventureWorks1'
but i gives incorrect syntax error.

So plz give the sql query to Drop a Database from specified path

Thank You

uday

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-06-02 : 05:35:17
No need to specify physical filename for database.

DROP DATABASE AdventureWorks1 ;

is enough.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

udaymahajan
Starting Member

17 Posts

Posted - 2008-06-02 : 05:50:29
quote:
Originally posted by Peso

No need to specify physical filename for database.

DROP DATABASE AdventureWorks1 ;

is enough.



E 12°55'05.25"
N 56°04'39.16"




Hi i m Uday,i know this sql query to remove database,but requirement is that database should be deleted from the specified path
If u have any solution for this query then u can send
Thank You

uday
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-06-02 : 06:05:51
Dropping the database deletes the physical file as well.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -