Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

overwritten the syssegments view

Posted on 2006-07-24
5
Medium Priority
?
825 Views
Last Modified: 2008-02-01
i have overwritten the syssegments view. is this good or bad? can i just replace it with the same view from the master database?
0
Comment
Question by:stephen_rota
  • 4
5 Comments
 
LVL 23

Expert Comment

by:apresto
ID: 17168451
Hi stephen_rota,

Thats not good, you shouldnt overwrite ANY of the system objects

Apresto
0
 
LVL 23

Expert Comment

by:apresto
ID: 17168463
I misunderstood, thought you said you overwrote the one in master db - you can copy the master one over the top, should be identical
0
 
LVL 23

Expert Comment

by:apresto
ID: 17168483
...but anyway why would you want to overwrite the syssegments view?
0
 

Author Comment

by:stephen_rota
ID: 17175241
i did that by mistake i though i was changing another view, i noted the strage union etc in the view but continued anyway. the strange thing is that i tryed to change it again but it did not let me. i will copy the one from master then 10x.
0
 
LVL 23

Accepted Solution

by:
apresto earned 375 total points
ID: 17175251
try to edit if from query analyser:

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

ALTER  VIEW syssegments (segment, name, status) AS
      SELECT  0, 'system'     , 0  UNION
      SELECT      1, 'default'    , 1  UNION
      SELECT      2, 'logsegment' , 0

GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question