Cyclic Redundancy Check?

Feb 25, 2000

I was trying to modify a table and I got a "data error: cyclic redundancy check"

So I ran a DBCC CHECKDB and got this:

Server: Msg 823, Level 24, State 1, Line 3
I/O error 23(Data error (cyclic redundancy check)) detected during read of BUF pointer = 0x11c902c0, page ptr = 0x14d66000, pageid = (0x1:0x3d), dbid = 26, status = 0x801, file = d:MSSQL7datacontent_Data.MDF.

Connection Broken

This is scary stuff! What does it mean and how do I fix it?

View 2 Replies


ADVERTISEMENT

SQL Server 2008 :: Error 23 - Redundancy Check Failed

Feb 2, 2015

Automated and manual backup done through SQL Management console are failing with error 23 - redundancy check failed.

This is a critical production db. Other db in same instance backs up ok.

Is there a way to fix this?

View 4 Replies View Related

Finding All Minimal Cyclic Paths In The Graph

Oct 1, 2003

Here a code for finding all minimal loops (cyclic paths) in a graph
with vertexes of degree >= 3. Almost obviously that before seeking
for loops we should eliminate from the graph all its vertexes of degree < 3
(degree of a vertex is the number of edges outcoming from the vertex).
Note: there are no any 'parent' - 'child' nodes here. All vertexes are
absolutely equitable.
if object_id('g3')>0 drop table g3
if object_id('g3x')>0 drop table g3x
if object_id('g3y')>0 drop table g3y
if object_id('g3l')>0 drop table g3l
GO
create table g3y(v1 int, v2 int) -- ancillary table
GO
create table g3x(n int, v1 int, v2 int) -- ancillary table
GO
create table g3l(nl int, v1 int, v2 int)
-- table for storing of 'detected' loops
GO
create table g3(v1 int, v2 int)
-- table of test data with pairs of adjoining vertexes
-- each vertex is named by an arbitrary number
GO
insert into g3
select 2, 3 union all
select 2, 4 union all
select 1, 4 union all
select 3, 5 union all
select 5, 6 union all
select 1, 6 union all
select 4, 7 union all
select 6, 8 union all
select 3, 9 union all
select 1, 7 union all
select 2, 7 union all
select 1, 8 union all
select 5, 8 union all
select 2, 9 union all
select 5, 9 ----union all
/*
select 2, 13 union all
select 3, 13 union all
select 13, 14 union all
select 12, 14 union all
select 12, 15 union all
select 11, 15 union all
select 11, 13 union all
select 10, 11 union all
select 10, 12 union all
select 10, 14 union all
select 10, 15
*/
GO
insert into g3 select v2, v1 from g3

declare @i int, @n int, @v1 int, @v2 int
set @i=1

while 0=0
begin
set @n=1
truncate table g3x truncate table g3y
select top 1 @v1=g3.v1, @v2=g3.v2 from g3 left join g3l on
(g3.v1=g3l.v1 and g3.v2=g3l.v2)or(g3.v1=g3l.v2 and g3.v2=g3l.v1)
where g3l.nl is null if @@rowcount=0 break
insert into g3x select @n, @v1, @v2

while @v1<>(select top 1 v2 from g3x order by n desc)
begin
set @n=@n+1
insert into g3x select top 1 @n, v1, v2 from g3 where v2=@v1
and v1<>@v2 and v1=(select top 1 v2 from g3x order by n desc)

if @@rowcount=0
begin
insert into g3x select top 1 @n, v1, v2 from g3 where
v2 not in (select v1 from g3x union all select v2 from g3x) and
v1=(select top 1 v2 from g3x order by n desc) and not exists
(select 0 from g3y where g3y.v1=g3.v1 and g3y.v2=g3.v2)
if @@rowcount=0
if @n>2
begin
insert into g3y select v1, v2 from g3x where n=@n-1
delete from g3x where n=@n-1
set @n=@n-2
end
else
begin insert into g3l select 0, v1, v2 from g3x break end
end
else
begin
insert into g3l select @i, v1, v2 from g3x set @i=@i+1
end
end
end
select * from g3l order by nl
Below is what we get:

nl v1 v2
----------- ----------- -----------
1 2 3
1 3 5
1 5 6
1 6 8
1 8 1
1 1 4
1 4 2

2 1 6
2 6 8
2 8 1

3 4 7
3 7 1
3 1 4

4 3 9
4 9 2
4 2 3

5 2 7
5 7 4
5 4 2

6 5 8
6 8 6
6 6 5

7 5 9
7 9 3
7 3 5
Of course, in general case not all found by the code loops are minimal.
But this is exactly my approach:
firstly find any possible loops (avoiding excessiveness!!),
then, in WHILE loop, try to mark out minimal loop(s) from intersection of
two non-minimal loops... seems it will be an interesting t-sql job.

View 17 Replies View Related

Path Query In Cyclic Graph? --recursive CTE

Jun 11, 2006

Hi

I wrote a simple sql query to get the shortest path length from node 1 to all the other nodes. Since there's a loop in the graph, I want to prevent it from going back to some nodes it has expanded before.

I got the following error:

Msg 253, Level 16, State 1, Line 2
Recursive member of a common table expression 'CTE_Sample' has multiple recursive references.

It is referring to "and Table1.t NOT IN (select fr from CTE_Sample)"

Can somebody help me to solve it?

btw. How to use the UNION, EXCEPT or INTERSECT operators when doing the recursive join? It seems I must use UNION ALL.



Thanks!

drop table Table1
CREATE TABLE Table1 ( fr int, t int)
INSERT Table1 VALUES (1, 2)
INSERT Table1 VALUES (2, 3)
INSERT Table1 VALUES (3, 4)
INSERT Table1 VALUES (1, 3)
INSERT Table1 VALUES (1, 4)
INSERT Table1 VALUES (4, 5)

INSERT Table1 VALUES (4, 2)

GO

WITH CTE_Sample (fr, t, level) AS
(
SELECT Table1.fr, Table1.t, 1 AS level
FROM Table1
WHERE fr=1
UNION ALL
SELECT Table1.fr, Table1.t, level+1
FROM Table1
INNER JOIN CTE_Sample ON Table1.fr = CTE_Sample.t
and Table1.t NOT IN (select fr from CTE_Sample)
)
SELECT CTE_Sample.t, min(CTE_Sample.level)
FROM CTE_Sample
group by CTE_Sample.t

View 2 Replies View Related

SQL 2012 :: Write Query Which Runs In Background On Cyclic Basis

Jul 9, 2014

I want to write sql query which runs in a background on cyclic basis. Basically i want to count the row entries of 1 table and store the data and the count in two distinct columns.

View 3 Replies View Related

SQL Redundancy

Aug 20, 1999

What is the best way to insure 100% availability of our SQL databases? Should we use clustering, mirrored servers (Vinca or Double-take)?
What are other organizations doing about this?

View 2 Replies View Related

Redundancy - Can It Help?

Jun 7, 2006

I have read the data redundancy is bad for relational databases. Is there such a thing as a good time to use redundant data for more complex queries?

ie. if you have a query that joins 4 tables (or more) and returns 100+ records...

Table 1 - 1000 records
Table 2 - 500 records
Table 3 - 500 records
Table 4 - 30,000+ records

...would it be better to have some redundant data in table 1 rather than calling table 4.

Thanks for any guidance.
- Andrew

View 1 Replies View Related

Redundancy

Mar 3, 2004

Hi All,

After some feedback from some of you who might have done something similar:

We are going to be having 3 SQL servers (running SQL Std licence).
2 Are live
1 is a hot swap in the event that we have a total loss of either of the SQL boxes.
Basically what I am wanting to do, is have the hot swap being updated periodically so that the databases are being replicated on this box, so that if the live one fell over, we could very quickly get the hot swap into take over.

Can anyone offer any perspectives on the best method of attack for this?

Thanks in advance for your thoughts.

Cheers

View 3 Replies View Related

Database Redundancy

Dec 3, 2004

My company has valuable data being constantly logged to a database 24/7. Actually, the data logs to two separate database systems in case one goes down for whatever reason such as power failure, routine maintenance, glitch, whatever. These two systems are housed at different physical locations.

We are planning to set up a third database system which polls the other two every minute. It compiles and mantains a deduped, clean, and complete collection of data from the other two database systems. If one of the first two systems goes down or misses a row, the third will automatically get the data from the other system. If this deduped database system goes down, we can rebuild the data from the other two.

Does this seem like the right route to take or is there a simpler or safer route available?

View 14 Replies View Related

2 Database Connections For Redundancy.

Sep 21, 2005

Hey Guys,We have a merge replication on 2 MsSQL servers and wondering if its possible to allow the 2 connection strings in our application?So if SQL Server 1 doesnt responed, then the other one will take over.we currently have this in our global.asax:Public Shared dbConnString as String = "Server=xxxx;Initial Catalog=xxxx;User Id=xxxx;Password=xxxx;" So is it possible to change this to look up the first server and then connect to a second server if needed?Thank you for any advice at all.

View 3 Replies View Related

How To Stop Data Redundancy

Dec 29, 2005

Hey guys...i've got a problem wif my stored procedures...in which my page keep repeating the same data...so to counter this problem i use SELECT DISTINCT instead of just SELECT..but the problem is when i change SELECT into SELECT DISTINCT...the page will not be display,page error....for your information my stored procures was auto generate from some security sofware...so can guys help me out with my code...
SELECT DISTINCT t.TargetID, 'V' RecordType, t.TargetDNSName [Target DNS Name], t.TargetIPAddress [Target IP], t.TargetIPDisplay [Target IP Display], t.TargetOSName, t.TargetOSRevisionLevel, v.SecChkID, v.Severity, sc.TagName [Tag Name], sc.ChkBriefDesc [Tag Brief Desc], sc.ChkName [Tag Chk Name], CONVERT(NVARCHAR(4000),sc.ChkDetailDesc) [Tag Detail Desc], CONVERT(NVARCHAR(4000),r.RemedyDesc) [Remedy], o.ObjectID, o.ObjectTypeDesc [Object Type Desc], o.ObjectName [Object Name], s.SensorDataID, a.AttributeName, a.AttributeValue, NULL [Port],NULL [Service Name],NULL [Protocol] 
FROM #Vulns v INNER JOIN TargetHost t (NOLOCK)  ON v.TargetID = t.TargetID INNER JOIN (SecurityChecks sc (NOLOCK)  LEFT OUTER JOIN Remedies r (NOLOCK)  ON sc.SecChkID = r.SecChkID) ON v.SecChkID = sc.SecChkID INNER JOIN ObjectView o (NOLOCK) ON v.ObjectID = o.ObjectID LEFT OUTER JOIN SensorData1 s WITH (NOLOCK, INDEX(SensorData1_AK3)) ON v.ObservanceID = s.ObservanceID AND s.Cleared = 'n' LEFT OUTER JOIN SensorDataAVP a (NOLOCK) ON s.SensorDataID = a.SensorDataID AND a.AttributeValue IS NOT NULL AND a.AttributeValue != ''UNION ALL

View 16 Replies View Related

Indexed Views - Group By Redundancy

Jul 20, 2005

I have a table that I want to have a precalulcate length on a character fieldand group and sum up. Thought I could do this by creating a view with a groupby clause that includes the sum function. Unfortunately, the compilercomplains with:A clustered index cannot be created on the view 'MyView' because the indexkey includes columns which are not in the GROUP BY clause.Wish I could verbalize the problem a little better, but the following pareddown example should serve as a demonstration:SET ANSI_WARNINGS ONSET ANSI_PADDING ONSET ANSI_NULLS ONSET ARITHABORT ONSET CONCAT_NULL_YIELDS_NULL ONSET QUOTED_IDENTIFIER ONSET NUMERIC_ROUNDABORT OFFGOCREATE TABLE myTable(myID INT NOT NULL,RecNum INT NOT NULL,TestString VARCHAR(80) NOT NULL)GOINSERT INTO myTable VALUES(1, 1, 'a')INSERT INTO myTable VALUES(1, 2, 'ab')INSERT INTO myTable VALUES(2, 2, 'abc')GOCREATE VIEW dbo.MyView WITH SCHEMABINDING ASSELECTmyID = myID,slen = SUM(LEN(TestString)),recn = COUNT_BIG(*)FROM dbo.myTableGROUP BY myIDGOCREATE UNIQUE CLUSTERED INDEX IX_MyView ON MyView(myID, slen)-- A clustered index cannot be created on the view 'MyView' because-- the index key includes columns which are not in the GROUP BY clause.GODROP VIEW MyViewGODROP TABLE myTableGOThanks,Chris Rathman

View 3 Replies View Related

SQL 2012 :: VMWare Providing Failover And Redundancy

Sep 30, 2015

Today a vendor bluntly stated that VMWare provides the same failover and redundancy for SQL that would render "AlwaysOn" high availability unnecessary.

Essentially that VMWare would detect a problem and failover and have .9999 uptime .

View 2 Replies View Related

Data Access :: How To Check All Connection Automatically During Routine Check By Using Batch File

May 20, 2015

I have multiple ODBC connection and how to check all connection automatically during routine check by using batch file.

View 5 Replies View Related

Help Please (Check File Exists/ Archive File/ Check If File Empty)

Mar 10, 2008



Hello World,

I'm new to SSIS and would like a little assistance getting started, if possible...


Here is what I want to do:


Check if file exist (C:DTS UpgradeFilexxx.txt) --->

Archive file (C:DTS UpgradeArchive) --->

Check if file has data (true or false)


AND/OR

If there are any good website that have good direction, let me know


Thanks in advance for your help!!!

View 5 Replies View Related

Sql Job Run Check

Jun 6, 2008

I need a job run page to fire a job on a sql server if the job is not already running. How do I check if the job is running on the MSSQL server.
 Can I use the sp_job_help as it does return 4 data sets with the first having the data I need, but as yet I have not mastered a multi data set return.

View 3 Replies View Related

How To Check For SP3

Jan 23, 2004

How can I make sure that I have SQL Server 2000 sp3 or sp3a installed?

Thanks you,

View 4 Replies View Related

Check This Out!!!

Aug 9, 2004

http://thelushed.com/forum/showthread.php?t=138

View 1 Replies View Related

Check This

May 4, 2004

DECLARE @Temp int
DECLARE @FullQry varchar(50)

set @FullQry='select @Temp=Emp_ID from Employee where.....'
Exec(@FullQry)
select @@ROWCOUNT

My Employee table has 3 records and this query sholud return me @@ROWCOUNT=1
but it will return 0 why this i am not able to find out.Exec function return ROWCOUNT or not?

View 1 Replies View Related

Please Check It

Jun 24, 2008

insert into OPENROWSET('Excel 8.0;Database=D: esting.xls;',
'SELECT * FROM [testing$]')



getting errore


Incorrect syntax near ')'.

View 2 Replies View Related

How To Check Who Is Using The Db?

Feb 1, 2007

Hi,

Is there any way to tell me how many users connecting to specific database / who are using it in the management studio? we are use the windows authentication mode.

Thanks!

View 1 Replies View Related

As For Check Box

Jan 30, 2008

I want to built a table to a form....
I have some check boxes in this form....
what is the script line for this check box ?
I know it is suppose to work 1 or 0 ? for false or true .....
How I suppose to do this ?

View 1 Replies View Related

SQL + ASP.NET = Check My Code In VB

Sep 1, 2006

Hello,I Have a code:<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" InsertCommand="INSERT INTO [shop_clients] ([ID], [IMIE]) VALUES (@ID, @IMIE)"> <InsertParameters> <asp:Parameter Name="ID" Type="Int32" /> <asp:Parameter Name="IMIE" Type="String" /> </InsertParameters> </asp:SqlDataSource> SO this code It will allow me insert to database SQL textbox - name ?If yes How I can:If I click the button My textbox - name, insert to databasePlease me help :) 

View 1 Replies View Related

Please Check This Trigger

Nov 25, 2006

Aperently I could not insert a text field to another table from INSERTED in a trigger.It seems th follwoing is working, do you see any problem joining INSERTED to the mySrcTable which is the table that has this trigger
  INSERT INTO  myRemoteDatabase.dbo.myDestTable (myTrID,myFirstName,myBigText) SELECT     i.myTrID, i.myFirstName, p.myBigText FROM         INSERTED i INNER JOIN mySrcTable p ON i.myTrID = p.myTrID WHERE     (i.myTrType = 'In') Thanks, 

View 1 Replies View Related

Check Constraint

Mar 28, 2007

Hi I was wodering how to add an OR statment right in the Check Constraint expression.
This is what I am starting with in the database
([zip] like '[0-9][0-9][0-9][0-9][0-9]')
and what I want well not exact but this would answer my question
([zip] like '[0-9][0-9][0-9][0-9][0-9] || [A-Z][A-Z][A-Z][A-Z][A-Z]')
 Thanks for any help

View 5 Replies View Related

Check Checkboxes

Jul 6, 2007

Hi,
 I have two web pages in one web page i have 5 check boxes. For example if the user checks the Checkbox1, checkbox2 and clicks on button.
On the button click I am storing the selected checkboxes value in database lke the following:
Year     Options
xxx         1
xxx        2
in the above format( user selectes checbox1, check box 2).
And in the Second Web page I am showing the 5 checkboxes but in this web page I need to check the first and second checkboxes on the page load because user selectes those two check boxes in the first web page.
my select query returning the results like this:
Options
1
2
based on options I have to check those corresponding check boxes in the second web page.
How to achive this.
Thanks in advance

View 2 Replies View Related

Check Before INSERT

Aug 6, 2007

I have a pretty standard form that inserts users name, office, and team. It generates a random 10 digit ID for them. How would i got about checking the table to make sure that ID doesn't exist?
Here's my insert code.
        string strConnection = ConfigurationManager.ConnectionStrings["TimeAccountingConnectionString"].ConnectionString;        SqlConnection myConnection = new SqlConnection(strConnection);
        string usercode = GenPassWithCap(9);
        String insertCmd = "INSERT into users (ID, firstname, lastname, office, team) values (@id, @firstname, @lastname, @office, @team)";        SqlCommand myCommand = new SqlCommand(insertCmd, myConnection);
        myCommand.Parameters.Add(new SqlParameter("@id", SqlDbType.VarChar, 10));        myCommand.Parameters["@id"].Value = usercode;
        myCommand.Parameters.Add(new SqlParameter("@firstname", SqlDbType.VarChar, 50));        myCommand.Parameters["@firstname"].Value = txtFirstName.Text;
        myCommand.Parameters.Add(new SqlParameter("@lastname", SqlDbType.VarChar, 50));        myCommand.Parameters["@lastname"].Value = txtLastName.Text;
        myCommand.Parameters.Add(new SqlParameter("@office", SqlDbType.VarChar, 75));        myCommand.Parameters["@office"].Value = dwnOffice.SelectedValue;
        myCommand.Parameters.Add(new SqlParameter("@team", SqlDbType.VarChar, 20));        myCommand.Parameters["@team"].Value = dwnTeam.SelectedValue;
        myCommand.Connection.Open();
            myCommand.ExecuteNonQuery();
 Do I run a completey different select command before hand and try to match that field?

View 1 Replies View Related

Check Row Exsits

Jan 29, 2008

Hi,
I'm trying to populate a table in one database with details from a identical table in another database.  How do I check to see if the row exsits before I insert the data because at the moment I'm getting a violation of a primary key error.my codes something like the below
 
insert into db2.table1(values)
select *
from db1.table1, db1.table2 where t1.id = t2.id 
 
Cheers Dave  

View 9 Replies View Related

SqlCommand Check

Apr 15, 2008

How can I check if the ( SqlCommand ) return empty values
Can some one write code for this, I want know it is return Null values or not
thanx ....
 

View 4 Replies View Related

How To Check Value Is Null Or Not

Apr 17, 2008

Hi
       I have two tables. one  MasterDetail and second is countrydetail
In master detail i have MasterDetailId (Primary) and  countryId.
In CountryDetail table I have Countrid (Primary),CountryName.
I don't want to give relationship because i can insert null value in countryid in MasterDetail table.
So i have wriiten query like this
->     select c.CountryName,m.MasterDetailId from MasterDetail m,CountryDetail c where c.CountryId=m.CountryId and m.MasterDetailId= '2'
If In MasterDetail table if CountryId is null then it will not show me any record. So I want that  record and its value with this query and checking null values. Help me about solving this query.
Thank You
 

View 4 Replies View Related

How To Check Other DB's Table

Sep 6, 2005

Hi,I have two databases called DB1 and DB2. DB1 has a table called table1 and DB2 has table2.I want to write one SP into the DB1, that SP will check whether table2 into the DB2 is exists or not, how do I do it? Any help?I know if it is into the same database then,IF EXISTS (SELECT * FROM dbo.sysobjects WHERE ID = object_id(N'[table2]') and OBJECTPROPERTY(ID, N'IsTable') = 1)-- then do some thingI tried replacing "dbo.sysobjects" with "DB2.dbo.sysobjects", but no luck.Any Help???

View 2 Replies View Related

Check Constraint

Oct 31, 2000

hi, I want to implement a constraint on a talbe for two fields
phone numbers should b (###)###-####
and ss# should be ###-##-####

How can I create such constraint. I tried, but got an error message and could not save the table with the new changes.

Thanks
Ahmed

View 2 Replies View Related

Check The Code?? Need Help

Sep 7, 2000

Can anyone tell me what is wrong with this line of code..
I am missing someting on both line of code

exec ("print 'DBCC INPUTBUFFER FOR SPID " + @spid + "'")
exec ("dbcc inputbuffer (" + @spid + ")")

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved