Viewing 11 posts - 1 through 11 (of 11 total)
Lynn Pettis (4/18/2013)
mike.hamilton721 (4/18/2013)
insert into #DBID (LogicalName,BindingID)
EXEC ('DBCC fileheader('+@dbid+')')
But that gives me "column name or number of supplied values...
April 18, 2013 at 11:22 am
Tried one more thing.. Not sure if I'm closer or farther away:
insert into #DBID (LogicalName,BindingID)
EXEC ('DBCC fileheader('+@dbid+')')
But that gives me "column name or number of supplied values does not match...
April 18, 2013 at 9:34 am
Ed Wagner (4/18/2013)
Then fire something similar to the following to populate it.
EXECUTE sp_msforeachdb...
April 18, 2013 at 8:44 am
Lynn Pettis (4/17/2013)
I can see the problem, you have an extra single before the cast and before the final + sign.Look at what I had posted earlier.
EXEC ('DBCC fileheader(' +...
April 18, 2013 at 7:34 am
Lynn Pettis (4/17/2013)
mike.hamilton721 (4/17/2013)
April 17, 2013 at 5:11 pm
Thank you Lynn. I tried that new EXEC you listed (missing a ' ?), and I thought I added it in the right spot. But I'm not sure...
April 17, 2013 at 4:21 pm
Alright. Played around (and Googled), and came up with this:
DBCC traceon (3604);
drop table #DBID
Create table #DBID (
Name nvarCHAR(256)NULL,
LogicalName nvarCHAR(256)NULL,
BindingID nvarCHAR(256)NULL)
declare @db varchar(256),
@dbid int,
@hidb int
select @hidb = MAX(dbid),
@dbid = 5
from...
April 17, 2013 at 3:50 pm
Hmm, does that work with sp_msforeachdb? It's not liking what I'm putting in... Thank you for all the help!!!
April 11, 2013 at 2:38 pm
Thanks! Is there a way to compile all of the msforeachdb dbCC fileheader results into 1 page with just those 2 columns (I can't figure out how to do...
April 11, 2013 at 1:28 pm
I need to pull the logicalname and bindingid fields from fieldheader on multiple DBs, and place them in a text file. It looks like Windows Powershell might be able...
April 11, 2013 at 5:07 am
Thanks! Well I'm trying to combine all of my results from a exec sp_msforeachdb 'dbcc fileheader(?)' into 1 table so I can just select 2 of the columns instead...
April 10, 2013 at 3:45 pm
Viewing 11 posts - 1 through 11 (of 11 total)