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.
| Author |
Topic |
|
SQLCode
Posting Yak Master
143 Posts |
Posted - 2008-08-14 : 09:21:49
|
| Hi I was wondering if there is a way to add a sample table on all databases of current server for SQL 2005 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2008-08-14 : 09:24:43
|
you mean create a table in all database ?just run the create table script in each database one by one. Or are you looking for a solution to do this automatically for all database ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2008-08-14 : 09:53:30
|
install the SsmsToolsPack from my signature and use the "Run on multiple targets" feature _______________________________________________Causing trouble since 1980Blog: http://weblogs.sqlteam.com/mladenpSpeed up SSMS development: www.ssmstoolspack.com <- version 1.0 out! |
 |
|
|
SQLCode
Posting Yak Master
143 Posts |
Posted - 2008-08-14 : 09:58:10
|
| yes, looking for a solution to do this automatically for all databases |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-08-14 : 10:11:56
|
A good thing I don't charge royalties for that, Spirit1 The tool is the better way to to this, in favor of this undocumented stored proceduresp_msforeachdb 'CREATE TABLE dbo.Huh (i INT)' E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|