Re: Determine which tables and indexes are in which dbspaces
Posted in 2006
select dbinfo('dbspace', partnum) from systables > I am trying to run a SQL against system tables that will show me which > tables are in each dbspace and then correlate their indexes to see if > the indexes are in the same dbspace. I know have some indexes in > dbspaces that have tables in other dbspaces and want a query that will > show me all of them at once to determine if they are where they should > be or I need to move them. > > sysfragments shows me a indexname and dbspace, but I can't seem to see > where the dbspace for the tables are listed (I can't find it in > systables). > > Thanks, > Randy > > > ------_=_NextPart_001_01C71A2D.D469C480 > Content-Type: text/html > Content-Transfer-Encoding: quoted-printable > X-Google-AttachSize: 1274 > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; charset=us-ascii"> > <META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD> > <BODY> > <DIV><SPAN class=175400618-07122006><FONT face=Tahoma size=2>I am trying to run > a SQL against system tables that will show me which tables are in each dbspace > and then correlate their indexes to see if the indexes are in the same > dbspace. I know have some indexes in dbspaces that have tables in other > dbspaces and want a query that will show me all of them at once to determine if > they are where they should be or I need to move them.</FONT></SPAN></DIV> > <DIV><SPAN class=175400618-07122006><FONT face=Tahoma > size=2></FONT></SPAN> </DIV> > <DIV><SPAN class=175400618-07122006><FONT face=Tahoma size=2>sysfragments shows > me a indexname and dbspace, but I can't seem to see where the dbspace for the > tables are listed (I can't find it in systables).</FONT></SPAN></DIV> > <DIV> </DIV> > <DIV><FONT face="Comic Sans MS" size=2><STRONG>Thanks,</STRONG></FONT></DIV> > <DIV><FONT face="Comic Sans MS" size=2><STRONG>Randy</STRONG></FONT></DIV> > <DIV> </DIV></BODY></HTML> > > ------_=_NextPart_001_01C71A2D.D469C480--