dbTalk Databases Forums  

Auto stats

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Auto stats in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alhambra Eidos Kiquenet
 
Posts: n/a

Default Auto stats - 04-10-2008 , 04:31 AM






Hi all,
I have an dtsx (SSIS) for "clone" manually Sql server database to another.

How I copy all stats from one database to another ? I have problem with
"auto stats".

When I try DROP statitics for auto stats I get this error:

No se puede DROP el Ã*ndice 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'.
No es una colección de estadÃ*sticas.

Cannot DROP index 'dbo.ACTIVIDAD_PROVEEDOR.PK_ACTIVIDAD_PROVEEDOR'. Not
statitics collection.


What can I do ??


-- Get Stats list
SELECT
'[' + SCHEMA_NAME(tbl.schema_id) + '].[' + tbl.name + ']' AS
[Table_Name_With_Schema],
'[' + st.name + ']' AS [Name],
'' + SCHEMA_NAME(tbl.schema_id) + '.' + tbl.name + ''
+ '.' + st.name + '' AS [Estadistica]
FROM
sys.tables AS tbl
INNER JOIN sys.stats st ON st.object_id=tbl.object_id
ORDER BY
[Table_Name_With_Schema] ASC,[Name] ASC


Thanks in advance, any help will be appreciated, regards, greetings

--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.