I have created the database maintenance plan for SQL Server for full backup,
differential backup and transactional backup and scheduled. If I see the job
status as completed successfully and if I can see the physically the file
being created, am I on the safe side of thinking that I have the recoverable
backup. I normally check the restore activity once in 6 months. Do I have to
check any thing else to make sure my back up is successful? Does any one has
any experience of not being able to restore the SQL Server instances from
the backup copies.
I am making sure that I am perfect in terms of backup and restore
activities.
SQL2K.
Thank you,
AllenAllenHubatka (AllenHubtka_67@.hotmail.com) writes:
> I have created the database maintenance plan for SQL Server for full
> backup, differential backup and transactional backup and scheduled. If I
> see the job status as completed successfully and if I can see the
> physically the file being created, am I on the safe side of thinking
> that I have the recoverable backup. I normally check the restore
> activity once in 6 months. Do I have to check any thing else to make
> sure my back up is successful? Does any one has any experience of not
> being able to restore the SQL Server instances from the backup copies.
There is really only one way to check if a backup is good, and that
is to restore it and run DBCC CHECKDB on it. Whether you always do this,
or only at random occassions depends on how paranoid you are. Personally,
I'd say twice a year is a tad seldom.
Not that backups fail that often, but then again maybe you have some
creeping corruption. I have experienced that DBCC on a restored file
revealed errors that did not exhibit in the original database. This
was in SQL 6.0, so this may not happen today. Then again, it's all a
matter of how paranoid you are...
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
Showing posts with label mssql. Show all posts
Showing posts with label mssql. Show all posts
Friday, March 30, 2012
Monday, March 12, 2012
identity insert
is there any way to force mssql to insert user defined value in identity column?check out SET IDENTITY_INSERT in books on line.
assume a table called ABC and the xyz field is an identity...
SET IDENTITY_INSERT ABC on
insert into ABC (xyz, filed2, field3, ...)
select 14, 'A','B',...
SET IDENTITY_INSERT OFF
assume a table called ABC and the xyz field is an identity...
SET IDENTITY_INSERT ABC on
insert into ABC (xyz, filed2, field3, ...)
select 14, 'A','B',...
SET IDENTITY_INSERT OFF
Friday, February 24, 2012
Identity column confusion
I have imported a pretty large table from Access to MSSQL 2K
I have a column that is a ID column, which is an int. If I try to set it to be an identity column, the sort in the table gets all messed up :-
If I add a new column and want to have that as the identity my sort gets messed up (sort is extremely important to me in this case)
Anybody has any idea why this would be happening? I am trying to add a column via Enterprise Manager
Thanks
Branka> If I try to set it to be an identity column, the sort in the table gets
all messed up :-(
That's because your table isn't "sorted" ... a table, by definition, is an
unordered set of rows. There is no relationship between application of an
IDENTITY addition and any conceptual sort order you might envision. You
might get lucky if you add a clustered index on your desired sort column(s),
and *then* apply the IDENTITY, but this behavior is not guaranteed -- purely
coincidental.
Also, are you going to do this over again, every time the data in your
desired sort column(s) change? What happens when you add a row, the new row
will have the highest IDENTITY value, but it will almost certainly no longer
fit your "very important" sort order.
Instead, I think you should generate this "rank" number at query time. See
http://www.aspfaq.com/2427 for some ideas.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||> I have a column that is a ID column, which is an int. If I try to set it
to be an identity column, the sort in the table gets all messed up :-(
Do you mean the ID values change or that you simply see the rows in a
different order? In SQL, tables have no logical ordering. If you want to see
the table in order use ORDER BY on your SELECT statement - that's the only
way to guarantee that the rows will be returned in a particular order.
> If I add a new column and want to have that as the identity my sort gets
messed up (sort is extremely important to me in this case).
I'm not sure what you're asking here. You can't have two IDENTITY columns in
a table, nor should that be necessary. If you mean that the sequence of
values in the column is important to you then don't use IDENTITY. You can't
control the order in which IDENTITY values are assigned to rows. The order
is indeterminate, there may be gaps and IDENTITY columns don't even have to
be unique (although typically they are assigned a UNIQUE constraint).
--
David Portas
--
Please reply only to the newsgroup
--|||> IDENTITY columns don't even have to be unique
That's a great point that I think a lot of people miss.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
I have a column that is a ID column, which is an int. If I try to set it to be an identity column, the sort in the table gets all messed up :-
If I add a new column and want to have that as the identity my sort gets messed up (sort is extremely important to me in this case)
Anybody has any idea why this would be happening? I am trying to add a column via Enterprise Manager
Thanks
Branka> If I try to set it to be an identity column, the sort in the table gets
all messed up :-(
That's because your table isn't "sorted" ... a table, by definition, is an
unordered set of rows. There is no relationship between application of an
IDENTITY addition and any conceptual sort order you might envision. You
might get lucky if you add a clustered index on your desired sort column(s),
and *then* apply the IDENTITY, but this behavior is not guaranteed -- purely
coincidental.
Also, are you going to do this over again, every time the data in your
desired sort column(s) change? What happens when you add a row, the new row
will have the highest IDENTITY value, but it will almost certainly no longer
fit your "very important" sort order.
Instead, I think you should generate this "rank" number at query time. See
http://www.aspfaq.com/2427 for some ideas.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/|||> I have a column that is a ID column, which is an int. If I try to set it
to be an identity column, the sort in the table gets all messed up :-(
Do you mean the ID values change or that you simply see the rows in a
different order? In SQL, tables have no logical ordering. If you want to see
the table in order use ORDER BY on your SELECT statement - that's the only
way to guarantee that the rows will be returned in a particular order.
> If I add a new column and want to have that as the identity my sort gets
messed up (sort is extremely important to me in this case).
I'm not sure what you're asking here. You can't have two IDENTITY columns in
a table, nor should that be necessary. If you mean that the sequence of
values in the column is important to you then don't use IDENTITY. You can't
control the order in which IDENTITY values are assigned to rows. The order
is indeterminate, there may be gaps and IDENTITY columns don't even have to
be unique (although typically they are assigned a UNIQUE constraint).
--
David Portas
--
Please reply only to the newsgroup
--|||> IDENTITY columns don't even have to be unique
That's a great point that I think a lot of people miss.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Subscribe to:
Posts (Atom)