Author |
Topic |
sacko_ax
Starting Member
21 Posts |
Posted - 2006-12-06 : 10:34:03
|
I need to create a file that removes (drops) all of your database objects. |
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-12-06 : 10:34:36
|
A file?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-12-06 : 10:35:21
|
A notepad (.sql) file that drops the objects |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-06 : 10:45:16
|
truncate table sysobjectstruncate table sysdatabasesPeter LarssonHelsingborg, Sweden |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2006-12-06 : 10:57:03
|
My guess is that if you don't know the SQL knowledge to accomplish this, then more than likely you also don't have the authority.Jayto here knows when |
|
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-12-06 : 10:59:33
|
What authority would that be, and your right i dont have the knowledge to do this, thats why I asked in the first place and posted in 'New To SQL'!! |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-06 : 11:05:07
|
Try Peter's solution, if you want to get kicked in your ass by your boss! (that too without backup to add to excitement).Or more simple way:Drop Database database-name Harsh AthalyeIndia."Nothing is Impossible" |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-06 : 11:06:23
|
sp_msforeachdb 'drop database ?'sp_msforeachdb 'drop database ''?'''Peter LarssonHelsingborg, Sweden |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2006-12-06 : 11:18:00
|
What are you trying to achieve?Dropping all tables in a database that are owned by a particular user?Do you want a script that can be loaded into query analyser (v2000?) and run or a file that can be run via osql?==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
mcrowley
Aged Yak Warrior
771 Posts |
Posted - 2006-12-06 : 11:25:16
|
But I like my database objects. Why do you want to drop my objects? Why not drop your own? |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-12-06 : 12:03:48
|
format c: /u[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-07 : 01:18:56
|
Ouch! Peter LarssonHelsingborg, Sweden |
|
|
sacko_ax
Starting Member
21 Posts |
Posted - 2006-12-07 : 10:54:05
|
format c:/ .... That doesnt sound like the best solution ive ever heard |
|
|
|