DB Analyze

Mar 16, 2008

I have been asked to analyze a DB which was under a different team. I have done the following,

1.Identified tables without PK, and clustered index
2.identified FK’s without index
3.orphan users and weak passwords
4.analyzed SPS for bad code

Is there anything else I can do? Are there any ready-made scripts which I can use.


------------------------
I think, therefore I am - Rene Descartes

View 5 Replies


ADVERTISEMENT

Analyze Index In Ms SQL

Jul 21, 2003

Hello, friends!
sorry for the stupid question:
I created a new index on table and I'm looking to a command equal to "Analyze table ", "Compute statistics "in Oracle
to check if that index is usefull.

Thank you very much in advance.

View 3 Replies View Related

Analyze Key Influencers Questions

Jun 24, 2007

I will be grateful if you could answer a few more questions around Analyzing Key Influencers



1. When specifying the training data for Decision Tree, there is a SUGGEST button (Recommend inputs for currently set predictable) which recommends which input are related to the predictable attribute. It also gives a €˜Score€™ for each recommended inputs. What algorithm does the SUGGEST button use? Does it use simple entropy/correlation based algorithm OR sophisticated feature selection algorithms?

2. Can I access this €˜Score€™ and recommended inputs above programmatically?

3. What feature selection algorithms are used in SQL Server 2005? Can they be invoked programmatically?

5. In Logistic Regression mining model viewer, we get a chart which clearly shows what attributes favor which state of the predictable attribute. For example, income level < 23000 favors BikeBuyer = 0 (does not buy) with a score of 89.00. What algorithm is used to calculate the €˜Score€™? Can LR be used as a feature selector in case where the predicted attribute is binary (select the attributes that favor one state or the other with a score of, say, greater than some threshold)?

6. You suggested using Naive Bayes to find AKIs. What if the input attributes are all continuous (predicted attribute binary)? Shouldnt I be going for LR?

Thanks bunches

MA

View 4 Replies View Related

Analyze Key Influencers Issue........

Oct 23, 2007

Excuse the elementary question; I am new to this feature.


No matter what dataset I use, I get the following error:
"The task was not able to detect any key influencers for the 'xxx' column. The values of 'xxx' seem unrelated to values of other columns."


Any ideas on what is happening here?

Here is the sample dataset:







Loan Amount
CLTV
transmitted

1,000
51.0%
1

5,000
52.0%
1

9,000
53.0%
1

13,000
54.0%
1

17,000
55.0%
1

21,000
56.0%
1

25,000
57.0%
1

29,000
58.0%
1

33,000
59.0%
1

37,000
60.0%
0

41,000
61.0%
0

45,000
62.0%
0

49,000
63.0%
0

53,000
64.0%
0

57,000
65.0%
0

61,000
66.0%
0

65,000
67.0%
0

69,000
68.0%
0

73,000
69.0%
0

77,000
70.0%
0

Thanks in advance.......

View 13 Replies View Related

Oracle's Analyze Table Statement ?

Oct 9, 2004

Hi,

Below is an Oracle query used for cost optimization purpose :

analyze table test estimate statistics sample 2500 Rows;

Is there any equivalent for the above in SQL Server ?

Please advice,

Thanks,
Sam

View 5 Replies View Related

Dbcc Showcontig Results...analyze Please

May 21, 2008

Dear All,
i've used the DBCC showcontig command against my table table103
but i dont know how to analyze the results of fragmentation levels. please give me some explanations or some good links.....

the results are:
DBCC SHOWCONTIG scanning 'TABLE103' table...
Table: 'TABLE103' (1899257921); index ID: 1, database ID: 10
TABLE level scan performed.
- Pages Scanned................................: 20
- Extents Scanned..............................: 13
- Extent Switches..............................: 18
- Avg. Pages per Extent........................: 1.5
- Scan Density [Best Count:Actual Count].......: 15.79% [3:19]
- Logical Scan Fragmentation ..................: 90.00%
- Extent Scan Fragmentation ...................: 92.31%
- Avg. Bytes Free per Page.....................: 3281.4
- Avg. Page Density (full).....................: 59.46%

Vinod
Even you learn 1%, Learn it with 100% confidence.

View 10 Replies View Related

Analyze LDF Files MS SQL Server 2000

Jul 20, 2005

Anybody nows a tool to analyze LDF files in MS SQL Server 2000?I mean, a tool that converts a LDF file in a set of SQL transactions?(similar to dbtran in sybase)thanks!

View 3 Replies View Related

How To Analyze Slow Performance Queries

Feb 27, 2008



Hi All

I struck up with Slow perfornace query,Please some body help me how to analyze Slow perforamnce queris.

View 6 Replies View Related

Analyze Backup And Restore Rows

Nov 23, 2006

Hi, the other day, some data was deleted by mistake, the data that we wanted to delete was in just 1 table, and we deleted the related data in a couple tables more...

We do full backups every Sunday and a Differential every day, my question is:

Is there any way to analyze the backup file to compare the backed up data with the data that the table has now, and by automatic means restore just some rows to the table, or at least see the data to insert it manually?

Thanks!

View 5 Replies View Related

How Can I Query Analyze DB Greater Than 128MG

Jun 25, 2007

I have a 300MG DB and Query Analyzer gives me the "... DB larger than configured..." error when I try to connect to it...



What is the work around?



Thanks in advance



JEK

View 5 Replies View Related

Conversion Fails. Please Analyze Error Msg.

Nov 26, 2006

Msg 245, Level 16, State 1, Procedure CompactL1RecordsFromfirstINTRAD, Line 177
Conversion failed when converting the varchar value
'DECLARE rows_cursor CURSOR FOR
SELECT ask, dateTimed FROM iDay_Compr_GOOG
WHERE DAY (dateTimed) = ' to data type int.


I get this message while executing a stored procedure. It works "half way" but skips this statement and the whole block as a result. In the table @table_name ask is declared as float and dateTimed as DateTime. Similar statements work happily in other stored procedures with no problem. Even in the same stored procedure I have places where I use DAY (dateTimed) and they seem to work as far as I can see although it is a very branched out code with many IF ... ELSE's.

SET @SQL = 'DECLARE rows_cursor CURSOR FOR
SELECT ask, dateTimed FROM '+@table_name+'
WHERE DAY (dateTimed) = '+@day+' AND NOT ask = 0'
exec sp_sqlexec @SQL
OPEN rows_cursor
FETCH LAST FROM rows_cursor INTO @askQ, @lastTableDateTime
SET @SQL = 'UPDATE '+@table_name+' SET askSize = askSize + '+@askSize+'
WHERE dateTimed = '+@lastTableDateTime+' AND ask = '+@askQ
exec sp_sqlexec @SQL -- <== this is line 177
CLOSE rows_cursor
DEALLOCATE rows_cursor

Another puzzle for me is the line number. I used Edit-->GO TO--> 177 to single the line out and it seems to point to a different exec sp_execsql @SQL statement, the one that is down the road.

I can make neither head nor tail out of it. I am sure Jens, Cetin or Andrea or whoever stumble on this post will be able to figure this out. Anyone else's help will also be appreciated.

Many thanks.

View 15 Replies View Related

Analyze / Data Mining Ribbons

May 29, 2007

I have installed SP2 on my laptop and I have installed the latest Data Mining Add-Ins.



When I open the sample spreadsheet and select the table in a worksheet called "Table Analysis Tools Sample", I dont get Analyze ribbon under Table Tools. Is ther any reson for it?



I dont get Data Mining option either! Is there something I have to do before getting those menus to appear in the ribbon?



I have been through "Getting Started" and set the AS connection to the local AS Server.



Thanks

Sutha

View 17 Replies View Related

Script To Analyze Table Space Usage

Feb 14, 2006

Edit 2007-8-9:
Added code to show database file sizes. Not really closely related to tables sizes, but a lot of the people who need this want to know why their database it so large, so it may help to know which files, especially the logs, are so large, and if the files have empty space in them.


-- Script to analyze table space usage using the
-- output from the sp_spaceused stored procedure
-- Works with SQL 7.0, 2000, and 2005

set nocount on


print 'Show Size, Space Used, Unused Space, Type, and Name of all database files'

select
[FileSizeMB]=
convert(numeric(10,2),sum(round(a.size/128.,2))),
[UsedSpaceMB]=
convert(numeric(10,2),sum(round(fileproperty( a.name,'SpaceUsed')/128.,2))) ,
[UnusedSpaceMB]=
convert(numeric(10,2),sum(round((a.size-fileproperty( a.name,'SpaceUsed'))/128.,2))) ,
[Type] =
case when a.groupid is null then '' when a.groupid = 0 then 'Log' else 'Data' end,
[DBFileName]= isnull(a.name,'*** Total for all files ***')
from
sysfiles a
group by
groupid,
a.name
with rollup
having
a.groupid is null or
a.name is not null
order by
case when a.groupid is null then 99 when a.groupid = 0 then 0 else 1 end,
a.groupid,
case when a.name is null then 99 else 0 end,
a.name




create table #TABLE_SPACE_WORK
(
TABLE_NAME sysnamenot null ,
TABLE_ROWS numeric(18,0)not null ,
RESERVED varchar(50) not null ,
DATA varchar(50) not null ,
INDEX_SIZE varchar(50) not null ,
UNUSED varchar(50) not null ,
)

create table #TABLE_SPACE_USED
(
Seqintnot null
identity(1,1)primary key clustered,
TABLE_NAME sysnamenot null ,
TABLE_ROWS numeric(18,0)not null ,
RESERVED varchar(50) not null ,
DATA varchar(50) not null ,
INDEX_SIZE varchar(50) not null ,
UNUSED varchar(50) not null ,
)

create table #TABLE_SPACE
(
Seqintnot null
identity(1,1)primary key clustered,
TABLE_NAME SYSNAME not null ,
TABLE_ROWS int not null ,
RESERVED int not null ,
DATA int not null ,
INDEX_SIZE int not null ,
UNUSED int not null ,
USED_MBnumeric(18,4)not null,
USED_GBnumeric(18,4)not null,
AVERAGE_BYTES_PER_ROWnumeric(18,5)null,
AVERAGE_DATA_BYTES_PER_ROWnumeric(18,5)null,
AVERAGE_INDEX_BYTES_PER_ROWnumeric(18,5)null,
AVERAGE_UNUSED_BYTES_PER_ROWnumeric(18,5)null,
)

declare @fetch_status int

declare @proc varchar(200)
select@proc= rtrim(db_name())+'.dbo.sp_spaceused'

declare Cur_Cursor cursor local
for
select
TABLE_NAME=
rtrim(TABLE_SCHEMA)+'.'+rtrim(TABLE_NAME)
from
INFORMATION_SCHEMA.TABLES
where
TABLE_TYPE= 'BASE TABLE'
order by
1

open Cur_Cursor

declare @TABLE_NAME varchar(200)

select @fetch_status = 0

while @fetch_status = 0
begin

fetch next from Cur_Cursor
into
@TABLE_NAME

select @fetch_status = @@fetch_status

if @fetch_status <> 0
begin
continue
end

truncate table #TABLE_SPACE_WORK

insert into #TABLE_SPACE_WORK
(
TABLE_NAME,
TABLE_ROWS,
RESERVED,
DATA,
INDEX_SIZE,
UNUSED
)
exec @proc @objname =
@TABLE_NAME ,@updateusage = 'true'


-- Needed to work with SQL 7
update #TABLE_SPACE_WORK
set
TABLE_NAME = @TABLE_NAME

insert into #TABLE_SPACE_USED
(
TABLE_NAME,
TABLE_ROWS,
RESERVED,
DATA,
INDEX_SIZE,
UNUSED
)
select
TABLE_NAME,
TABLE_ROWS,
RESERVED,
DATA,
INDEX_SIZE,
UNUSED
from
#TABLE_SPACE_WORK

end --While end

close Cur_Cursor

deallocate Cur_Cursor

insert into #TABLE_SPACE
(
TABLE_NAME,
TABLE_ROWS,
RESERVED,
DATA,
INDEX_SIZE,
UNUSED,
USED_MB,
USED_GB,
AVERAGE_BYTES_PER_ROW,
AVERAGE_DATA_BYTES_PER_ROW,
AVERAGE_INDEX_BYTES_PER_ROW,
AVERAGE_UNUSED_BYTES_PER_ROW

)
select
TABLE_NAME,
TABLE_ROWS,
RESERVED,
DATA,
INDEX_SIZE,
UNUSED,
USED_MB=
round(convert(numeric(25,10),RESERVED)/
convert(numeric(25,10),1024),4),
USED_GB=
round(convert(numeric(25,10),RESERVED)/
convert(numeric(25,10),1024*1024),4),
AVERAGE_BYTES_PER_ROW=
case
when TABLE_ROWS <> 0
then round(
(1024.000000*convert(numeric(25,10),RESERVED))/
convert(numeric(25,10),TABLE_ROWS),5)
else null
end,
AVERAGE_DATA_BYTES_PER_ROW=
case
when TABLE_ROWS <> 0
then round(
(1024.000000*convert(numeric(25,10),DATA))/
convert(numeric(25,10),TABLE_ROWS),5)
else null
end,
AVERAGE_INDEX_BYTES_PER_ROW=
case
when TABLE_ROWS <> 0
then round(
(1024.000000*convert(numeric(25,10),INDEX_SIZE))/
convert(numeric(25,10),TABLE_ROWS),5)
else null
end,
AVERAGE_UNUSED_BYTES_PER_ROW=
case
when TABLE_ROWS <> 0
then round(
(1024.000000*convert(numeric(25,10),UNUSED))/
convert(numeric(25,10),TABLE_ROWS),5)
else null
end
from
(
select
TABLE_NAME,
TABLE_ROWS,
RESERVED=
convert(int,rtrim(replace(RESERVED,'KB',''))),
DATA=
convert(int,rtrim(replace(DATA,'KB',''))),
INDEX_SIZE=
convert(int,rtrim(replace(INDEX_SIZE,'KB',''))),
UNUSED=
convert(int,rtrim(replace(UNUSED,'KB','')))
from
#TABLE_SPACE_USED aa
) a
order by
TABLE_NAME

print 'Show results in descending order by size in MB'

select * from #TABLE_SPACE order by USED_MB desc
go

drop table #TABLE_SPACE_WORK
drop table #TABLE_SPACE_USED
drop table #TABLE_SPACE




CODO ERGO SUM

View 12 Replies View Related

Please Test My Script To Analyze Table Keys (was Submitted For Your Review...:)

Feb 25, 2005

Here is a script I wrote that analyzes datasets and returns all the minimal composite and unary keys that uniquely identify records. I wrote it because I frequently have to analyze client spreadsheets and non-normalized data tables.

On my desktop server it took about two minutes to analyze 2000 permutations of a table with 50 columns and 5000 records.

Please try it out for me and let me know if it chokes on anything, or if you see any ways it could be improved!

View 8 Replies View Related

SQL Server Admin 2014 :: How To Analyze Large Procedure Cache

Jun 15, 2015

I want to analyze procedure cache, to find inefficient plans and parameter issues.

I do it trow DMV But my requests to DMV are very slow and demand resources because procedure cache is about several GB Actually I dont need on-line analysis.

Is it possible to have fast snapshot of procedure cache?

View 0 Replies View Related

Excel Data Mining Add-in - Analyze Key Influencers - Remote Processing Issue

Nov 12, 2007

I have installed the excel DM addin and am trying to work through the tutorials -

When I run the 'Analyze Key Influencers' tool against the sample data through a remote AS server I get:
The task was not able to detect any key influencers for the 'Purchased Bike' column. The values of 'Purchased Bike' seem unrelated to values of other columns.

however when I run it against a local AS server I get the expected results.

I can see no differences in settings or setup between the AS instances I am trying to use - perhaps a permissions issue?
Thank you

View 4 Replies View Related

X-ref Documentation For DTS-package,views,tables,Reporting Service,Analyze Service

Mar 27, 2006

We are using the whole BI-package from Microsoft - from SQL, DTS-package,Raporting Service and Analyze Service.

It should be very helpful to be able to create a metadata databases where you could find all releations between different objects (tables,views,reports,cubes,DTS-package,Databases.

Just to get answer for: 'where is view xxx used', 'what are Report xxx depending upon'.

While everything exists in different SQL databases it should possible to do.

Has anyone any comments or the same needs ?

View 1 Replies View Related







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