How to drop all primary key of all tables in DB?
After reading a document for explaning how to use clustered index, I knew
set all primary key to be clustered is not correct for me.
I would like to drop them. recreate a new nonclustered primary key and
create other clustered indexes.
Now I would like to know how to drop all primary key of all tables in DB by
T-SQL, because there are too many tables to drop primary key by hand.
Thanks
--UsingSQL2005DevFrank
declare @.pklist table
(
ident int identity(1, 1),
pkname sysname,
tablename sysname
)
insert into
@.pklist
(
pkname,
tablename
)
select
constraint_name,
table_name
from
information_schema.table_constraints
where
constraint_type = 'primary key'
set @.counter = @.@.rowcount
while @.counter > 0
begin
select @.constraint = pkname, @.table = tablename from @.pklist where ident =
@.counter
exec ('alter table [' + @.table + '] drop constraint [' + @.constraint + ']')
set @.counter = @.counter - 1
end
"Frank Lee" <Reply@.to.newsgroup> wrote in message
news:ezgjh5CEGHA.3528@.TK2MSFTNGP12.phx.gbl...
> How to drop all primary key of all tables in DB?
> After reading a document for explaning how to use clustered index, I knew
> set all primary key to be clustered is not correct for me.
> I would like to drop them. recreate a new nonclustered primary key and
> create other clustered indexes.
> Now I would like to know how to drop all primary key of all tables in DB
> by T-SQL, because there are too many tables to drop primary key by hand.
> Thanks
> --UsingSQL2005Dev
>|||Hi
You should extend Uri's solution so that all Foreign Keys that reference
your Primary Key is removed before trying to remove the Primary Key.
John
"Frank Lee" <Reply@.to.newsgroup> wrote in message
news:ezgjh5CEGHA.3528@.TK2MSFTNGP12.phx.gbl...
> How to drop all primary key of all tables in DB?
> After reading a document for explaning how to use clustered index, I knew
> set all primary key to be clustered is not correct for me.
> I would like to drop them. recreate a new nonclustered primary key and
> create other clustered indexes.
> Now I would like to know how to drop all primary key of all tables in DB
> by T-SQL, because there are too many tables to drop primary key by hand.
> Thanks
> --UsingSQL2005Dev
>|||I see. Thx.
"John Bell" <jbellnewsposts@.hotmail.com> glsD:eNvQsxGEGHA.3892@.TK2MSFTNGP10.phx.g
bl...
> Hi
> You should extend Uri's solution so that all Foreign Keys that reference
> your Primary Key is removed before trying to remove the Primary Key.
> John
> "Frank Lee" <Reply@.to.newsgroup> wrote in message
> news:ezgjh5CEGHA.3528@.TK2MSFTNGP12.phx.gbl...
>
Showing posts with label document. Show all posts
Showing posts with label document. Show all posts
Friday, March 9, 2012
Wednesday, March 7, 2012
How to document the reports
OK, I guess you could always just whip up MS Word and write some
documentation about a report there, and be happy. But is there a more
structured way of doing it? Some application or plugin for Visual Studio
perhaps?
I'd like it to make a list of what reports are in my report solution, and
shared datasources. And then for each report, a list of datasources used,
maybe a list of datasets and a field for free text comments about "This
report uses a matrix, which displays subtotals on columns and rows."
Which in time can be searched through, so the next time I want a report with
a matrix with subtotals, I can check this one out for any clever tricks I
did to make it work. :)
Kaisa M. LindahlIf you willing to write some code, then it is possible.
Just parse your RDL file(s), analyze it and generate a doc.
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:uq9plHUEGHA.2292@.tk2msftngp13.phx.gbl...
> OK, I guess you could always just whip up MS Word and write some
> documentation about a report there, and be happy. But is there a more
> structured way of doing it? Some application or plugin for Visual Studio
> perhaps?
> I'd like it to make a list of what reports are in my report solution, and
> shared datasources. And then for each report, a list of datasources used,
> maybe a list of datasets and a field for free text comments about "This
> report uses a matrix, which displays subtotals on columns and rows."
> Which in time can be searched through, so the next time I want a report
> with a matrix with subtotals, I can check this one out for any clever
> tricks I did to make it work. :)
> Kaisa M. Lindahl
>
documentation about a report there, and be happy. But is there a more
structured way of doing it? Some application or plugin for Visual Studio
perhaps?
I'd like it to make a list of what reports are in my report solution, and
shared datasources. And then for each report, a list of datasources used,
maybe a list of datasets and a field for free text comments about "This
report uses a matrix, which displays subtotals on columns and rows."
Which in time can be searched through, so the next time I want a report with
a matrix with subtotals, I can check this one out for any clever tricks I
did to make it work. :)
Kaisa M. LindahlIf you willing to write some code, then it is possible.
Just parse your RDL file(s), analyze it and generate a doc.
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:uq9plHUEGHA.2292@.tk2msftngp13.phx.gbl...
> OK, I guess you could always just whip up MS Word and write some
> documentation about a report there, and be happy. But is there a more
> structured way of doing it? Some application or plugin for Visual Studio
> perhaps?
> I'd like it to make a list of what reports are in my report solution, and
> shared datasources. And then for each report, a list of datasources used,
> maybe a list of datasets and a field for free text comments about "This
> report uses a matrix, which displays subtotals on columns and rows."
> Which in time can be searched through, so the next time I want a report
> with a matrix with subtotals, I can check this one out for any clever
> tricks I did to make it work. :)
> Kaisa M. Lindahl
>
How to Document my Database?
Hi,
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
Leila
How do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general/how-do-i-document/compare-my-sql-server-database-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>
|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek
|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
Leila
How do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general/how-do-i-document/compare-my-sql-server-database-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>
|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek
|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
How to Document my Database?
Hi,
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
LeilaHow do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general...r />
se-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what
to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
LeilaHow do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general...r />
se-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what
to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
How to Document my Database?
Hi,
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
LeilaHow do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general/how-do-i-document/compare-my-sql-server-database-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
I want to document a huge database, but I don't know where to start, what to
document.
Are there any samples or tools for this job? What should be documented?
Thanks in advance,
LeilaHow do I document / compare my SQL Server database(s)?
http://databases.aspfaq.com/general/how-do-i-document/compare-my-sql-server-database-s.html
AMB
"Leila" wrote:
> Hi,
> I want to document a huge database, but I don't know where to start, what to
> document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
>|||Hi,
You can use AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
to document your database.
SCT can very quickly generate simple report with the list of all
tables (listing their names and number of records contanined in each
table), list of all views, stored procedures, functions, triggers and
relationships.
HTH
Darek|||SQLDoc from Red Gate.
"Leila" <Leilas@.hotpop.com> wrote in message
news:uoxUFyeVHHA.5108@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I want to document a huge database, but I don't know where to start, what
> to document.
> Are there any samples or tools for this job? What should be documented?
> Thanks in advance,
> Leila
>
Friday, February 24, 2012
How to do Text Mining using SSIS
Hi
All
Can anyone tell me how to do text mining using SSIS
I have a some financial document in text format and i want to mine those
Thnaks in advance
Satish
All
Can anyone tell me how to do text mining using SSIS
I have a some financial document in text format and i want to mine those
Thnaks in advance
Satish
Can you be a bit more specific about your requirements?
Have you looked at the Term Extraction and Term Lookup components in SSIS?
-Jamie
How to Do Text Mining
Hi
All
Can anyone tell me how to do text mining using Analysis Servvices in sql server 2005
I have a some financial document in text format and i want to mine those
Thnaks in advance
Satish
All
Can anyone tell me how to do text mining using Analysis Servvices in sql server 2005
I have a some financial document in text format and i want to mine those
Thnaks in advance
Satish
The text mining tutorial here should be helpful: http://www.sqlserverdatamining.com/DMCommunity/Tutorials/Links_LinkRedirector.aspx?id=689
Subscribe to:
Posts (Atom)