If I have SQL server installed on one partition(D:) and the OS installed on
another(C:), if I need to re-install the OS is it possible to re-install SQL
server without loosing my already created databases?
The drive with the OS got corrupted somehow over the weekend, but the SQL
server drive still seems to be working just fine.As long as the database data and log files are on a DIFFERENT physical
drive, you can re-install SQL Server, then use sp_attach_db to re-attach the
physical files to the new SQL Server..
Look for sp_attach_db in the SQL Books.
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Russ" <russ@.acordiamn.com> wrote in message
news:%23e2DsMVcDHA.2572@.TK2MSFTNGP12.phx.gbl...
> If I have SQL server installed on one partition(D:) and the OS installed
on
> another(C:), if I need to re-install the OS is it possible to re-install
SQL
> server without loosing my already created databases?
> The drive with the OS got corrupted somehow over the weekend, but the SQL
> server drive still seems to be working just fine.
>|||You can use 'sp_change_users_login' to (find unconnected
users through 'report' option and ) link existing logins
with database permissions. Now, the logins are maintained
in master and will be lost upon new installation or master
rebuild. You have to re-enter all login/password
information. Alternatively, you can keep list of passwords
with you through this script generator
select 'EXEC sp_addlogin '''+name+''', ', CONVERT(VARBINARY
(32), password), ', @.encryptopt = ''skip_encryption'''
from syslogins
where dbname='test' -- database name
and name <> 'sa' -- exclusion list
order by name
(replace TABS with space on the resulting script and
execute it to create logins)
Happy computing,
Muhammad Zeeshan
>--Original Message--
>If I backup the Data files (mdf & ldf) before
reinstalling can I avoid
>having to redo all the permissions for the various
databases?
>I also have tape back-ups, but using them to restore
would lose the last
>weeks worth of data, so I would rather not have to do
that if it can be
>avoided.
>
>"Russ" <russ@.acordiamn.com> wrote in message
>news:%23e2DsMVcDHA.2572@.TK2MSFTNGP12.phx.gbl...
>> If I have SQL server installed on one partition(D:) and
the OS installed
>on
>> another(C:), if I need to re-install the OS is it
possible to re-install
>SQL
>> server without loosing my already created databases?
>> The drive with the OS got corrupted somehow over the
weekend, but the SQL
>> server drive still seems to be working just fine.
>>
>
>.
>sql
Showing posts with label partition. Show all posts
Showing posts with label partition. Show all posts
Wednesday, March 21, 2012
Monday, March 12, 2012
re-indexing "sliding window" partitioned tables - is it necessary?
Hello
We have a partitioning strategy in place where we keep 10 days worth of data
each on its own day partition and a weekly sliding window where we remove old
days and add new days.
These tables only experience INSERTS (Bulk inserts and BCP), no updates or
deletes and our clustered index is also partitioned.
I would like to know if it is necessary to ever check for fragmentation or
re-index this table. My thinking is that it is not as all INSERTS will be
contigiuous.
thanks
--
-- cranfield, DBA> I would like to know if it is necessary to ever check for fragmentation or
> re-index this table. My thinking is that it is not as all INSERTS will be
> contigiuous.
It is likely you have at least some fragmentation unless you load data in
index key order of all indexes. You might consider including an ALTER INDEX
REBUILD or REORGANIZE of the last loaded partition as part of your daily
sliding window maintenance. If you SWITCH a fully loaded table into the
partitioned table, you can reorg before switching in.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Cranfield" <alan_cranfield@.msn.co.za> wrote in message
news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
> Hello
> We have a partitioning strategy in place where we keep 10 days worth of
> data
> each on its own day partition and a weekly sliding window where we remove
> old
> days and add new days.
> These tables only experience INSERTS (Bulk inserts and BCP), no updates or
> deletes and our clustered index is also partitioned.
> I would like to know if it is necessary to ever check for fragmentation or
> re-index this table. My thinking is that it is not as all INSERTS will be
> contigiuous.
> thanks
> --
> -- cranfield, DBA|||Hi Dan
Yes, that makes sense. Our partitioned table gets loaded intra-businessday
and we the window gets moved only once a week on the weekend. We have 7 days
of future partitions always defined. So would you suggest a fragmentation
check at the end of each business day and then a rebuild of the entire index
should there be excessive fragmentation? Our maintenance window is very
small and these partitioned tables have approx 1 mill rows/day.
--
-- cranfield, DBA
"Dan Guzman" wrote:
> > I would like to know if it is necessary to ever check for fragmentation or
> > re-index this table. My thinking is that it is not as all INSERTS will be
> > contigiuous.
> It is likely you have at least some fragmentation unless you load data in
> index key order of all indexes. You might consider including an ALTER INDEX
> REBUILD or REORGANIZE of the last loaded partition as part of your daily
> sliding window maintenance. If you SWITCH a fully loaded table into the
> partitioned table, you can reorg before switching in.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Cranfield" <alan_cranfield@.msn.co.za> wrote in message
> news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
> > Hello
> >
> > We have a partitioning strategy in place where we keep 10 days worth of
> > data
> > each on its own day partition and a weekly sliding window where we remove
> > old
> > days and add new days.
> >
> > These tables only experience INSERTS (Bulk inserts and BCP), no updates or
> > deletes and our clustered index is also partitioned.
> >
> > I would like to know if it is necessary to ever check for fragmentation or
> > re-index this table. My thinking is that it is not as all INSERTS will be
> > contigiuous.
> >
> > thanks
> > --
> > -- cranfield, DBA
>|||> So would you suggest a fragmentation
> check at the end of each business day and then a rebuild of the entire
> index
> should there be excessive fragmentation? Our maintenance window is very
> small and these partitioned tables have approx 1 mill rows/day.
Assuming your indexes are aligned, you might consider an unconditional
REBUILD or REORGANIZE of only the last loaded partition since I expect
you'll have about the same level of fragmentation of the newly loaded
partition every day. If you don't have a large enough maintenance window to
REBUILD, you can still REORGANIZE online to reduce fragmentation.
Hope this helps.
Dan Guzman
SQL Server MVP
"Cranfield" <alan_cranfield@.msn.co.za> wrote in message
news:8F5B6484-731A-4B99-8EAC-EBD811B42854@.microsoft.com...
> Hi Dan
> Yes, that makes sense. Our partitioned table gets loaded intra-businessday
> and we the window gets moved only once a week on the weekend. We have 7
> days
> of future partitions always defined. So would you suggest a fragmentation
> check at the end of each business day and then a rebuild of the entire
> index
> should there be excessive fragmentation? Our maintenance window is very
> small and these partitioned tables have approx 1 mill rows/day.
> --
> -- cranfield, DBA
>
> "Dan Guzman" wrote:
>> > I would like to know if it is necessary to ever check for fragmentation
>> > or
>> > re-index this table. My thinking is that it is not as all INSERTS will
>> > be
>> > contigiuous.
>> It is likely you have at least some fragmentation unless you load data in
>> index key order of all indexes. You might consider including an ALTER
>> INDEX
>> REBUILD or REORGANIZE of the last loaded partition as part of your daily
>> sliding window maintenance. If you SWITCH a fully loaded table into the
>> partitioned table, you can reorg before switching in.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Cranfield" <alan_cranfield@.msn.co.za> wrote in message
>> news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
>> > Hello
>> >
>> > We have a partitioning strategy in place where we keep 10 days worth of
>> > data
>> > each on its own day partition and a weekly sliding window where we
>> > remove
>> > old
>> > days and add new days.
>> >
>> > These tables only experience INSERTS (Bulk inserts and BCP), no updates
>> > or
>> > deletes and our clustered index is also partitioned.
>> >
>> > I would like to know if it is necessary to ever check for fragmentation
>> > or
>> > re-index this table. My thinking is that it is not as all INSERTS will
>> > be
>> > contigiuous.
>> >
>> > thanks
>> > --
>> > -- cranfield, DBA
We have a partitioning strategy in place where we keep 10 days worth of data
each on its own day partition and a weekly sliding window where we remove old
days and add new days.
These tables only experience INSERTS (Bulk inserts and BCP), no updates or
deletes and our clustered index is also partitioned.
I would like to know if it is necessary to ever check for fragmentation or
re-index this table. My thinking is that it is not as all INSERTS will be
contigiuous.
thanks
--
-- cranfield, DBA> I would like to know if it is necessary to ever check for fragmentation or
> re-index this table. My thinking is that it is not as all INSERTS will be
> contigiuous.
It is likely you have at least some fragmentation unless you load data in
index key order of all indexes. You might consider including an ALTER INDEX
REBUILD or REORGANIZE of the last loaded partition as part of your daily
sliding window maintenance. If you SWITCH a fully loaded table into the
partitioned table, you can reorg before switching in.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Cranfield" <alan_cranfield@.msn.co.za> wrote in message
news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
> Hello
> We have a partitioning strategy in place where we keep 10 days worth of
> data
> each on its own day partition and a weekly sliding window where we remove
> old
> days and add new days.
> These tables only experience INSERTS (Bulk inserts and BCP), no updates or
> deletes and our clustered index is also partitioned.
> I would like to know if it is necessary to ever check for fragmentation or
> re-index this table. My thinking is that it is not as all INSERTS will be
> contigiuous.
> thanks
> --
> -- cranfield, DBA|||Hi Dan
Yes, that makes sense. Our partitioned table gets loaded intra-businessday
and we the window gets moved only once a week on the weekend. We have 7 days
of future partitions always defined. So would you suggest a fragmentation
check at the end of each business day and then a rebuild of the entire index
should there be excessive fragmentation? Our maintenance window is very
small and these partitioned tables have approx 1 mill rows/day.
--
-- cranfield, DBA
"Dan Guzman" wrote:
> > I would like to know if it is necessary to ever check for fragmentation or
> > re-index this table. My thinking is that it is not as all INSERTS will be
> > contigiuous.
> It is likely you have at least some fragmentation unless you load data in
> index key order of all indexes. You might consider including an ALTER INDEX
> REBUILD or REORGANIZE of the last loaded partition as part of your daily
> sliding window maintenance. If you SWITCH a fully loaded table into the
> partitioned table, you can reorg before switching in.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Cranfield" <alan_cranfield@.msn.co.za> wrote in message
> news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
> > Hello
> >
> > We have a partitioning strategy in place where we keep 10 days worth of
> > data
> > each on its own day partition and a weekly sliding window where we remove
> > old
> > days and add new days.
> >
> > These tables only experience INSERTS (Bulk inserts and BCP), no updates or
> > deletes and our clustered index is also partitioned.
> >
> > I would like to know if it is necessary to ever check for fragmentation or
> > re-index this table. My thinking is that it is not as all INSERTS will be
> > contigiuous.
> >
> > thanks
> > --
> > -- cranfield, DBA
>|||> So would you suggest a fragmentation
> check at the end of each business day and then a rebuild of the entire
> index
> should there be excessive fragmentation? Our maintenance window is very
> small and these partitioned tables have approx 1 mill rows/day.
Assuming your indexes are aligned, you might consider an unconditional
REBUILD or REORGANIZE of only the last loaded partition since I expect
you'll have about the same level of fragmentation of the newly loaded
partition every day. If you don't have a large enough maintenance window to
REBUILD, you can still REORGANIZE online to reduce fragmentation.
Hope this helps.
Dan Guzman
SQL Server MVP
"Cranfield" <alan_cranfield@.msn.co.za> wrote in message
news:8F5B6484-731A-4B99-8EAC-EBD811B42854@.microsoft.com...
> Hi Dan
> Yes, that makes sense. Our partitioned table gets loaded intra-businessday
> and we the window gets moved only once a week on the weekend. We have 7
> days
> of future partitions always defined. So would you suggest a fragmentation
> check at the end of each business day and then a rebuild of the entire
> index
> should there be excessive fragmentation? Our maintenance window is very
> small and these partitioned tables have approx 1 mill rows/day.
> --
> -- cranfield, DBA
>
> "Dan Guzman" wrote:
>> > I would like to know if it is necessary to ever check for fragmentation
>> > or
>> > re-index this table. My thinking is that it is not as all INSERTS will
>> > be
>> > contigiuous.
>> It is likely you have at least some fragmentation unless you load data in
>> index key order of all indexes. You might consider including an ALTER
>> INDEX
>> REBUILD or REORGANIZE of the last loaded partition as part of your daily
>> sliding window maintenance. If you SWITCH a fully loaded table into the
>> partitioned table, you can reorg before switching in.
>> --
>> Hope this helps.
>> Dan Guzman
>> SQL Server MVP
>> "Cranfield" <alan_cranfield@.msn.co.za> wrote in message
>> news:89CC380F-46B3-4E0B-927A-4552627BF667@.microsoft.com...
>> > Hello
>> >
>> > We have a partitioning strategy in place where we keep 10 days worth of
>> > data
>> > each on its own day partition and a weekly sliding window where we
>> > remove
>> > old
>> > days and add new days.
>> >
>> > These tables only experience INSERTS (Bulk inserts and BCP), no updates
>> > or
>> > deletes and our clustered index is also partitioned.
>> >
>> > I would like to know if it is necessary to ever check for fragmentation
>> > or
>> > re-index this table. My thinking is that it is not as all INSERTS will
>> > be
>> > contigiuous.
>> >
>> > thanks
>> > --
>> > -- cranfield, DBA
Subscribe to:
Posts (Atom)