SQL Server Triggers- New Person -Help Required-Urgent

Mar 10, 2008

Please help me in sorting out my Problem Providing me the solution .
My Problem is
I have a master table with Primary key on ID field (PatientID-(Patient-Table)) and it is an Identity field
And My child table has the same ID field(PatientID-(PatientDetails-Table)) and it has the relationship set
And the child table has its own Primary key of its own ID field(PatientdetailsID).
What I want is as soon as enter row of data into the master table (Patient-Table)and click save on my front end application(Which is ASP.Net web application)
I want to update Child Table’S (PatientDetails)ID field ( ie.,PaientID in the PatientDetailsTable) in the  Child Table   which relates the parent table ,by doing so I want to  update the Primary key field (ie.,PatientDetailsID)  & ForeignKey Field (PatientID)of the child table and to create row  in the child table  with two columns .(PatientID,&PatientDetailsID)
What I want to achieve is in my ASP.net Application as soon as I enter Master table
I want to Edit Child tables (about 15) one by one like a Wizard pages which will have The ID Field(PatientID) same in all my wizard pages .
I want to know whether I can incorporate triggers if so in which table (is it in Patient or PatientDetails) and I will be grateful If anyone gives the Script to-do  so.I am also providing my two table sripts.
Sripts:CREATE TABLE [dbo].[Patient](      [PatientID] [int] IDENTITY(1,1) NOT NULL,      [Date] [smalldatetime] NULL,      [UserID] [int] NULL,      [FirstName] [varchar](40) NOT NULL,      [Surname] [varchar](30) NOT NULL,      [DOB] [datetime] NULL,      [Age]  AS (floor(datediff(day,[DOB],getdate())/(365.25))),      [Sex] [varchar](10) NULL,      [Occupation] [varchar](30) NULL,      [Ethinicity] [varchar](60) NULL,      [HomeTel] [varchar](15) NULL,      [Mobile] [varchar](15) NULL,      [varchar](40) NULL,      [AddressLine1] [varchar](30) NULL,      [Line2] [varchar](30) NULL,      [Line3] [varchar](30) NULL,      [City] [varchar](20) NULL,      [PostCode] [varchar](15) NULL, CONSTRAINT [PK_Patient] PRIMARY KEY CLUSTERED (      [PatientID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY] GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[Patient]  WITH CHECK ADD  CONSTRAINT [FK_Patient_User] FOREIGN KEY([UserID])REFERENCES [dbo].[User] ([UserID])GOALTER TABLE [dbo].[Patient] CHECK CONSTRAINT [FK_Patient_User] CREATE TABLE [dbo].[PatientDetails](      [PatientID] [int] NOT NULL,      [PatientDetID] [int] IDENTITY(1,1) NOT NULL,      [Date] [smalldatetime] NULL,      [NHSNumber] [varchar](12) NULL,      [HospitalRefID] [varchar](10) NULL,      [Ovaries] [varchar](15) NULL,      [ReportFromGP] [image] NULL,      [LMP] [datetime] NULL,      [DateStopped] [datetime] NULL,      [Comment] [varchar](150) NULL, CONSTRAINT [PK_PatientDetails_1] PRIMARY KEY CLUSTERED (      [PatientDetID] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GOSET ANSI_PADDING OFFGOALTER TABLE [dbo].[PatientDetails]  WITH CHECK ADD  CONSTRAINT [FK_PatientDetails_Patient] FOREIGN KEY([PatientID])REFERENCES [dbo].[Patient] ([PatientID])GOALTER TABLE [dbo].[PatientDetails] CHECK CONSTRAINT [FK_PatientDetails_Patient] 
I want to incorporate this through database level .
I am using SQL Server2005-Express
Although  Iam using ASP.net C# I am new and I will not be able to do this in my front end.
Please help me wth the solution.
thanks

rameshs_2000

View 4 Replies


ADVERTISEMENT

Very Urgent: Required Document For R/3 Installation On SQL Server In Disrtibuted Environment

Jul 23, 2005

Hi All,[color=blue]>From last 2 weeks I am despirately trying to get the installation steps[/color]of R/3 4.7 on SQL server 2000 on Windows 2k or 2003 server. This is fora distributed environment, I mean central instance on the centralinstance host and the database instance on the on the database instancehost. I got a few response, which is highly appriciable and I respectfor those SAP gurus in order to providing me the valuable inputs. Butif some one has realy done the installation on disrtibuted environmentearlier, please forward me the document for installation. Its an urgentneed. I hope you all are understanding my position.With Regards,Mike Johns

View 3 Replies View Related

Information Required About Triggers

Apr 16, 2008

I am doing an application that requires a trigger to be fired after Updating a specific table.My trigger requires to perform some mathematical calculations that to be performed from 2 tables.The problem that i came across here is that when i am updating in a Specific User ID in a Grid view.In my trigger i have to take that specific ID as reference .In the sense i have to compare some variable with the Specific ID globally.Suppose i am Updating an ID by number 1.That number should be my refernce part in trigger.I think it make sense.Any suggestions .Thanks in Advance.

View 4 Replies View Related

Required....help....URGENT

Mar 15, 2000

Hi,
I have a doubt.....
I have a text field that is 255 bytes in lenght and I want the contents of this full field to be split.....on various gouds which may be ',' or and or 'And' etc

This field stores all the skills...

So i have created a search module ....but this search is taking awfully long as u know text field searches are tedious...

Can u please suggest a way I could parse/split the text field to enable faster search....

Newbie

View 1 Replies View Related

URGENT HELP Required

Oct 14, 2004

Hi

I am setting up a site in win XP professional and I am getting problem connecting to a local sql server 2000 installation (developer version)

The problem is that if i specify objects in my select query without an owner name, it can't recognize the object. I need to be able to do this.

Any one know how to fix this? is this a sql server setting??

Thank you.
James

View 2 Replies View Related

Urgent, Help Required For Restore

Mar 30, 2002

is it possible to restore only from .mdf file in sql 200. if so how?
Thanks in advance

View 1 Replies View Related

Urgent Help Required - Recovery

Jul 20, 2005

I have a scenario like this.......update esan set tes_address_city = 'TEST1' --at some timeupdate esan set tes_address_city = 'TEST12' --at some timeupdate esan set tes_address_city = 'TEST123' --at some timebackup database TESTWMS to disk = 'D: empRecoveryTestTESTWMS.db'backup log TESTWMS to disk = 'D: empRecoveryTestTESTWMS01.log'I take these backups at the end of day....Now i want to recover till the second update ie 'TEST12'...Assumptions to be made:-I dont know the timing of the updates.I am allowed to take back only once.We can also assume to have a backup of the previous day also.Is this possible and how can i do it.......Please help me ...and urgent also.......Thanks in advanceRVG

View 1 Replies View Related

Column Update . Urgent Help Required Pl. !!

Jan 11, 2002

Hi ...

There is a strange problem on my tables . When i execute a simple query from Query Analyzer, say select * from ' table name' , then i can edit or enter text in my result in one of the columns.

But the same table if i try to open through the Enterprise problem , i.e selecting the table , right click and select open table and then if i select return all rows , it does not allow me to enter text in a specific coloumn .

But the same is possible if i execute a query and try to enter text in the results which is displayed in grid from the Query Analyser .

Could anybody help me to know what could be the problem and how can i enter a text it ?

Many Thanks !!

View 2 Replies View Related

Database Copy .. Urgent Help Required !!

Mar 19, 2002

Hi Friends ,

I need your help and advice on copying databases from SQL Server 6.5 to SQL Server 7.0 and SQL 2000 . How can i do it ? Can it be done through Enterprise manager or is there a script available on any site or if someone can provide me .
I want to copy all the objects, indexes and logins with Passwords from SQL 6.5 to SQL 7.0 and SQL 2000 .

Since i am not well versed with database transfer activities , Can somebody help me please !!

Many thanks and best Regards,
Sneha

View 1 Replies View Related

DBCC Errors - Urgent Help Required Please

Nov 8, 2001

Does any one know how to resolve DBCC errors 9000 to 9999? The BOL does not give any explaination as to how to handle such errors. Microsoft search engine also does not offer any help on these error messags.

Thanks.

View 2 Replies View Related

Merge Replication ........urgent Help Required

Feb 20, 2001

I am trying to do mearge replication with in our organisation. One server is located at server room(version 7.0) and it runs on NT server. Another server(desktop edition (version 7.0)) is at my desktop runs on NT Workstation. I am creating mearge replication from my machine making server room machine as Publisher and distributor and my desktop server as subscriber. But after creating replication when i view mearge agent job status it says that connection to my machine is failed. And because of this my replication is not working.

on both the servers "SQL Server Agent" service is running and i am also logging into both the servers with the same login with sa server role

I am getting following error in the "error details merge agent" dialog box
catagory -------------source -------------------------Number
Agent-------- "subscription server name" --------------20084
Data Source ---"subscription server name"-------------- 6


please help me if any one has solution

thanks in advance

Minesh

View 2 Replies View Related

Urgent Help Required IN Merge Replication

Aug 4, 2004

HI,
We have one publisher and 100 subscribers. And Subscribers again act as re-publisher for 3-4 win CE (Handheld) based device subscribers. Now. We have already done the setup and it is working fine.
Now due to some change in horizontal filters set in the publisher, we have change in publication. NOw whenever I make any change in publication, it says all subscribers will be marked for reinitialization and snapshot agent will run and new schema will be applied whenever next time merge agent runs.
But whenever I run the merge agent, the snapshot agent fails saying invalid column ... . I am not able to revert the changes as the same error persists even after bringing the publication back to the original state.
To add to the complexity, we have also used dynamic snapshots between publisher and suscribers.
So, Can anyone please tell me how can I change the publication script without deleting the subscribers?Any pointers in this direction are really appreciated.

Regards
Rahul

View 1 Replies View Related

Query Correction Required Urgent

May 25, 2008

Hi All,

First of all its very very urgent. Secondly I am not an expert.

Now here is my problem.

I want to loop through my html files and want to save the data in my table column. here is the Code which need correction.

CODE:
USE [AdventureWorks]
DECLARE @cmd varchar(1000);
DECLARE @FileName varchar(100);
DECLARE @FilePath varchar(100);
SET @FileName = 'C: est'+@FilePath+'html';
SET @cmd = 'INSERT INTO myTable(FileName, FileType, Document)' +
'SELECT ' + @FilePath + ', FileType,
* FROM OPENROWSET(BULK @FileName, SINGLE_CLOB) AS Document'

EXEC (@cmd);
Select * from myTable

Just for practice I am using Adventureworks db. I am using SQL Express 2005.

My html files are named something like this:

AC0234.html
DB9803.html
CG4571.html

I cannot change my file names.

Thanks in advance.

Regards;

View 2 Replies View Related

URGENT Help Required Please? MSDB Erros

Nov 27, 2007

Hi, I need to your urgent help please...
My Event log is full of I/O Bad Page Id error meaages on MSDB database.

Here is Output of CHECKDB

Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID 0, page ID (1:7845). The PageId in the page header = (0:0).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID 0, page ID (1:7853). The PageId in the page header = (0:0).
Server: Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID 0, page ID (1:7854). The PageId in the page header = (0:0).
DBCC results for 'MSDB'.
CHECKDB found 0 allocation errors and 3 consistency errors not associated with any single object.
DBCC results for 'sysobjects'.
There are 533 rows in 9 pages for object 'sysobjects'.
DBCC results for 'sysindexes'.
There are 307 rows in 16 pages for object 'sysindexes'.
DBCC results for 'syscolumns'.
There are 3755 rows in 125 pages for object 'syscolumns'.
DBCC results for 'systypes'.
There are 26 rows in 1 pages for object 'systypes'.
DBCC results for 'syscomments'.
There are 495 rows in 176 pages for object 'syscomments'.
DBCC results for 'sysfiles1'.
There are 2 rows in 1 pages for object 'sysfiles1'.
DBCC results for 'syspermissions'.
There are 221 rows in 1 pages for object 'syspermissions'.
DBCC results for 'sysusers'.
There are 14 rows in 1 pages for object 'sysusers'.
DBCC results for 'sysproperties'.
There are 0 rows in 0 pages for object 'sysproperties'.
DBCC results for 'sysdepends'.
There are 3097 rows in 18 pages for object 'sysdepends'.
DBCC results for 'sysreferences'.
There are 33 rows in 1 pages for object 'sysreferences'.
DBCC results for 'sysfulltextcatalogs'.
There are 0 rows in 0 pages for object 'sysfulltextcatalogs'.
DBCC results for 'sysfulltextnotify'.
There are 0 rows in 0 pages for object 'sysfulltextnotify'.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 18099105, index ID 0: Page (1:7845) could not be processed. See other errors for details.
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'sysdbmaintplan_history.UQ__sysdbmaintplan_h__41EDCAC5' (ID 1090102924) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:7463:0) with values (sequence_id = 8296 and plan_id = 91AF9917-3C72-4FD2-BE43-98601416395E and ? = 24) points to the data row identified by ().
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:89) identified by (RID = (1:7775:89) media_set_id = 36388) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:90) identified by (RID = (1:7775:90) media_set_id = 36389) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:91) identified by (RID = (1:7775:91) media_set_id = 36390) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:92) identified by (RID = (1:7775:92) media_set_id = 36391) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:93) identified by (RID = (1:7775:93) media_set_id = 36392) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:94) identified by (RID = (1:7775:94) media_set_id = 36393) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:95) identified by (RID = (1:7775:95) media_set_id = 36394) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8951, Level 16, State 1, Line 1
Table error: Table 'backupmediaset' (ID 2037582297). Missing or invalid key in index 'backupmediasetuuid' (ID 2) for the row:
Server: Msg 8955, Level 16, State 1, Line 1
Data row (1:7775:96) identified by (RID = (1:7775:96) media_set_id = 36395) has index values (media_uuid = 00000000-0000-0000-0000-000000000000 and media_set_id = NULL).
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:1768:128) with values (media_family_id = 3988F04C-0000-0000-0000-000000000000 and media_set_id = 36415 and family_sequence_number = 2.121996171E-314) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:1773:225) with values (media_family_id = 8936C309-0000-0000-0000-000000000000 and media_set_id = 36406 and family_sequence_number = 2.121996171E-314) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2080:143) with values (media_family_id = 3B7D0AD5-0000-0000-0000-000000000000 and media_set_id = 36419 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2081:47) with values (media_family_id = 61D32A3C-0000-0000-0000-000000000000 and media_set_id = 36417 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2081:234) with values (media_family_id = 6B23A43D-0000-0000-0000-000000000000 and media_set_id = 36402 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2082:148) with values (media_family_id = EBB5DD1C-0000-0000-0000-000000000000 and media_set_id = 36388 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2083:204) with values (media_family_id = 3C2E9566-0000-0000-0000-000000000000 and media_set_id = 36420 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2084:69) with values (media_family_id = 70907EEB-0000-0000-0000-000000000000 and media_set_id = 36401 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2085:1) with values (media_family_id = 2555E654-0000-0000-0000-000000000000 and media_set_id = 36413 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2087:141) with values (media_family_id = 93BAD469-0000-0000-0000-000000000000 and media_set_id = 36390 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2679:137) with values (media_family_id = A0682005-0000-0000-0000-000000000000 and media_set_id = 36397 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2776:82) with values (media_family_id = 6F12D425-0000-0000-0000-000000000000 and media_set_id = 36400 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2780:50) with values (media_family_id = 2C18BBCC-0000-0000-0000-000000000000 and media_set_id = 36412 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2782:159) with values (media_family_id = 79EDB994-0000-0000-0000-000000000000 and media_set_id = 36416 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2888:89) with values (media_family_id = D448D2F8-0000-0000-0000-000000000000 and media_set_id = 36410 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2889:75) with values (media_family_id = 992EE014-0000-0000-0000-000000000000 and media_set_id = 36404 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2892:32) with values (media_family_id = C2B9073E-0000-0000-0000-000000000000 and media_set_id = 36405 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:2894:23) with values (media_family_id = 9B6D7F6A-0000-0000-0000-000000000000 and media_set_id = 36418 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:3058:51) with values (media_family_id = 5726FBA4-0000-0000-0000-000000000000 and media_set_id = 36392 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:3058:111) with values (media_family_id = 592F85A5-0000-0000-0000-000000000000 and media_set_id = 36422 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:3637:228) with values (media_family_id = 288E49BA-0000-0000-0000-000000000000 and media_set_id = 36411 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:3639:85) with values (media_family_id = B79996BD-0000-0000-0000-000000000000 and media_set_id = 36409 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:3909:156) with values (media_family_id = 3AC0F52D-0000-0000-0000-000000000000 and media_set_id = 36421 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:4197:259) with values (media_family_id = ECD92D25-0000-0000-0000-000000000000 and media_set_id = 36393 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:5194:26) with values (media_family_id = 337B262B-0000-0000-0000-000000000000 and media_set_id = 36423 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:5194:153) with values (media_family_id = 798F202C-0000-0000-0000-000000000000 and media_set_id = 36396 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:5198:17) with values (media_family_id = FDA6B08F-0000-0000-0000-000000000000 and media_set_id = 36424 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:5547:46) with values (media_family_id = 263071E9-0000-0000-0000-000000000000 and media_set_id = 36408 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:5942:173) with values (media_family_id = 64B33C73-0000-0000-0000-000000000000 and media_set_id = 36414 and family_sequence_number = 3.799364817E-321) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:6207:50) with values (media_family_id = E86E9ED5-0000-0000-0000-000000000000 and media_set_id = 36398 and family_sequence_number = 3.799364817E-321) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:6667:71) with values (media_family_id = B066F284-0000-0000-0000-000000000000 and media_set_id = 36407 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:6671:80) with values (media_family_id = 015B0CB8-0000-0000-0000-000000000000 and media_set_id = 36389 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:7578:97) with values (media_family_id = 79657275-0000-0000-0000-000000000000 and media_set_id = 36394 and family_sequence_number = 5.092789936E-313) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:7579:142) with values (media_family_id = 61DFE89F-0000-0000-0000-000000000000 and media_set_id = 36391 and family_sequence_number = 5.092789936E-313) points to the data row identified by ().
Server: Msg 8952, Level 16, State 1, Line 1
Table error: Database 'msdb', index 'backupmediafamily.backupmediafamilyuuid' (ID 2069582411) (index ID 2). Extra or invalid key for the keys:
Server: Msg 8956, Level 16, State 1, Line 1
Index row (1:7738:43) with values (media_family_id = D9722AE3-0000-0000-0000-000000000000 and media_set_id = 36403 and family_sequence_number = 9.778156605E-311) points to the data row identified by ().
Server: Msg 8934, Level 16, State 1, Line 1
Table error: Object ID 2073058421, index ID 1. The high key value on page (1:1630) (level 0) is not less than the low key value in the parent (0:1), slot 0 of the next page (1:1815).
Server: Msg 8978, Level 16, State 1, Line 1
Table error: Object ID 2073058421, index ID 1. Page (1:1681) is missing a reference from previous page (1:1815). Possible chain linkage problem.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 2073058421, index ID 1. The previous link (1:2231) on page (1:1815) does not match the previous page (1:1630) that the parent (1:1490), slot 164 expects for this page.
Server: Msg 8936, Level 16, State 1, Line 1
Table error: Object ID 2073058421, index ID 1. B-tree chain linkage mismatch. (1:1630)->next = (1:1815), but (1:1815)->Prev = (1:2231).
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 2117582582, index ID 0: Page (1:7853) could not be processed. See other errors for details.
Server: Msg 8928, Level 16, State 1, Line 1
Object ID 2117582582, index ID 0: Page (1:7854) could not be processed. See other errors for details.
Server: Msg 8935, Level 16, State 1, Line 1
Table error: Object ID 2117582582, index ID 2. The previous link (1:6317) on page (1:1593) does not match the previous page (1:4450) that the parent (1:82), slot 105 expects for this page.
Server: Msg 8977, Level 16, State 1, Line 1
Table error: Object ID 2117582582, index ID 2. Parent node for page (1:6317) was not encountered.
DBCC results for 'sysfilegroups'.
There are 1 rows in 1 pages for object 'sysfilegroups'.
DBCC results for 'sysjobschedules'.
There are 19 rows in 1 pages for object 'sysjobschedules'.
DBCC results for 'RTblIfaceMem'.
There are 1189 rows in 9 pages for object 'RTblIfaceMem'.
DBCC results for 'backupfile'.
There are 37551 rows in 1008 pages for object 'backupfile'.
CHECKDB found 0 allocation errors and 1 consistency errors in table 'backupfile' (object ID 18099105).
DBCC results for 'syscategories'.
There are 19 rows in 1 pages for object 'syscategories'.
DBCC results for 'systargetservers'.
There are 0 rows in 0 pages for object 'systargetservers'.
DBCC results for 'RTblWorkspaceItems'.
There are 0 rows in 0 pages for object 'RTblWorkspaceItems'.
DBCC results for 'restorehistory'.
There are 28 rows in 1 pages for object 'restorehistory'.
DBCC results for 'systargetservergroups'.
There are 0 rows in 0 pages for object 'systargetservergroups'.
DBCC results for 'DTA_input'.
There are 1 rows in 1 pages for object 'DTA_input'.
DBCC results for 'RTblDatabaseVersion'.
There are 1 rows in 1 pages for object 'RTblDatabaseVersion'.
DBCC results for 'systargetservergroupmembers'.
There are 0 rows in 0 pages for object 'systargetservergroupmembers'.
DBCC results for 'sysalerts'.
There are 16 rows in 1 pages for object 'sysalerts'.
DBCC results for 'RTblDTSProps'.
There are 0 rows in 0 pages for object 'RTblDTSProps'.
DBCC results for 'RTblVersionAdminInfo'.
There are 2333 rows in 30 pages for object 'RTblVersionAdminInfo'.
DBCC results for 'restorefile'.
There are 56 rows in 2 pages for object 'restorefile'.
DBCC results for 'sysoperators'.
There are 0 rows in 0 pages for object 'sysoperators'.
DBCC results for 'sysnotifications'.
There are 0 rows in 0 pages for object 'sysnotifications'.
DBCC results for 'RTblParameterDef'.
There are 136 rows in 1 pages for object 'RTblParameterDef'.
DBCC results for 'restorefilegroup'.
There are 28 rows in 1 pages for object 'restorefilegroup'.
DBCC results for 'systaskids'.
There are 0 rows in 0 pages for object 'systaskids'.
DBCC results for 'syscachedcredentials'.
There are 0 rows in 1 pages for object 'syscachedcredentials'.
DBCC results for 'RTblIfaceHier'.
There are 3349 rows in 18 pages for object 'RTblIfaceHier'.
DBCC results for 'logmarkhistory'.
There are 0 rows in 0 pages for object 'logmarkhistory'.
DBCC results for 'DTA_progress'.
There are 3 rows in 1 pages for object 'DTA_progress'.
DBCC results for 'RTblNamedObj'.
There are 2196 rows in 22 pages for object 'RTblNamedObj'.
DBCC results for 'sysdtscategories'.
There are 3 rows in 1 pages for object 'sysdtscategories'.
DBCC results for 'sysdtspackages'.
There are 91 rows in 2 pages for object 'sysdtspackages'.
DBCC results for 'DTA_output'.
There are 1 rows in 1 pages for object 'DTA_output'.
DBCC results for 'DTA_tuninglog'.
There are 117 rows in 2 pages for object 'DTA_tuninglog'.
DBCC results for 'DTA_reports_database'.
There are 1 rows in 1 pages for object 'DTA_reports_database'.
DBCC results for 'DTA_reports_partitionfunction'.
There are 0 rows in 0 pages for object 'DTA_reports_partitionfunction'.
DBCC results for 'MSdistpublishers'.
There are 0 rows in 1 pages for object 'MSdistpublishers'.
DBCC results for 'MSdistributiondbs'.
There are 1 rows in 1 pages for object 'MSdistributiondbs'.
DBCC results for 'RTblTypeInfo'.
There are 0 rows in 0 pages for object 'RTblTypeInfo'.
DBCC results for 'MSdistributor'.
There are 1 rows in 1 pages for object 'MSdistributor'.
DBCC results for 'DTA_reports_partitionscheme'.
There are 0 rows in 0 pages for object 'DTA_reports_partitionscheme'.
DBCC results for 'sysreplicationalerts'.
There are 2 rows in 1 pages for object 'sysreplicationalerts'.
DBCC results for 'MSagent_profiles'.
There are 15 rows in 1 pages for object 'MSagent_profiles'.
DBCC results for 'sysdtspackagelog'.
There are 0 rows in 0 pages for object 'sysdtspackagelog'.
DBCC results for 'MSagent_parameters'.
There are 228 rows in 2 pages for object 'MSagent_parameters'.
DBCC results for 'DTA_reports_table'.
There are 116 rows in 1 pages for object 'DTA_reports_table'.
DBCC results for 'RTblScriptDefs'.
There are 0 rows in 0 pages for object 'RTblScriptDefs'.
DBCC results for 'MSdatatype_mappings'.
There are 185 rows in 2 pages for object 'MSdatatype_mappings'.
DBCC results for 'RTblOLPProps'.
There are 0 rows in 0 pages for object 'RTblOLPProps'.
DBCC results for 'sysdtssteplog'.
There are 0 rows in 0 pages for object 'sysdtssteplog'.
DBCC results for 'RTblEnumerationDef'.
There are 0 rows in 0 pages for object 'RTblEnumerationDef'.
DBCC results for 'DTA_reports_tableview'.
There are 0 rows in 0 pages for object 'DTA_reports_tableview'.
DBCC results for 'sysdtstasklog'.
There are 0 rows in 0 pages for object 'sysdtstasklog'.
DBCC results for 'DTA_reports_query'.
There are 2 rows in 1 pages for object 'DTA_reports_query'.
DBCC results for 'RTblSumInfo'.
There are 0 rows in 0 pages for object 'RTblSumInfo'.
DBCC results for 'RTblMDSProps'.
There are 0 rows in 0 pages for object 'RTblMDSProps'.
DBCC results for 'DTA_reports_querytable'.
There are 4 rows in 1 pages for object 'DTA_reports_querytable'.
DBCC results for 'RTblEnumerationValueDef'.
There are 0 rows in 0 pages for object 'RTblEnumerationValueDef'.
DBCC results for 'DTA_reports_querydatabase'.
There are 2 rows in 1 pages for object 'DTA_reports_querydatabase'.
DBCC results for 'RTblUMLProps'.
There are 0 rows in 0 pages for object 'RTblUMLProps'.
DBCC results for 'DTA_reports_index'.
There are 145 rows in 2 pages for object 'DTA_reports_index'.
DBCC results for 'sysdbmaintplans'.
There are 1 rows in 1 pages for object 'sysdbmaintplans'.
DBCC results for 'DTA_reports_queryindex'.
There are 16 rows in 1 pages for object 'DTA_reports_queryindex'.
DBCC results for 'DTA_reports_column'.
There are 73 rows in 1 pages for object 'DTA_reports_column'.
DBCC results for 'sysdbmaintplan_jobs'.
There are 0 rows in 1 pages for object 'sysdbmaintplan_jobs'.
DBCC results for 'DTA_reports_indexcolumn'.
There are 24 rows in 1 pages for object 'DTA_reports_indexcolumn'.
DBCC results for 'RTblUMXProps'.
There are 0 rows in 0 pages for object 'RTblUMXProps'.
DBCC results for 'sysdbmaintplan_databases'.
There are 0 rows in 1 pages for object 'sysdbmaintplan_databases'.
DBCC results for 'RTblSIMProps'.
There are 0 rows in 0 pages for object 'RTblSIMProps'.
DBCC results for 'sysdbmaintplan_history'.
There are 0 rows in 1 pages for object 'sysdbmaintplan_history'.
CHECKDB found 0 allocation errors and 1 consistency errors in table 'sysdbmaintplan_history' (object ID 1090102924).
DBCC results for 'DTA_reports_querycolumn'.
There are 22 rows in 1 pages for object 'DTA_reports_querycolumn'.
DBCC results for 'RTblGENProps'.
There are 0 rows in 0 pages for object 'RTblGENProps'.
DBCC results for 'RTblDTMProps'.
There are 0 rows in 0 pages for object 'RTblDTMProps'.
DBCC results for 'log_shipping_primaries'.
There are 0 rows in 0 pages for object 'log_shipping_primaries'.
DBCC results for 'log_shipping_secondaries'.
There are 0 rows in 0 pages for object 'log_shipping_secondaries'.
DBCC results for 'RTblDBMProps'.
There are 0 rows in 0 pages for object 'RTblDBMProps'.
DBCC results for 'RTblEQMProps'.
There are 0 rows in 0 pages for object 'RTblEQMProps'.
DBCC results for 'mswebtasks'.
There are 0 rows in 0 pages for object 'mswebtasks'.
DBCC results for 'RTblVersions'.
There are 2333 rows in 27 pages for object 'RTblVersions'.
DBCC results for 'RTblDBXProps'.
There are 0 rows in 0 pages for object 'RTblDBXProps'.
DBCC results for 'RTblRelships'.
There are 6922 rows in 146 pages for object 'RTblRelships'.
DBCC results for 'RTblSites'.
There are 44 rows in 1 pages for object 'RTblSites'.
DBCC results for 'RTblProps'.
There are 393 rows in 3 pages for object 'RTblProps'.
DBCC results for 'RTblRelshipProps'.
There are 28 rows in 1 pages for object 'RTblRelshipProps'.
DBCC results for 'RTblPropDefs'.
There are 797 rows in 10 pages for object 'RTblPropDefs'.
DBCC results for 'RTblRelColDefs'.
There are 320 rows in 4 pages for object 'RTblRelColDefs'.
DBCC results for 'RTblIfaceDefs'.
There are 453 rows in 5 pages for object 'RTblIfaceDefs'.
DBCC results for 'backupmediaset'.
There are 34167 rows in 384 pages for object 'backupmediaset'.
CHECKDB found 0 allocation errors and 8 consistency errors in table 'backupmediaset' (object ID 2037582297).
DBCC results for 'sqlagent_info'.
There are 0 rows in 0 pages for object 'sqlagent_info'.
DBCC results for 'RTblClassDefs'.
There are 537 rows in 5 pages for object 'RTblClassDefs'.
DBCC results for 'sysdownloadlist'.
There are 0 rows in 0 pages for object 'sysdownloadlist'.
DBCC results for 'backupmediafamily'.
There are 34129 rows in 667 pages for object 'backupmediafamily'.
CHECKDB found 0 allocation errors and 35 consistency errors in table 'backupmediafamily' (object ID 2069582411).
DBCC results for 'sysjobhistory'.
There are 895 rows in 197 pages for object 'sysjobhistory'.
CHECKDB found 0 allocation errors and 4 consistency errors in table 'sysjobhistory' (object ID 2073058421).
DBCC results for 'sysjobs'.
There are 20 rows in 1 pages for object 'sysjobs'.
DBCC results for 'RTblTFMProps'.
There are 0 rows in 0 pages for object 'RTblTFMProps'.
DBCC results for 'RTblRelshipDefs'.
There are 144 rows in 1 pages for object 'RTblRelshipDefs'.
DBCC results for 'backupset'.
There are 36070 rows in 1673 pages for object 'backupset'.
CHECKDB found 0 allocation errors and 4 consistency errors in table 'backupset' (object ID 2117582582).
DBCC results for 'sysjobservers'.
There are 20 rows in 1 pages for object 'sysjobservers'.
DBCC results for 'RTblTypeLibs'.
There are 17 rows in 1 pages for object 'RTblTypeLibs'.
DBCC results for 'sysjobsteps'.
There are 28 rows in 9 pages for object 'sysjobsteps'.
DBCC results for 'RTblClassExtension'.
There are 69 rows in 1 pages for object 'RTblClassExtension'.
CHECKDB found 0 allocation errors and 56 consistency errors in database 'msdb'.
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (msdb ).
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Please let me know the followings, as I never found issues with MSDB database before... I read that this database only keep track of your SQL Server agent jobs so at wrost I will end up loosing all my Maitenance plans? or will I loose something else

1. Should I restore MSDB backup up takes 3 days ago?
2. Or should I repair it with data loss? will it effect any Database entries?

SKR

View 5 Replies View Related

Extension- Urgent Help Required - Recovery

Jul 20, 2005

I have actually extended my requestI have a scenario like this.......update esan set tes_address_city = 'TEST1' --at some timeupdate esan set tes_address_city = 'TEST12' --at some timeupdate esan set tes_address_city = 'TEST123' --at some timebackup database TESTWMS to disk = 'D: empRecoveryTestTESTWMS.db'backup log TESTWMS to disk = 'D: empRecoveryTestTESTWMS01.log'I take these backups at the end of day....Now i want to recover till the second update ie 'TEST12'...Assumptions to be made:-I dont know the timing of the updates.I am allowed to take back only once.We can also assume to have a backup of the previous day also.Is this possible and how can i do it.......Please help me ...and urgent also.......Thanks in advanceRVGExtension is hereSuppose that ou database is crashing at 2.30 and i run the restoreRESTORE DATABASE TESTWMS FROM DISK='D: empRecoveryTestTESTWMS.DB'with norecovery --Prev day logRESTORE LOG TESTWMS FROM DISK='D: empRecoveryTestTESTWMS01.log'with norecoveryRESTORE LOG TESTWMS FROM DISK='D: empRecoveryTestTESTWMS02.log'with recovery, STOPAT = '2003-08-26 16:37:45.870'i get message like thisThis log file contains records logged before the designatedpoint-in-time. The database is being left in load state so you canapply another log file.RESTORE LOG successfully processed 0 pages in 0.389 seconds (0.000MB/sec).Now when i try to run aSelect * i get message lkeServer: Msg 927, Level 14, State 2, Line 1Database 'TESTWMS' cannot be opened. It is in the middle of a restore.How do i solve this problem. One way is to use a NO_TRUNCATE with abackup in between (ie incase of database corruption).But i dont want to use a log backup once again. I should be able tosolve it without using a log backup once again. In shot backup onlyonce a day. Aslo i need to refer to a database to that particularpoint of time from my backup.Thanks in advanceRVG

View 6 Replies View Related

Data Copy Error . Help Required . Urgent Please !

Jun 4, 2002

Hi Friends ,

When i try to copy one table , say for e.g table x from SQL 6.5 to SQL 7.0 it gives me an error that -

'Insert Error , column 46 ( 'Coloumn_name ',DBTYPE_DBTIMESTAMP), Status 6 :
Data overflow .
Invalid character value for cast specification .'

This column on the source server ( SQL 6.5 ) has datatype 'datetime ' with value 8 and is NULL .

Although there are other columns in this table with datatype as 'datetime' as 8 and NULL , they have been copied successfully to the destination table .Only this specific column is giving an error while copying data .

I am using import export wizard to copy data between servers .
Since i have no experience with this , would like to have a solution from you to this problem. It will be great help for me .

Thank you very much ,
Alisha .

View 1 Replies View Related

Urgent: Strong SAPWD Required On Win2003

Jun 3, 2008

Hi folks.

I just tried to perform the install of SQLServer 2005 Express on a Win 2003 SP2 machine and the install failed with the rejection of the SA password. Currently, our pwd is 1 uppercase letter, 4 lowercase letters and 1 number for a total of 6 characters. Other installations on Win 2003 SP1 have worked fine in the past. I read in a recent version of Books Online that the SA pwd guidelines might have recently changed and that 8 characters might now be required.

My question is: do these new 8 character guidelines apply only to the sa pwd or to all logins?

Thanks!

Mike

View 6 Replies View Related

Urgent Requirement For Project Leader/apm Required

Feb 1, 2007

hi, we are having urgent requirement for one of client cmmi level5company in hyd and chennaiif u r intrested send me u r updated resumeJoin Bytes!

View 1 Replies View Related

Urgent Help Required: Passing Schema As A Variable

Nov 15, 2007



I am extracting data from multiple schemas with same structure. I have a table which have all the schema listed.Using Execute Sql task and For each loop, I am reading that table and string the value in a variable.
It is like this

"Select TK_ID,TK_TOKEN from " + @[User::Column1] + ".Tokens"

Column 1 is schema name.

Now I create a DATA FLOW TASK which has a OLEDB Source and OLEDB destination.
Using the option " Sql Command from variable" when I select the variable.
Since the Column1 will be evaluated at runtime , it doesnt give me any output columns to map to OLEDB destiantion and this throwing error.
OLEDB source output contains no output columns, The layout Validation failed.

Please help asap, my project is stuck.

View 9 Replies View Related

Urgent Help Required--Error: 9003,Severity:20,State:1.

Jan 3, 2008

Hi,

I am using Microsoft SQL Server 2000 Desktop Engine (MSDE 2000). When I restart the SQL Service, it fails to do so. I have tried running the service in command prompt & got the following error:

Error: 9003, Severity: 20, State: 1.
Cannot recover the master database. Exiting.

Kindly help as it is quite urgent & I can not afford to loose any data. Thanks.

View 3 Replies View Related

DTS And Triggers - Urgent

Dec 9, 1999

Hi,
Am I right in saying that the insert triggers on a table will not execute if the table is being populated using DTS ? At least, that is what is happening with me. Is DTS logged ? Is there any way to populate the table thru' DTS and still make the triggers work ?

Thanks,
Deepak.

View 1 Replies View Related

Creating Triggers(urgent)

Jan 9, 2002

Hi Guys,
I have a requirement to create update,delete triggers in all the columns of each table in my development database. I would really appreciate if anyone could guideme or send me the script.
Thaks a lot for your consideration
Jay

View 1 Replies View Related

Completed(?) And Urgent Triggers And Transactions Question

Mar 21, 2007

I use the VB.NET transaction to update an sql server 2000 database. I call a number of stored procedures within this transaction.The stored procedures will update tables. These tables use triggers..My question is, when does the trigger get called? Is it after the each stored procedure, or is it after the whole transaction? Jag 

View 6 Replies View Related

Simple SQL Server Stuff For An Oracle Person...

Jul 27, 2006

I'm trying to do some basic stuff in SQL Server 2005 that I could do in Oracle.  I'm sure there's a way to do these things, I just don't know how.  My most immediate question is this:
Is there any easy way to run a SQL script and have it spool to HTML tables to a file?  The 'results to text' from SSMS is not adequate for display purposes.  I'm trying to display table/column descriptions.
Beyond that, does anyone know of any good resources that provide an 'Oracle to SQL Server' matrix so I can help figure out how to do some of these things in SQL Server?
Thanks in advance,
Mike

View 1 Replies View Related

Windows 2003 - SQL Server Bug? REWARD To Person Who Fixes This Problem!!!

Dec 20, 2003

Hello.

I am about at the end of my rope. My ISP (MaximumASP) has recently upgraded to Windows 2003. I have an application written in .Net / C# that has been working for almost a year now with no problems. The day they upgraded to Windows 2003, that all changed. Upon accessing a page (ANY page) that opens the database (SQL Server) an error occurs INTERMITTENTLY. The error is:

Specified SQL Server not Found

Go to this link for the full error and Stack Trace: http://www.acob.com/SQLError2.gif

Keep in mind this NEVER happened before 2003 (same exact code, no changes) AND it will NOT happen for hours at a time (same page, same code), then BOOM! If we wait about 10-15 minutes or so, the page (EVERY page that accesses the database) works again and no error. This happens about 2-3 times within a 24 hour period. I can also RESET the web application (server) and the error disappears immediately.

I have gone through ALL of my code to make sure I am EXPLICITLY closing my data connections. This problem was MUCH worse when we were using the .Net 1.1 Framework AND Windows 2003. Reverting BACK to .Net 1.0 has alleviated the problem somewhat - but not entirely.

Does ANYONE know of any bugs, problems, whatever in Windows 2003 that may cause this. It seems as though there is a Connection Pooling leak of some sort. But I cannot fix, what I cannot find. My ISP simply keeps saying - it's a coding problem. If I have code that works for over a year and then suddenly it doesn't - is it a coding problem??

I DISPOSE of the DataSet.
I DISPOSE of my Connection.
I CLOSE my Connection.
I DISPOSE of my SQLAdapter.

I do this cleanup everywhere I initiate a connection (all in one codebehind). Additionally, the code is very simplistic: Connect, Open, Select, Bind, Dispose, Close.

Does ANYONE know what this can be??

$100 to the person who solves this problem! (Server must run for one week after solution is implemented to collect reward).

Thanks!!
AtlMaddog

View 16 Replies View Related

SQL Server 2012 :: Grouping By Percentage Of Time Worked By Person

Jul 2, 2014

I have a table of People and their ID, the starting month (a fixed number of months, say 10 for this), the ending month, and the percent of work time (0-1 being 0-100%). If they have a % work of 0, I do not want to see anything. But if the % changes, from say .5 to .75, I would need the first and last month they were at .5, and the first and last month they were at .75

The Table:

/****** Object: Table [dbo].[TestProject] Script Date: 02.07.2014 10:15:08 ******/
IF OBJECT_ID('TempDB..#TestProject2','U') IS NOT NULL
DROP TABLE [dbo].[#TestProject2]
GO
CREATE TABLE [dbo].[#TestProject2](
ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,

[Code] ....

The data:

--===== All Inserts into the IDENTITY column
SET IDENTITY_INSERT #TestProject2 ON
INSERT INTO #TestProject2
("ID","PersonID", "PercentLoad","MonthID")
SELECT 1,123456,0,1 UNION ALL

[Code] ....

EXPECTED RESULT:

Person ID StartMonth EndMonth LOADPCT
123456 3 4 .5
123456 5 6 1
654321 1 2 1
654321 4 4 .5
654321 5 6 .75
654321 7 9 .5

View 5 Replies View Related

The Top Sales Person?

Dec 26, 2006

I am quite newbie, really grateful for some help how to create a sql sentence in Reporting Services that would return the best sales person from each shop.. The following returns all the sales persons from each shop

So how to select the top sales person from each shop?
SELECT TOP (10) shop.name, SUM(Cd.Price) AS Sales, Personal.Name AS Salesperson
FROM Purchase INNER JOIN
Personal
ON Purchase.Salesperson_id = Personal.Personal_id RIGHT OUTER JOIN shop
ON Personal.work_id = shop.shop_id FULL OUTER JOIN
Cd ON Purchase.Cd_id = Cd.Cd_id
GROUP BY Shop.Name, Personal.Name
ORDER BY Sales DESC

Or something like this? But how in Rep.Services???

...LEFT OUTER JOIN (
SELECT P.work_id, P.Name, SUM(C.Price) AS TotalSale
FROM @Personal P
INNER JOIN @Purchase B
ON B.Salesperson_id = P.Personal_id
INNER JOIN @Cd C
ON C.Cd_id = B.Cd_id
GROUP BY P.Work_id, P.Name
) D
ON D.Work_id = S.Shop_id

View 4 Replies View Related

MY HELP!!!!! Request.....ONLY 1 Person Reply.

Oct 15, 2007

I can believe it, 40 people read my sql query problem and ONLY ONE reply to my request for help.

Thanks!!!! It's great to know that we help each other in this community.

View 1 Replies View Related

Role/Person Table?

Dec 6, 2005

We're developing an application request/packaging/rollout worflowapplication for our 50 site, 40,000 user company. There is a requesttable, an engineering table, a distribution table, etc. etc. But, thecompany has a designated "Application Owner" at each site, and eachperson who will use the application must also be listed in the workflowapplication. So, we need a lookup table for the owners and users:CREATE TABLE REQUEST (RQ_ID INTEGER NOT NULL,RQ_BY_ID INTEGER NOT NULL,RQ_FOR_ID INTEGER NOT NULL,ASSIGNED_ENGINEER_ID INTEGER NOT NULL,OTHER INFO...);CREATE TABLE APP_OWNERS (RQ_ID INTEGER NOT NULL,OWNER_ID INTEGER NOT NULL);CREATE TABLE APP_USERS (RQ_ID INTEGER NOT NULL,USER_ID INTEGER NOT NULL);There are many other tables, of course, some with single person IDfields and addititional lookup tables where there are multiple peopleinvolved like testers, package distributors, etc. I began to wonder,why not just a single table to cover ALL the people involved:CREATE TABLE RQ_WORKFLOW_PEOPLE (RQ_ID INTEGER NOT NULL,PERSON_ROLE VARCHAR(20) NOT NULL,PERSON_ID INTEGER NOT NULL);INSERT INTO RQ_WORKFLOW_PEOPLE (rq_id,person_role,person_id) values(123456,'RQ BY',314159),(123456,'RQ FOR',951413),(123456,'APP OWNER',159413),(123456,'APP OWNER',413159),(123456,'USER',594131),(123456,'USER',313459),.....The real question I have is how does one evaluate options like this?The good news, I think, is that where I simply must have crossreference tables because of multiple values (application owners, users,testers, etc.) I've reduced the number of those tables to one byspecifying a single table by role. Is that a good thing or a bad thing?I've also removed similar data from several other tables where only asingle column was needed in those tables, i.e. the requested by andrequested for fields, the assigned engineer, and several others. Thereis one and only one of each for each request but the type of data, thatis an employee ID is exactly the same, so does it make more "sense" tokeep the data with the request table or the engineering table orconsolidate all ID data in an ID table?Any thoughts on this woudl be appreciated.Randy

View 2 Replies View Related

Looking For Some Guidance From A Kind Person

Apr 4, 2008

I am gonig into interview for a junior developer position. The role involves a lot of SQL based work. Training is on the job, and they know I am new to this, but they want to know what I can do with SQL server by wednesday, and obviosuly I stand a better chance if I can do a reasonable amount by then.I am assuming I can practise with offline databases, so I would like to do that. Also I was wondering if there were any simple example databases I can load up.

I have downloaded and installed the software, and would like to know how to connect and create a test database.
There will be a small test in the interview and the questions are:
1. SQL Management and Data Extraction
For this task you will need to be familiar with database tables, data types and constraints. There will be some administration work using SQL Management Studio along with some T-SQL queries. You will need to show use of the SELECT, INSERT, UPDATE and DELETE statements. If you do not have SQL Server, you can download the express edition for free at the following URL. http://msdn2.microsoft.com/en-us/express/bb410791.aspx


2. XSLT
For this task I will be asking you to produce some HTML output displaying the data from an XML file. The concept is similar to ASP.


3. Database Design
You will be given a scenario for a company that requires some database software for the smooth running of their organisation. You will need to plan and design a data structure to accommodate these requirements. You will be allowed to spend as much time on this part of the test as you wish. Key information here is going to be database normalization.




These questions dont make a whole lot of sense to be at the moment, so would appreciate a breakdown in simpler terms.





This job will be a fantastic opportunity for me to get into development, and would appreaciate any help that you guys have to offer, thanks in advance.

View 21 Replies View Related

Selecting First Transaction Per Person

Jan 17, 2008



Hi

In a transactions table, I need to get the record for the earliest transaction date for each person or account. So far I've been doing it in 2 steps (below). Is there an easier way to do this?

Thanks

Dannie

--------------------------

SELECT

Person_ID
Earliest_Transaction_Date = MIN( Transaction_Date )
INTO

Earliest_Transaction_Dates
FROM

All_Transactions
GROUP BY

Person_ID

SELECT

b.*
FROM

Earliest_Transaction_Dates a
LEFT OUTER JOIN
All_Transactions b
WHERE

a.Person_ID = b.Person_ID
and b.Transaction_Date = a.Earliest_Transaction_Date





View 3 Replies View Related

Need To Get Separate Pages For Each Person..help

Dec 21, 2006

I'm fairly new to RS and have a problem.

I have a query that pulls information on people, courses they have taken, their score and so on. I have a date parameter setup so I can run it by year. Everything works ok on the query side, I get all the information I need on all the people and the courses they have taken. However, when I run the report, I do not get a separate page for each person and their relative information. The first page shows the first name and the rest of the 700 pages list all the courses and other information, with no break. How do I render the report so that I can get a separate page(s) for each person and their specific info? I can glady provide more info/code if need be.

Bill

View 8 Replies View Related

Getting A Final Version Of A Person Into A DW

Feb 14, 2007

I have about 8 databases to integrate. All of the databases have ssno, address city...ect. I need to create a DW table with one unique record for each actual person. In other words,

Joe Smith,123 Main St, Anytown, State,....+ssno

goes into the DW table and is the same person as Joseph S. Smith,123 Main Street... and any other versions.

Could someone point me to a reference or give me an outline of how to do this in and SSIS package?

Is fuzzy logic used here?

Do I need to deduplicate the feeder systems first??

It needs to handle a situation in, for example, the Bronx New York where there could be an apartment buiding with 7 people named Jose Sanchez .

I hope I've been clear, I'm a newbie at this DW stuff, but it's fascinating. Any help would be appreciated. Thanks

View 1 Replies View Related







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