Tag: Data does not have an SDN OSS structure single ASP script name
Development colleagues say that when a stored procedure executes to the Pm_x table, it throws "a serious error occurred in the current command." Any error that may result "shall be waived;
Log in to the SQL Server database and look at the number of rows and sizes of this table first:
exec spaceused ' pm_x ', just hundreds of thousands of rows, hundreds of trillion, not big, really small.
Then select * Into #nb from pm_x, also directly error, suspect this table structure error, cause the table can not scan full table, so need to repair it.
Because this system database is critical and its associated business is complex, you can limit the contact with the business database to which it is contacted by changing the IP of this server , and then execute the following script:
Use pmdeclare @dbname varchar (255) Set @dbname = ' PM ' exec sp_dboption @dbname, ' Single user ', ' true ' DBCC CHECKTABLE (' pm_x ', Repair_allow_data_loss) exec sp_dboption @dbname, ' Single user ', ' false ' then, wait a moment, execute successfully, then select * from Pm_x, no more error, Development of stored procedures can also run normally. Guess, this kind of table error, feel like Oracle's logical bad block, but found that SQL Server does not have this record bad block view.
in operations, there are two kinds of operations called "big strokes"--restarting the server; replacing the IPFor the meaning of the DBCC CHECKTABLE parameter, see the official documentation: Https://msdn.microsoft.com/zh-cn/library/ms174338.aspx.
SQLserver2008 A critical error has occurred with the current command. Any results that may be produced should be discarded