Identifying Page Numbers Associated With Extents
Feb 9, 1999
When running the DBCC newalloc command I get some errors like the following:
"extent 51400 is in the wrong segment"
"chain processed with bad segment for object 448004627"
I've checked the system tables and system stored procedures and see no reference to page numbers being mapped to segments or identifying which extents are associated to which tables. I'm trying to determine which pages are associated with these extents so that I can print them to view the content. Any ideas how to determine the page numbers associated with extents and which extents are associated with each table?
View 2 Replies
ADVERTISEMENT
Jul 20, 2005
Is there a way to convert an image pointer to a page ID that could beused in DBCC pagei.e.select TEXTPTR(document)FROM testdocs where id = 1resturns0xFEFF3601000000000800000003000000select convert(int,TEXTPTR(document)) FROM testdocs where id =1returns50331648dbcc page (9,3,8,1)dumps the first page of the imageI am trying to map 0xFEFF3601000000000800000003000000 - > pagenumber 8thanks
View 1 Replies
View Related
Nov 25, 2002
Where should i start to try and fix some unalocated extents?
View 2 Replies
View Related
Mar 16, 2008
hi all!
i'm not sure that i understand how sql server stores data.
in documentation, i found that sql server stores data in pages.
every page have size of 8192 bytes (8060).
as i understand well, every table row is stored in one page. also, every table row can not be larger then one page. and that's where my confusion starts - because it sounds like we can not have data in table that is larger then 8060.
please, if you can you help me to understand this.
thank you in advance!
View 3 Replies
View Related
Feb 1, 2007
I have a report with a column which contains either a string such as "N/A" or a number such as 12. A user exports the report to Excel. In Excel the numbers are formatted as text.
I already tried to set the value as CDbl which returns error for the cells containing a string.
The requirement is to export the column to Excel with the numbers formatted as numbers and the strings such as "N/A' in the same column as string.
Any suggestions?
View 1 Replies
View Related
Jul 29, 2002
Hi all,
I have started to look at the way our production DB has been defined and set up, with the view to improving performance.
The DB is now 11gb, and the original size was set up as 3000mb, the rest has been take in 10% additional extents.
Now, back in my DB2 DBA days, this was a bad thing to have any data spread across extents as they may not be contiguous. I am assuming that is the same with SQL Server. Can someone confirm/deny this?
If this is the case, how can I get the DB back into one primary partition?
Thanks in advance.
Mike
View 2 Replies
View Related
Jul 24, 2015
I am reading the official documentation on pages and extents. I've also read an article on the official SQL Server Blog (sadly, I can't link as a new member). These articles do a good job explaining what an extent is.Why use extents at all?I can't find a good example anywhere of how grouping pages into extents make SQL Server work more efficiently. Any good example of what SQL Server would be missing if it didn't have extents at all, and how extents fix this?
View 6 Replies
View Related
Feb 24, 2015
I'm looking for hints/tips/url for a script which can be run a few times per day and either sends an email or alert for the following condition:
Script would function like:
[URL]
Databases - Dynamic Log File Growths Remaining Alarm
Dynamic Log File Growths Remaining alarm becomes active when a non fixed size log file in any database is in danger of running out of space to grow. It is raised when a log file is almost full and the file cannot automatically grow enough to relieve the problem.
We have our databases with Enable Autogrowth (in Megabytes), and then a Maximum File Size (Limited to a MB value).
Example: If one of the database logs (or possibly filegroup primary) picks up another extent and is about 5 extents (arbitrary value) away from running out of growth room, an alert would be sent to an email address/profile.
P.S. Yes, there are multiple databases on this one instance and the script should loop to run through all of them.
View 2 Replies
View Related
Jul 20, 2005
is there a setting that will ebnable uniform extent allocation uponcreation of index/table by default ?if there isn't any default setting can you code it in?thanks,Doron
View 1 Replies
View Related
Jul 20, 2005
Why does M$ Query Analyzer display all numbers as positive, no matterwhether they are truly positive or negative ?I am having to cast each column to varchar to find out if there areany negative numbers being hidden from me :(I tried checking Tools/Options/Connections/Use Regional Settings bothon and off, stopping and restarting M$ Query Analyer in betwixt, butno improvement.Am I missing some other option somewhere ?
View 7 Replies
View Related
Mar 11, 2008
I have a table with a column ID of ContentID. The ID in that column is all NULLs. I need a way to change those nulls to a number. It does not matter what type of number it is as long as they are different. Can someone point me somewhere with a piece of T-SQL that I could use to do that. There are over 24000 rows so cursor change will not be very efficient.
Thanks for any help
View 6 Replies
View Related
Nov 11, 2015
I have created one reports but all the records are displaying on one page.find a solution to display the records page by page. I created the same report without group so the records are displaying in page by page.
View 3 Replies
View Related
Feb 21, 2007
I have an 'ID' column. I'm up to about ID number 40000, but not all are in use, so ID 4354 might not be in any row. I want a list of all numbers which aren't in use. I want to write something like this:
select [numbers from 0 to 40000] where <number> not in (select distinct id from mytable)
but don't know how. Any clues?
View 1 Replies
View Related
Mar 27, 2007
I'm trying to write data to excel from an ssis component to a excel destination.
Even thought I'm writing numerics, every cell gets this error with a green tag:
Convert numbers stored as text to numbers
Excel Cells were all pre-formated to accounting 2 decimal, and if i manually type the exact data Im sending it formats just fine.
I'm hearing this a common problem -
On another project I was able to find a workaround for the web based version of excel, by writing this to the top of the file:
<style>.text { mso-number-format:@; } </style>
is there anything I can pre-set in excel (cells are already formated) or write to my file so that numerics are seen as numerics and not text.
Maybe some setting in my write drivers - using sql servers excel destination.
So close.. Thanks for any help or information.
View 1 Replies
View Related
Nov 28, 2006
Hello I have a project that uses a large number of MS Data access pages created in Access 2003 and runs on MS SQL2005.
When I am on lets say my client, (first page in a series) data access page and I have completed the fields in the (DAP), I am directing my users to the next step of the registration process by means of a hyperlink to another Data access page in the same web but in a linked or sometimes different table.
I need to pass data entered /created on the first page to the next page and populate the next page with some data from the first page / table. (like staying on the client name and ID when i go to the next page)
I also need the first data access page to open and display a blank or new record. Not an existing record. I will also be looking to creata a drop down box as a record selector.
Any pointers in the right direction would be appreciated.
I am some what new to data access pages so a walk through would be nice but anything you got is welcome. Thanks Peter€¦
View 2 Replies
View Related
Aug 20, 2001
Hello,
I have recently started working on a OLAP application. The database is around 35 gig, with over half of that space being taken by the indexes. What has happened is previous developers have added indexes to attempt to improve the performance of a select statement (for reporting). Some of the indexes work, but many do not.
I would like to drop the ineffective indices. What I would like is a way to find if indexes are being used, preferably by object name. Is there a third party vendor that can monitor objects and how much they are used? Is there another way to do this using SQL?
Thanks in advance,
Jim
View 1 Replies
View Related
Sep 5, 2000
Hi,
I need to delete ONLY the duplicate rows from a table..Can anyone suggest me a way to do that thing..i used the query..
"Delete from <TableName> where SlNo IN ( Select SlNo from <TableName> group
by SlNO having Count(*) > 1)"
The resultant is all the original rows also getting deleted with the duplicates..anyone please help me out..
Thank you in advance
Rani
View 5 Replies
View Related
May 20, 2004
How can get an object's dependencies in SQL Server. For example it I have written a procedure which accesses some tables inside it then the procedure is said to be dependent on that table. Or one procedure might call another procedure and hence dependent.
Can I know an object's dependent objects from any system table. I think Oracle has a table USER_DEPENDENCIES which provides this info (I may be wrong :-().
Can anyone help ?
View 7 Replies
View Related
May 6, 2008
Hi,can anybody tell me how to identify all the databases from all the servers that are being accessed by a particular group
View 11 Replies
View Related
Nov 22, 2006
Hi
Is there any way to Identify a Deadlock using the Enterprise Manager.
Someone told me that the Red Icon on the Lock/Process ID (Spid) mean a Dealock ... is that True ???
View 3 Replies
View Related
Mar 6, 2008
Hi,
Can we define a non-identifying relationship between 2 tables in MS SQL? If yes, what will be the syntax based on what I have:
ALTER TABLE PM_VARIABLE_BIN
ADD CONSTRAINT PM_VarCoef_PM_VarBin_FK1 FOREIGN KEY (MODEL_ID,VERSION,VAR_ID) REFERENCES PM_VARIABLE_COEFFICIENT(MODEL_ID,VERSION,VAR_ID)
go
View 1 Replies
View Related
Mar 14, 2006
Some columns in transaction tables are "mandatory fields" on the dataentry screens, and as a result tend to accumulate junk entries, wherethe user puts something, anything, in the window in order to get theGUI to accept the screen. This filler isn't as elaborate as LoremIpsum, but more likely characters from adjacent keys on the second rowof the keyboard, like "lkjkljl". This non-data gets in the way ofapplications that use the data. I wonder if there is a way torecognize and ignore this stuff -- I would assume it's a well-knownproblem, but I haven't found any literature on it. Any pointerswelcome. And sorry if this is off-topic for a DB group.Thanks,Jim Geissman
View 2 Replies
View Related
Jul 20, 2005
Hi AllThe problem:!!I want to create a temp table which is common between different usersso that each user could select his rows and print them withoutprinting others selection.All clients use the same connection string.Is there a way to identify users?I think it's possible to delete rows of a user when he logs out theprogram.Do I think right?thanks very muchHafez
View 1 Replies
View Related
Mar 23, 2007
Has previous work been done on this? Is their a library one can download? Here's the problem. In an aricle a person or author may make a statement about a subject or a person. I am making a database on this.
For example, here in Israel, PM Olmert may make a statement on the teacher's strike or on Abu Mazen. The article may say, speaking of Mazen, Olmert said such and such. PM Olmert said, "xxxxxxx......." with the previous material making it clear whathe was speaking of.
Right now I have ugly code. Is there a neat way of doing this?
If this is the wrong forum, can somebody direct me to the right forum?
Thanks.
Dennist
View 3 Replies
View Related
May 4, 2015
Have a table showing info like:
Region_ID
Branch_ID
Customer_ID
Transaction_ID
In this regard need to create a view to reflect the info in the order
Region_ID (Ascending)
Branch_ID (Asc)
Customer_ID (Asc)
Transaction_ID (Asc)
But, at the same time, also want to include two additional columns identifying or even inserting 1's against each of the first Customer_ID considering the first two columns, and the second one on the single column itself?In other words consider the following sample, how to add 1 to the last two columns where either the Customer appears for the first time in context with the Region and Branch Fields or to be appearing on it's own for the first time:
Region
Branch
Customer
Transaction
Required_A
Required_B
[code]....
View 3 Replies
View Related
Jun 15, 2007
Hell Sir,
I am using repeater control to show the result after search .and using checkbox control in itemtemplate row .After searchresult i am facing a problem in identifying the checked checkboxes in the itemtemplate of repeater control .
Please provide appropriate solution ....
thanks for ur attention...
View 3 Replies
View Related
Mar 9, 2001
Hi everybody,
I'm migrating a table that has above 20,000 records and lot of duplication.Let's say an Employee table with multiple records having slight
diference in the EmployeeName field.Now nobody would like to sit and manually identify them with such hugh number of records.
Is there any way which would help me identify most of them and
reduce the redundancy.
Thanx
Aby...
View 2 Replies
View Related
Mar 1, 2004
Hi,
Can anyone tell me how to find out on what port number a paticular sqlserver named instance is running...
thanks..
View 5 Replies
View Related
Feb 23, 2005
We would have come across locks on rows, tables etc. How do we handle it
through code (SP)!!!
A job is executed at 12 pm midnight on a table. This table exists on an
24X7 accessed (users will be access the table anytime in the day/night)
database. We need to execute this job if this table is not locked at 12 pm.
Can we have the solution for the listed are two scenarios:
1. You have a normal user and do not have system privilege.
How would you design the database(Table)? Is it possible?
2. You have all the privileges on the system tables.
What would be the sql script to help us identify the lock? How will
it be used in your code? Or is there exception handling !!!
View 1 Replies
View Related
Jun 23, 2008
I have table <contact>
I wand to higllight the duplicate student .I am considering two parameter Name and Birthdate to identify such records even though the probablity of two different student having same name and same DOB is very less.Margin for bad result is relatively low for me.
fisrtname middlename lastName birthdate
------------------------------------------------
peter jones clooney 29/06/2008
peter jones clooney 29/06/2008
both are actually same student but different from database point of view.
View 2 Replies
View Related
Nov 17, 2006
Hi
Can we identify the reason for a Deadlock , after it has passed. I mean can I get to knw the reason as to why the deadlock occured yesterday on my production box.
I had not left the profiler on ... neither did I send the dead lock erorrs to the SQL error logs using the DBCC TRACEON (1204, 3605, -1)
Is there some way we can figure it out .
Please help.
View 2 Replies
View Related
Feb 8, 2007
I am trying to test some data handling between two different versions of an application.
I have restored the database schema twice, once as DB_old and once as DB_new.
I import a transaction using the new application into DB_new and I import the SAME transaction into the DB_old using the old version of application.
I then have to eyeball the data in SQL Query Analyzer to try to identify problems where the fields have received different values.
I have done this by running a select statement twice telling it to use both of the databases and then viewing it in two grids. There are a lot of columns so I have to do a lot of scrolling across the screen to do the comparison, and since the view is in two separate grids I have to hop back and forth and click the scroll bars, etc.
It seems like there has to be a better way. I don't suppose there is a way to lock the two grids so they both scroll together is there?
I was thinking maybe I could insert each of the selects into a temporary table and then do some kind of comparison to identify which values were different in each column. Some of the columns will have differences, like the timestamp, but if I could somehow identify which columns were different then I could eyeball them to identify which of those were okay to be different and which of them were actually bugs from the changed application version.
I have no idea how to identify those individual columns with different data values or even where to start.
Just so you understand better what I am doing now here is the query I am running that I then eyeball:
use DB_new
select * from claim where claim_id = 35144
use DB_old
select * from claim where claim_id = 35144
Thanks for any ideas.
View 7 Replies
View Related
Jun 4, 2007
I'm getting the following from DBCC CBECKDB (there are other errors in there, too but this is the one that concerns me at the moment):
Msg 8939, Level 16, State 42, Line 1
Table error: Object ID 1227270540, index ID 255, page (1:5359776). Test (m_slotCnt <= 1 && m_type == TEXT_TREE_PAGE) failed. Values are 8 and 1.
Msg 8944, Level 16, State 12, Line 1
Table error: Object ID 1227270540, index ID 255, page (1:5359777), row 0. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 8186 and 220.
Msg 8941, Level 16, State 102, Line 1
Table error: Object ID 1227270540, index ID 255, page (1:5359778). Test (sorted [i].offset >= PAGEHEADSIZE) failed. Slot 7, offset 0x1 is invalid.
Msg 8942, Level 16, State 101, Line 1
Table error: Object ID 1227270540, index ID 255, page (1:5359778). Test (sorted[i].offset >= max) failed. Slot 0, offset 0x7 overlaps with the prior row.
CHECKDB found 0 allocation errors and 4 consistency errors in table '(Object ID 1227270540)' (object ID 1227270540).
However...
select objectproperty(object_id('1227270540'),'IsTable')
...returns null. I've checked the sysobjects table for this ID, and it doesn't show up. Any ideas on how I can identify what this object is? Let me know if you want more info. This is SQL 2000, sp4, the DB is about 60GB and it's the only one on the system having issues. The issue has been around for a while (more than a month), and is consistent. I can post all of the DBCC output if you really want/need it. I was just hesitant to do so since it's so huge.
Boy, 4th day on the job and the hits just keep coming. :-) (Not complaining. I'm learning a lot!)
UPDATE: 2007.06.04_15:44 - Funny: When I ran dbcc checktable(CheckItem), I got all of the error messages displayed below, both for the mystery object ID and for the CheckItem table. I guess that's solved, but I'd still like to know if it's possible to have identified this another way, if anyone has time. Thanks.
-D.
____________________________________________________________________________________
"Believe in those who are seeking the truth. Doubt those who say they have found it." -Andre Gide
View 4 Replies
View Related