Thursday, March 29, 2012
Basic Question on SQL Server 2005 Backup Theory
dynamically) from one sql server to another, all pragmatically.
Once a week, I do a full backup and restore it on the destination.
All other times I am just backing up the log files, copying them over,
and restoring them. Basically a glorified log ship.
About once a week, I get various exceptions stating the following:
********
System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
because there is no current database backup.
********
My question is: with this scenario, how often do I have to actually
perform a full backup? Does SQL Server 2005 really care?
Thanks a lot,
Michael Gorsuch
> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
Only the very first time. Assuming you ship all transaction log backups, and don't do anything with
the originating database that break the log backup sequence (like put it in simple recovery model).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Michael Gorsuch" <michael.gorsuch@.gmail.com> wrote in message
news:1177597505.788472.212590@.t39g2000prd.googlegr oups.com...
>I am replicating a large number of databases (the size changes
> dynamically) from one sql server to another, all pragmatically.
> Once a week, I do a full backup and restore it on the destination.
> All other times I am just backing up the log files, copying them over,
> and restoring them. Basically a glorified log ship.
> About once a week, I get various exceptions stating the following:
> ********
> System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
> because there is no current database backup.
> ********
> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
> Thanks a lot,
> Michael Gorsuch
>
Basic Question on SQL Server 2005 Backup Theory
dynamically) from one sql server to another, all pragmatically.
Once a week, I do a full backup and restore it on the destination.
All other times I am just backing up the log files, copying them over,
and restoring them. Basically a glorified log ship.
About once a week, I get various exceptions stating the following:
********
System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
because there is no current database backup.
********
My question is: with this scenario, how often do I have to actually
perform a full backup? Does SQL Server 2005 really care?
Thanks a lot,
Michael Gorsuch> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
Only the very first time. Assuming you ship all transaction log backups, and
don't do anything with
the originating database that break the log backup sequence (like put it in
simple recovery model).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Michael Gorsuch" <michael.gorsuch@.gmail.com> wrote in message
news:1177597505.788472.212590@.t39g2000prd.googlegroups.com...
>I am replicating a large number of databases (the size changes
> dynamically) from one sql server to another, all pragmatically.
> Once a week, I do a full backup and restore it on the destination.
> All other times I am just backing up the log files, copying them over,
> and restoring them. Basically a glorified log ship.
> About once a week, I get various exceptions stating the following:
> ********
> System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
> because there is no current database backup.
> ********
> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
> Thanks a lot,
> Michael Gorsuch
>
Basic Question on SQL Server 2005 Backup Theory
dynamically) from one sql server to another, all pragmatically.
Once a week, I do a full backup and restore it on the destination.
All other times I am just backing up the log files, copying them over,
and restoring them. Basically a glorified log ship.
About once a week, I get various exceptions stating the following:
********
System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
because there is no current database backup.
********
My question is: with this scenario, how often do I have to actually
perform a full backup? Does SQL Server 2005 really care?
Thanks a lot,
Michael Gorsuch> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
Only the very first time. Assuming you ship all transaction log backups, and don't do anything with
the originating database that break the log backup sequence (like put it in simple recovery model).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Michael Gorsuch" <michael.gorsuch@.gmail.com> wrote in message
news:1177597505.788472.212590@.t39g2000prd.googlegroups.com...
>I am replicating a large number of databases (the size changes
> dynamically) from one sql server to another, all pragmatically.
> Once a week, I do a full backup and restore it on the destination.
> All other times I am just backing up the log files, copying them over,
> and restoring them. Basically a glorified log ship.
> About once a week, I get various exceptions stating the following:
> ********
> System.Data.SqlClient.SqlException: BACKUP LOG cannot be performed
> because there is no current database backup.
> ********
> My question is: with this scenario, how often do I have to actually
> perform a full backup? Does SQL Server 2005 really care?
> Thanks a lot,
> Michael Gorsuch
>sql
Tuesday, March 20, 2012
Baffled! Cant figure out how to do this query. Is it even possible?
or "assigned".
I want to get a count for each tech with a column showing number of
issues on hold and a column for number of issues assigned. It would
look like this --
Tech Num_Assigned Num_On_Hold
Fred 3 10
Carol 6 7
I can get each column separately, but I want both in the same answer
table!
Is that too much to ask? :)You need to do a self join on the table. Without your table
definition, it would be something like this
SELECT TI1.Tech,
Num_Assigned = COUNT(TI1.TechID),
Num_On_Hold = COUNT(TI2.TechID)
FROM TechIssues TI1, TechIssues TI2
WHERE TI1.TechID = TI2.TechID
GROUP BY TI1.Tech
Now, the above assumes that all techs have issues assigned AND issues
on HOLD. You'd need to UNION a couple more of these to handle where
Techs have records assigned but not on hold and vice versa. But this
should get you started.
Hope it helps
Teresa Masino|||jonescv@.gw.ccsd.net wrote:
> I have an "Issues" table for my technicians. An issue can be on "hold"
> or "assigned".
> I want to get a count for each tech with a column showing number of
> issues on hold and a column for number of issues assigned. It would
> look like this --
> Tech Num_Assigned Num_On_Hold
> Fred 3 10
> Carol 6 7
>
> I can get each column separately, but I want both in the same answer
> table!
> Is that too much to ask? :)
Here's a guess:
SELECT tech,
COUNT(CASE WHEN status = 'assigned' THEN 1 END),
COUNT(CASE WHEN status = 'hold' THEN 1 END)
FROM your_table
GROUP BY tech ;
--
David Portas
SQL Server MVP
--