I know I've done this before and I can't find, and it's kinda of foggy here today...
anyone see anything with this
EXEC sp_addlinkedserver
'PAERSCBVD0045',
N'SQL Server'
Connect as X002548 since logins are on both serves
*/
-- Tables in 14 not in 45
SELECT S14.TABLE_NAME
FROM INFORMATION_SCHEMA.Tables S14
LEFT JOIN INFORMATION_SCHEMA.PAERSCBVD0045.dbo.MEP.Tables S45
ON S14.TABLE_SCHEMA = S45.TABLE_SCHEMA
AND S14.TABLE_NAME = S45.TABLE_NAME
WHERE S45.TABLE_SCHEMA = IS NULL
AND S45.TABLE_NAME = IS NULLOK, syntax is
SELECT *
FROM PAERSCBVD0045.MEP.INFORMATION_SCHEMA.Tables S45
But now I get
Server: Msg 18452, Level 14, State 1, Line 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
And I know the put me in as windows login as sa
I tried
EXEC sp_addlinkedsrvlogin 'X002548'
But got
Server: Msg 823, Level 24, State 2, Procedure sp_addlinkedsrvlogin, Line 1
I/O error (torn page) detected during read at offset 0x00000000786000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL\data\master.mdf'.
Connection Broken
Which doesn't look good, so I did a checkdb on the linked server and got no errors
Maybe masters got a problem on mine
Wonder if it's a collation thing|||Ah, OK, Not sure if this is the problem, but master on my box has consistencey errors
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 6, index ID 0: Page (1:963) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 0, page (1:963). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
DBCC results for 'master'.
DBCC results for 'sysobjects'.
There are 1269 rows in 23 pages for object 'sysobjects'.
DBCC results for 'sysindexes'.
There are 104 rows in 4 pages for object 'sysindexes'.
DBCC results for 'syscolumns'.
There are 4851 rows in 84 pages for object 'syscolumns'.
DBCC results for 'systypes'.
There are 26 rows in 1 pages for object 'systypes'.
DBCC results for 'syscomments'.
There are 2011 rows in 945 pages for object 'syscomments'.
CHECKDB found 0 allocation errors and 2 consistency errors in table 'syscomments' (object ID 6).|||OK, more succienct messages
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 6, index ID 0: Page (1:963) could not be processed. See other errors for details.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID 6, index ID 0, page (1:963). Test (IS_ON (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
CHECKDB found 0 allocation errors and 2 consistency errors in table 'syscomments' (object ID 6).
CHECKDB found 0 allocation errors and 2 consistency errors in database 'master'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (master ).
It appears to be in syscomments. Great lo these many years and finally a system problem. Can I fix a system table?|||Sure you can. With a master rebuild, of course. And you do have a backup around, don't you? ;-)|||Of course. I found the earliest and made a copy and saved it locally
But I don't think that's really causing my linked server problem, but this is the first time I've ever seen this
And these are more like warning no?
Maybe I should bounce the box and see what happens
Showing posts with label kinda. Show all posts
Showing posts with label kinda. Show all posts
Wednesday, March 28, 2012
Friday, March 9, 2012
indexes out of date
What does it mean when they say indexes are out of date wrt the query
optmiser ? How do you keep them to date ? Kinda confusedSee Distribution Statistics in bol.
The statistics may be out of date so that the optimiser
does not have correct data on the data distribution of
data to select a plan.
Also indexes may get fragmented and need rebuilding.
>--Original Message--
>What does it mean when they say indexes are out of date
wrt the query
>optmiser ? How do you keep them to date ? Kinda confused
>
>.
>|||Hello Hassan !
Look here:
http://doc.ddart.net/mssql/sql70/tun_1_19.htm
Especially in "Auto update", or manual "UPDATE STATISTICS".
HTH, Jens Süßmeyer.|||We are also talking about regular index maintenance... look for dbcc
dbreindex, dbcc indexdefrag, and dbcc showcontig in books online. These
areas discuss other index tuning and maintenance which must be done.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OzEzlizbDHA.1488@.TK2MSFTNGP12.phx.gbl...
> What does it mean when they say indexes are out of date wrt the query
> optmiser ? How do you keep them to date ? Kinda confused
>
optmiser ? How do you keep them to date ? Kinda confusedSee Distribution Statistics in bol.
The statistics may be out of date so that the optimiser
does not have correct data on the data distribution of
data to select a plan.
Also indexes may get fragmented and need rebuilding.
>--Original Message--
>What does it mean when they say indexes are out of date
wrt the query
>optmiser ? How do you keep them to date ? Kinda confused
>
>.
>|||Hello Hassan !
Look here:
http://doc.ddart.net/mssql/sql70/tun_1_19.htm
Especially in "Auto update", or manual "UPDATE STATISTICS".
HTH, Jens Süßmeyer.|||We are also talking about regular index maintenance... look for dbcc
dbreindex, dbcc indexdefrag, and dbcc showcontig in books online. These
areas discuss other index tuning and maintenance which must be done.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OzEzlizbDHA.1488@.TK2MSFTNGP12.phx.gbl...
> What does it mean when they say indexes are out of date wrt the query
> optmiser ? How do you keep them to date ? Kinda confused
>
Subscribe to:
Posts (Atom)