Unix Technical Forum

Mapping image pointers to page numbers

This is a discussion on Mapping image pointers to page numbers within the SQL Server forums, part of the Microsoft SQL Server category; --> Is there a way to convert an image pointer to a page ID that could be used in DBCC ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 04:25 AM
ScottYoder
 
Posts: n/a
Default Mapping image pointers to page numbers

Is there a way to convert an image pointer to a page ID that could be
used in DBCC page

i.e.

select TEXTPTR(document)FROM testdocs where id = 1
resturns
0xFEFF3601000000000800000003000000

select convert(int,TEXTPTR(document)) FROM testdocs where id =1
returns
50331648

dbcc page (9,3,8,1)
dumps the first page of the image


I am trying to map 0xFEFF3601000000000800000003000000 - > page
number 8

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 04:27 AM
Simon Hayes
 
Posts: n/a
Default Re: Mapping image pointers to page numbers


"ScottYoder" <scott.yoder@ngc.com> wrote in message
news:f03d8889.0410011322.6ab77061@posting.google.c om...
> Is there a way to convert an image pointer to a page ID that could be
> used in DBCC page
>
> i.e.
>
> select TEXTPTR(document)FROM testdocs where id = 1
> resturns
> 0xFEFF3601000000000800000003000000
>
> select convert(int,TEXTPTR(document)) FROM testdocs where id =1
> returns
> 50331648
>
> dbcc page (9,3,8,1)
> dumps the first page of the image
>
>
> I am trying to map 0xFEFF3601000000000800000003000000 - > page
> number 8
>
> thanks


I don't think so - according to BOL, TEXTPTR returns a pointer to the root
of an internal pointer tree. So just having the root pointer may not be
enough to find all the pages in the image, if the internal pointer tree is
not accessible in any way.

"Inside SQL Server 2000" pp 260-266 discusses text/image storage - it might
be useful if you haven't read it already. You seem to be doing something
quite unusual, so if you can give some more details about what your real
goal is, someone might have a better answer.

Simon


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:00 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com