Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Friday, March 30, 2012

No login name for database user.

I am using SQL2000. I took a backup of the database on the live server to setup the database on my new development computer. In the tables, there are 2 owners’ dbo and indiankarma. The tables that are owned by indiankarma are the tables that the site runs from.

The problem: The database user was created by the .bak file and does not have a login name. I created a security login named indiankarma and set the password, default database, server roles, BUT when I set the database access and click OK, it says User 'Indiankarma' already exists. I tried to delete the database user and start from scratch but it tells me the selected user cannot be dropped because the user owns objects.

Now I have tried sp_changedbowner 'indiankarma' which does give the security login name indiankarma database access but it makes the user dbo not indiankarma. I need the web application to read indiankarma.[tablename] not dbo.[tablename]

Can anyone help me with this problem?? Confused

This is a common issue after restoring a database. Check the following blog

http://weblogs.asp.net/steveschofield/archive/2005/12/31/434280.aspx

Regards

|||

I don't think I explained the problem correctly. When I restored the data base it created 2 sets of tables for each table. One set owned by dbo and the other set by indiankarma. So I have a table that is indiankarma.ikuserinfo and a table right below it that is dbo.ikuserinfo. All the site data is in the indiankarma owned tables. (see below 1.1)

1.1

The problem is that the 'indiankarma' database user has no login name. (See below 1.2).

1.21.2

Also, the security login 'indiankarma' does not have access to the database (see below 1.3) and when I try to give it access, I get this error 'User 'Indiankarma' already exists.' (see below 1.4)

1.3 1.3

1.41.4

I need to know what I can do to get database user 'indiankara' a login name and how to permit security login 'indiankarma' database access with the user 'indiankarma'. So it looks like the figure below (see below 1.5) but when I click ok, it does not give me the error. Please help!!! Sorry for all the images, I am bad at explaining problems thought they might help!

1.51.5

|||

I don't think I explained the problem correctly. When I restored the data base it created 2 sets of tables for each table. One set owned by dbo and the other set by indiankarma. So I have a table that is indiankarma.ikuserinfo and a table right below it that is dbo.ikuserinfo. All the site data is in the indiankarma owned tables. (see below 1.1)

1.1

The problem is that the 'indiankarma' database user has no login name. (See below 1.2).

1.21.2

Also, the security login 'indiankarma' does not have access to the database (see below 1.3) and when I try to give it access, I get this error 'User 'Indiankarma' already exists.' (see below 1.4)

1.3 1.3

1.41.4

I need to know what I can do to get database user 'indiankara' a login name and how to permit security login 'indiankarma' database access with the user 'indiankarma'. So it looks like the figure below (see below 1.5) but when I click ok, it does not give me the error. Please help!!! Sorry for all the images, I am bad at explaining problems thought they might help!

1.51.5

|||

I don't think I explained the problem correctly. When I restored the data base it created 2 sets of tables for each table. One set owned by dbo and the other set by indiankarma. So I have a table that is indiankarma.ikuserinfo and a table right below it that is dbo.ikuserinfo. All the site data is in the indiankarma owned tables. (see below 1.1)

1.1

The problem is that the 'indiankarma' database user has no login name. (See below 1.2).

1.21.2

Also, the security login 'indiankarma' does not have access to the database (see below 1.3) and when I try to give it access, I get this error 'User 'Indiankarma' already exists.' (see below 1.4)

1.3 1.3

1.41.4

I need to know what I can do to get database user 'indiankara' a login name and how to permit security login 'indiankarma' database access with the user 'indiankarma'. So it looks like the figure below (see below 1.5) but when I click ok, it does not give me the error. Please help!!! Sorry for all the images, I am bad at explaining problems thought they might help!

1.51.5

|||

I don't think I explained the problem correctly. When I restored the data base it created 2 sets of tables for each table. One set owned by dbo and the other set by indiankarma. So I have a table that is indiankarma.ikuserinfo and a table right below it that is dbo.ikuserinfo. All the site data is in the indiankarma owned tables. (see below 1.1)1.1
The problem is that the 'indiankarma' database user has no login name. (See below 1.2).1.21.2

Also, the security login 'indiankarma' does not have access to the database (see below 1.3) and when I try to give it access, I get this error 'User 'Indiankarma' already exists.' (see below 1.4)1.3
1.31.4
1.4I need to know what I can do to get database user 'indiankara' a login name and how to permit security login 'indiankarma' database access with the user 'indiankarma'. So it looks like the figure below (see below 1.5) but when I click ok, it does not give me the error. Please help!!! Sorry for all the images, I am bad at explaining problems thought they might help!1.51.5

No log operation

Hi
I have a database with full recovery model.
Every night at 11.00pm performs full backup, and dayly every 3 hours
performs differential backup, and trasnactional log backup performs
every 15 minutes during a day.

I am interested what operations i can not recover from log or
differential backup.

I saw that when i drop table i can recover it from log backup, but is
there some operation that can not be recover

Thanks a lot
Alex

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"acko bogicevic" <aconi2002@.yahoo.com> wrote in message
news:406d2652$0$198$75868355@.news.frii.net...
> Hi
> I have a database with full recovery model.
> Every night at 11.00pm performs full backup, and dayly every 3 hours
> performs differential backup, and trasnactional log backup performs
> every 15 minutes during a day.
> I am interested what operations i can not recover from log or
> differential backup.
> I saw that when i drop table i can recover it from log backup, but is
> there some operation that can not be recover
> Thanks a lot
> Alex
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

In full recovery, all operations are logged, including truncating tables,
dropping objects, bulk loads etc., so you can always recover to any point in
time. See "Recovery models" in Books Online.

Simon

Monday, March 26, 2012

No Differential Backup on Master DB

Hi, Can someone plzz explain the below reason
"Differential backups are not allowed for the master database since
they require that complete backups be applied without recovery as the
first step. When restoring the master database, restore without
recovery is not allowed."
Hi
If you look in BOL on how Master DB needs to be restored, you will notice
that it is not an easy procedure.
If Master DB gets bigger than a manageable size (say 100Mb), then you have a
serious problem. You have user objects in there and you are compromising
your recoverability of your server.
A small DB like Master needs no differential backups and not much changes in
it, and it is so quick to do a full backup, that it is not worth the effort.
Regards-
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1131737977.922320.82800@.g14g2000cwa.googlegro ups.com...
> Hi, Can someone plzz explain the below reason
> "Differential backups are not allowed for the master database since
> they require that complete backups be applied without recovery as the
> first step. When restoring the master database, restore without
> recovery is not allowed."
>

No Differential Backup on Master DB

Hi, Can someone plzz explain the below reason
"Differential backups are not allowed for the master database since
they require that complete backups be applied without recovery as the
first step. When restoring the master database, restore without
recovery is not allowed."Hi
If you look in BOL on how Master DB needs to be restored, you will notice
that it is not an easy procedure.
If Master DB gets bigger than a manageable size (say 100Mb), then you have a
serious problem. You have user objects in there and you are compromising
your recoverability of your server.
A small DB like Master needs no differential backups and not much changes in
it, and it is so quick to do a full backup, that it is not worth the effort.
Regards-
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1131737977.922320.82800@.g14g2000cwa.googlegroups.com...
> Hi, Can someone plzz explain the below reason
> "Differential backups are not allowed for the master database since
> they require that complete backups be applied without recovery as the
> first step. When restoring the master database, restore without
> recovery is not allowed."
>sql

No Differential Backup on Master DB

Hi, Can someone plzz explain the below reason
"Differential backups are not allowed for the master database since
they require that complete backups be applied without recovery as the
first step. When restoring the master database, restore without
recovery is not allowed."Hi
If you look in BOL on how Master DB needs to be restored, you will notice
that it is not an easy procedure.
If Master DB gets bigger than a manageable size (say 100Mb), then you have a
serious problem. You have user objects in there and you are compromising
your recoverability of your server.
A small DB like Master needs no differential backups and not much changes in
it, and it is so quick to do a full backup, that it is not worth the effort.
Regards-
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"sasiraj" <vardhansasi@.gmail.com> wrote in message
news:1131737977.922320.82800@.g14g2000cwa.googlegroups.com...
> Hi, Can someone plzz explain the below reason
> "Differential backups are not allowed for the master database since
> they require that complete backups be applied without recovery as the
> first step. When restoring the master database, restore without
> recovery is not allowed."
>

Friday, March 23, 2012

No data file,damaged SQL Server,any chance to backup transaction l

Hi,
No data file,damaged SQL Server,any chance to backup transaction log? (MS
SQL Server 2000 SP3)
-- Many thanks, Oskar.
Hi,
no data file, no backup, no database. You cannot restore the database
from the transaction logfiles.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||Hi Oskar
"Oskar" wrote:

> Hi,
> No data file,damaged SQL Server,any chance to backup transaction log? (MS
> SQL Server 2000 SP3)
>
You will have to go back to the last good full backup. Do you have scheduled
backups or backups on tape?
John
|||Thanks John. I'm not actually experiencing this problem at the moment. I was
just wondering if in theory it is possible to make the last transaction log
backup of a database if its data file and the server to which it was attached
are gone. And I came to a conclusion that it probably is - one could try to
restore the master database on a (virtual) test server and copy the salvaged
transaction log file onto the same drive letter it was on the original
server, and then make the last backup of the transaction log so that no
transactions are lost during recovery.
-- Oskar
"John Bell" wrote:

> Hi Oskar
> "Oskar" wrote:
> You will have to go back to the last good full backup. Do you have scheduled
> backups or backups on tape?
> John
>
|||Hi Oskar
"Oskar" wrote:

> Thanks John. I'm not actually experiencing this problem at the moment. I was
> just wondering if in theory it is possible to make the last transaction log
> backup of a database if its data file and the server to which it was attached
> are gone. And I came to a conclusion that it probably is - one could try to
> restore the master database on a (virtual) test server and copy the salvaged
> transaction log file onto the same drive letter it was on the original
> server, and then make the last backup of the transaction log so that no
> transactions are lost during recovery.
> -- Oskar
>
To backup the transaction log you will need the database to be working, in
which case not having the mdf file (as per your original post) will not allow
this. There is no substitute for having a proper backup regime and storing
the backups safely.
John
|||John, but how about the NO_TRUNCATE clause of the BACKUP LOG command. BOL
says it allows the final log backup to be made even when data files are lost
so that one can recover up to the point of failure (of data files). The case
I described differs only in that the server itself is also gone.
-- Oskar
"John Bell" wrote:

> Hi Oskar
> "Oskar" wrote:
> To backup the transaction log you will need the database to be working, in
> which case not having the mdf file (as per your original post) will not allow
> this. There is no substitute for having a proper backup regime and storing
> the backups safely.
> John
|||Hi Oskar
The log can still be backed up when the database is suspect see
http://www.karaszi.com/sqlserver/info_corrupt_suspect_db.asp I guess you
would need to try it.
John
"Oskar" wrote:
[vbcol=seagreen]
> John, but how about the NO_TRUNCATE clause of the BACKUP LOG command. BOL
> says it allows the final log backup to be made even when data files are lost
> so that one can recover up to the point of failure (of data files). The case
> I described differs only in that the server itself is also gone.
> -- Oskar
> "John Bell" wrote:

No data file,damaged SQL Server,any chance to backup transaction l

Hi,
No data file,damaged SQL Server,any chance to backup transaction log? (MS
SQL Server 2000 SP3)
-- Many thanks, Oskar.Hi,
no data file, no backup, no database. You cannot restore the database
from the transaction logfiles.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
--|||Hi Oskar
"Oskar" wrote:

> Hi,
> No data file,damaged SQL Server,any chance to backup transaction log? (MS
> SQL Server 2000 SP3)
>
You will have to go back to the last good full backup. Do you have scheduled
backups or backups on tape?
John

No current backup?

Hello All,
The hourly sheduled appends to the trasnaction log file start genereating
the following in the output log.
There is no current database backup. This log backup cannot be used to roll
forward a preceding database backup. [SQLSTATE 01000].
This is happening on one database on SQL 2000 machine running three
instances of SQL Server. This happening to a database that is on the defaul
t
instance. Does anyone know why this is happening? Other than that, there i
s
one transaction log device and four data devices with the same [Primary]
filegroup defined for each data device in the database. Since I took over a
s
the admin for this particular database, I have not been able to trucnate the
transaction log. The Dbcc produces the following:
Cannot shrink log file 2 ('') because total number of logical log files
cannot be fewer than 2. [SQLSTATE 01000].
I have tried following the instructions as per MSKB 324432 but have'nt had
any luck. The only thing that I have not tried is recreate the database wit
h
only one log and one data device and transfer all the data. Actually I did
start it once and ran out of diskspace when the indexes were being generated
,
so I had to scrap that idea. If you have any clue as to what's going on,
please help.
Thanks.
Bilal Abbasi
Chadbourne & Parke LLP
30 Rockefeller Plaza
New York, NY 10112Hi
It looks like you don't have a full database backup? Backing up the log will
allow the log to be re-used and it won't change the size. Shrinking the log
file can make it fragmented on the disc and should only be carried out after
significant abnormal growth.
John
"Bilal Abbasi" wrote:

> Hello All,
> The hourly sheduled appends to the trasnaction log file start genereating
> the following in the output log.
> There is no current database backup. This log backup cannot be used to rol
l
> forward a preceding database backup. [SQLSTATE 01000].
> This is happening on one database on SQL 2000 machine running three
> instances of SQL Server. This happening to a database that is on the defa
ult
> instance. Does anyone know why this is happening? Other than that, there
is
> one transaction log device and four data devices with the same [Primar
y]
> filegroup defined for each data device in the database. Since I took over
as
> the admin for this particular database, I have not been able to trucnate t
he
> transaction log. The Dbcc produces the following:
> Cannot shrink log file 2 ('') because total number of logical log files
> cannot be fewer than 2. [SQLSTATE 01000].
> I have tried following the instructions as per MSKB 324432 but have'nt had
> any luck. The only thing that I have not tried is recreate the database w
ith
> only one log and one data device and transfer all the data. Actually I di
d
> start it once and ran out of diskspace when the indexes were being generat
ed,
> so I had to scrap that idea. If you have any clue as to what's going on,
> please help.
> Thanks.
>
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112|||see this..from Books Online
Virtual Log Files
Each transaction log file is divided logically into smaller segments called
virtual log files. Virtual log files are the unit of truncation for the
transaction log. When a virtual log file no longer contains log records for
active transactions, it can be truncated and the space becomes available to
log new transactions.
The smallest size for a virtual log file is 256 kilobytes (KB). The minimum
size for a transaction log is 512 KB, which provides two 256-KB virtual log
files. The number and size of the virtual log files in a transaction log
increase as the size of the log file increases. A small log file can have a
small number of small virtual log files (for example, a 5-MB log file that
comprises five 1-MB virtual log files). A large log file can have larger
virtual log files (for example, a 500-MB log file that comprises ten 50-MB
virtual log files).
Microsoft SQL ServerT 2000 tries to avoid having many small virtual log
files. The number of virtual log files grows much more slowly than the size.
If a log file grows in small increments, it tends to have many small virtual
log files. If the log file grows in larger increments, SQL Server creates a
smaller number of larger virtual log files. For example, if the transaction
log is growing by 1-MB increments, the virtual log files are smaller and
more numerous compared to a transaction log growing at 50-MB increments. A
large number of virtual log files can increase the time taken to perform
database recovery.
As records are written to the log, the end of the log grows from one virtual
log file to the next. If there is more than one physical log file for a
database, the end of the log grows through each virtual log file in each
physical file before circling back to the first virtual log file in the
first physical file. Only when all log files are full will the log begin to
grow automatically.
"Bilal Abbasi" <BilalAbbasi@.discussions.microsoft.com> wrote in message
news:A8FE0793-E2B4-47E6-B176-9F78E78D6BFB@.microsoft.com...
> Hello All,
> The hourly sheduled appends to the trasnaction log file start genereating
> the following in the output log.
> There is no current database backup. This log backup cannot be used to
> roll
> forward a preceding database backup. [SQLSTATE 01000].
> This is happening on one database on SQL 2000 machine running three
> instances of SQL Server. This happening to a database that is on the
> default
> instance. Does anyone know why this is happening? Other than that, there
> is
> one transaction log device and four data devices with the same [Primar
y]
> filegroup defined for each data device in the database. Since I took over
> as
> the admin for this particular database, I have not been able to trucnate
> the
> transaction log. The Dbcc produces the following:
> Cannot shrink log file 2 ('') because total number of logical log files
> cannot be fewer than 2. [SQLSTATE 01000].
> I have tried following the instructions as per MSKB 324432 but have'nt had
> any luck. The only thing that I have not tried is recreate the database
> with
> only one log and one data device and transfer all the data. Actually I
> did
> start it once and ran out of diskspace when the indexes were being
> generated,
> so I had to scrap that idea. If you have any clue as to what's going on,
> please help.
> Thanks.
>
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112|||That is exactly the point. The full dump is done and transaction log is
initialized as a scheduled process. Subsequent appends work so the log file
s
increase to around 15 when the output from the append job starts writing
"There is no current backup", just out of the blue. And it's not something
that I can predict either as to at what point this will start to fail.
Another thing that I noticed is that there are 5 rows in the sysfiles table
and 6 in sysfiles1. The sixth row in sysfiles1 is pointing to a physical LD
F
file that does not exist. I have not found a way to get rid of this
obviously orphanned record. It's a mess I need to cleanup somehow.
--
Bilal Abbasi
Chadbourne & Parke LLP
30 Rockefeller Plaza
New York, NY 10112
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> It looks like you don't have a full database backup? Backing up the log wi
ll
> allow the log to be re-used and it won't change the size. Shrinking the lo
g
> file can make it fragmented on the disc and should only be carried out aft
er
> significant abnormal growth.
> John
> "Bilal Abbasi" wrote:
>|||Hi
You could code around this by issuing a full backups if you hit this error
to restart the log backup sequence, or it would probably better to use SQL
profiler to get to the root of this and find what is issuing the statement
that is breaking the log backup sequence.
What does sp_helpfiles return?
Can you take a full backup and restore it on a different machine? If so you
could try ALTER DATABASE <db> REMOVE FILE <logical_file>
John
"Bilal Abbasi" wrote:
[vbcol=seagreen]
> That is exactly the point. The full dump is done and transaction log is
> initialized as a scheduled process. Subsequent appends work so the log fi
les
> increase to around 15 when the output from the append job starts writing
> "There is no current backup", just out of the blue. And it's not somethin
g
> that I can predict either as to at what point this will start to fail.
> Another thing that I noticed is that there are 5 rows in the sysfiles tabl
e
> and 6 in sysfiles1. The sixth row in sysfiles1 is pointing to a physical
LDF
> file that does not exist. I have not found a way to get rid of this
> obviously orphanned record. It's a mess I need to cleanup somehow.
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112
>
> "John Bell" wrote:
>sql

No current backup?

Hello All,
The hourly sheduled appends to the trasnaction log file start genereating
the following in the output log.
There is no current database backup. This log backup cannot be used to roll
forward a preceding database backup. [SQLSTATE 01000].
This is happening on one database on SQL 2000 machine running three
instances of SQL Server. This happening to a database that is on the default
instance. Does anyone know why this is happening? Other than that, there is
one transaction log device and four data devices with the same [Primary]
filegroup defined for each data device in the database. Since I took over as
the admin for this particular database, I have not been able to trucnate the
transaction log. The Dbcc produces the following:
Cannot shrink log file 2 ('') because total number of logical log files
cannot be fewer than 2. [SQLSTATE 01000].
I have tried following the instructions as per MSKB 324432 but have'nt had
any luck. The only thing that I have not tried is recreate the database with
only one log and one data device and transfer all the data. Actually I did
start it once and ran out of diskspace when the indexes were being generated,
so I had to scrap that idea. If you have any clue as to what's going on,
please help.
Thanks.
--
Bilal Abbasi
Chadbourne & Parke LLP
30 Rockefeller Plaza
New York, NY 10112Hi
It looks like you don't have a full database backup? Backing up the log will
allow the log to be re-used and it won't change the size. Shrinking the log
file can make it fragmented on the disc and should only be carried out after
significant abnormal growth.
John
"Bilal Abbasi" wrote:
> Hello All,
> The hourly sheduled appends to the trasnaction log file start genereating
> the following in the output log.
> There is no current database backup. This log backup cannot be used to roll
> forward a preceding database backup. [SQLSTATE 01000].
> This is happening on one database on SQL 2000 machine running three
> instances of SQL Server. This happening to a database that is on the default
> instance. Does anyone know why this is happening? Other than that, there is
> one transaction log device and four data devices with the same [Primary]
> filegroup defined for each data device in the database. Since I took over as
> the admin for this particular database, I have not been able to trucnate the
> transaction log. The Dbcc produces the following:
> Cannot shrink log file 2 ('') because total number of logical log files
> cannot be fewer than 2. [SQLSTATE 01000].
> I have tried following the instructions as per MSKB 324432 but have'nt had
> any luck. The only thing that I have not tried is recreate the database with
> only one log and one data device and transfer all the data. Actually I did
> start it once and ran out of diskspace when the indexes were being generated,
> so I had to scrap that idea. If you have any clue as to what's going on,
> please help.
> Thanks.
>
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112|||see this..from Books Online
Virtual Log Files
Each transaction log file is divided logically into smaller segments called
virtual log files. Virtual log files are the unit of truncation for the
transaction log. When a virtual log file no longer contains log records for
active transactions, it can be truncated and the space becomes available to
log new transactions.
The smallest size for a virtual log file is 256 kilobytes (KB). The minimum
size for a transaction log is 512 KB, which provides two 256-KB virtual log
files. The number and size of the virtual log files in a transaction log
increase as the size of the log file increases. A small log file can have a
small number of small virtual log files (for example, a 5-MB log file that
comprises five 1-MB virtual log files). A large log file can have larger
virtual log files (for example, a 500-MB log file that comprises ten 50-MB
virtual log files).
Microsoft® SQL ServerT 2000 tries to avoid having many small virtual log
files. The number of virtual log files grows much more slowly than the size.
If a log file grows in small increments, it tends to have many small virtual
log files. If the log file grows in larger increments, SQL Server creates a
smaller number of larger virtual log files. For example, if the transaction
log is growing by 1-MB increments, the virtual log files are smaller and
more numerous compared to a transaction log growing at 50-MB increments. A
large number of virtual log files can increase the time taken to perform
database recovery.
As records are written to the log, the end of the log grows from one virtual
log file to the next. If there is more than one physical log file for a
database, the end of the log grows through each virtual log file in each
physical file before circling back to the first virtual log file in the
first physical file. Only when all log files are full will the log begin to
grow automatically.
"Bilal Abbasi" <BilalAbbasi@.discussions.microsoft.com> wrote in message
news:A8FE0793-E2B4-47E6-B176-9F78E78D6BFB@.microsoft.com...
> Hello All,
> The hourly sheduled appends to the trasnaction log file start genereating
> the following in the output log.
> There is no current database backup. This log backup cannot be used to
> roll
> forward a preceding database backup. [SQLSTATE 01000].
> This is happening on one database on SQL 2000 machine running three
> instances of SQL Server. This happening to a database that is on the
> default
> instance. Does anyone know why this is happening? Other than that, there
> is
> one transaction log device and four data devices with the same [Primary]
> filegroup defined for each data device in the database. Since I took over
> as
> the admin for this particular database, I have not been able to trucnate
> the
> transaction log. The Dbcc produces the following:
> Cannot shrink log file 2 ('') because total number of logical log files
> cannot be fewer than 2. [SQLSTATE 01000].
> I have tried following the instructions as per MSKB 324432 but have'nt had
> any luck. The only thing that I have not tried is recreate the database
> with
> only one log and one data device and transfer all the data. Actually I
> did
> start it once and ran out of diskspace when the indexes were being
> generated,
> so I had to scrap that idea. If you have any clue as to what's going on,
> please help.
> Thanks.
>
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112|||That is exactly the point. The full dump is done and transaction log is
initialized as a scheduled process. Subsequent appends work so the log files
increase to around 15 when the output from the append job starts writing
"There is no current backup", just out of the blue. And it's not something
that I can predict either as to at what point this will start to fail.
Another thing that I noticed is that there are 5 rows in the sysfiles table
and 6 in sysfiles1. The sixth row in sysfiles1 is pointing to a physical LDF
file that does not exist. I have not found a way to get rid of this
obviously orphanned record. It's a mess I need to cleanup somehow.
--
Bilal Abbasi
Chadbourne & Parke LLP
30 Rockefeller Plaza
New York, NY 10112
"John Bell" wrote:
> Hi
> It looks like you don't have a full database backup? Backing up the log will
> allow the log to be re-used and it won't change the size. Shrinking the log
> file can make it fragmented on the disc and should only be carried out after
> significant abnormal growth.
> John
> "Bilal Abbasi" wrote:
> > Hello All,
> >
> > The hourly sheduled appends to the trasnaction log file start genereating
> > the following in the output log.
> > There is no current database backup. This log backup cannot be used to roll
> > forward a preceding database backup. [SQLSTATE 01000].
> >
> > This is happening on one database on SQL 2000 machine running three
> > instances of SQL Server. This happening to a database that is on the default
> > instance. Does anyone know why this is happening? Other than that, there is
> > one transaction log device and four data devices with the same [Primary]
> > filegroup defined for each data device in the database. Since I took over as
> > the admin for this particular database, I have not been able to trucnate the
> > transaction log. The Dbcc produces the following:
> >
> > Cannot shrink log file 2 ('') because total number of logical log files
> > cannot be fewer than 2. [SQLSTATE 01000].
> >
> > I have tried following the instructions as per MSKB 324432 but have'nt had
> > any luck. The only thing that I have not tried is recreate the database with
> > only one log and one data device and transfer all the data. Actually I did
> > start it once and ran out of diskspace when the indexes were being generated,
> > so I had to scrap that idea. If you have any clue as to what's going on,
> > please help.
> >
> > Thanks.
> >
> >
> > --
> > Bilal Abbasi
> > Chadbourne & Parke LLP
> > 30 Rockefeller Plaza
> > New York, NY 10112|||Hi
You could code around this by issuing a full backups if you hit this error
to restart the log backup sequence, or it would probably better to use SQL
profiler to get to the root of this and find what is issuing the statement
that is breaking the log backup sequence.
What does sp_helpfiles return?
Can you take a full backup and restore it on a different machine? If so you
could try ALTER DATABASE <db> REMOVE FILE <logical_file>
John
"Bilal Abbasi" wrote:
> That is exactly the point. The full dump is done and transaction log is
> initialized as a scheduled process. Subsequent appends work so the log files
> increase to around 15 when the output from the append job starts writing
> "There is no current backup", just out of the blue. And it's not something
> that I can predict either as to at what point this will start to fail.
> Another thing that I noticed is that there are 5 rows in the sysfiles table
> and 6 in sysfiles1. The sixth row in sysfiles1 is pointing to a physical LDF
> file that does not exist. I have not found a way to get rid of this
> obviously orphanned record. It's a mess I need to cleanup somehow.
> --
> Bilal Abbasi
> Chadbourne & Parke LLP
> 30 Rockefeller Plaza
> New York, NY 10112
>
> "John Bell" wrote:
> > Hi
> >
> > It looks like you don't have a full database backup? Backing up the log will
> > allow the log to be re-used and it won't change the size. Shrinking the log
> > file can make it fragmented on the disc and should only be carried out after
> > significant abnormal growth.
> >
> > John
> >
> > "Bilal Abbasi" wrote:
> >
> > > Hello All,
> > >
> > > The hourly sheduled appends to the trasnaction log file start genereating
> > > the following in the output log.
> > > There is no current database backup. This log backup cannot be used to roll
> > > forward a preceding database backup. [SQLSTATE 01000].
> > >
> > > This is happening on one database on SQL 2000 machine running three
> > > instances of SQL Server. This happening to a database that is on the default
> > > instance. Does anyone know why this is happening? Other than that, there is
> > > one transaction log device and four data devices with the same [Primary]
> > > filegroup defined for each data device in the database. Since I took over as
> > > the admin for this particular database, I have not been able to trucnate the
> > > transaction log. The Dbcc produces the following:
> > >
> > > Cannot shrink log file 2 ('') because total number of logical log files
> > > cannot be fewer than 2. [SQLSTATE 01000].
> > >
> > > I have tried following the instructions as per MSKB 324432 but have'nt had
> > > any luck. The only thing that I have not tried is recreate the database with
> > > only one log and one data device and transfer all the data. Actually I did
> > > start it once and ran out of diskspace when the indexes were being generated,
> > > so I had to scrap that idea. If you have any clue as to what's going on,
> > > please help.
> > >
> > > Thanks.
> > >
> > >
> > > --
> > > Bilal Abbasi
> > > Chadbourne & Parke LLP
> > > 30 Rockefeller Plaza
> > > New York, NY 10112

Wednesday, March 21, 2012

No backup

Hi,
Is there any way of restoring a MSSQL 2000 database if there has been
no backup?
Possibly from the log files?
Thanks.Perhaps sp_detach_db, sp_attach_db?
<gdf1903@.hotmail.com> wrote in message
news:1146055288.324722.292320@.i40g2000cwc.googlegroups.com...
> Hi,
> Is there any way of restoring a MSSQL 2000 database if there has been
> no backup?
> Possibly from the log files?
> Thanks.
>|||What do you want to achieve by such a "restore"? Is the database gone (delet
ed)? Have you discovered
some physical corruption in the database? Do you wish to go back in time?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<gdf1903@.hotmail.com> wrote in message news:1146055288.324722.292320@.i40g2000cwc.googlegroup
s.com...
> Hi,
> Is there any way of restoring a MSSQL 2000 database if there has been
> no backup?
> Possibly from the log files?
> Thanks.
>|||I wish to revert back to a previous time. Around 8 hours ago.|||I wish to revert back to a previous time. Around 8 hours ago.|||gdf1903@.hotmail.com wrote:
> I wish to revert back to a previous time. Around 8 hours ago.
>
That will not be possible unless you have a full backup that are more
than 8 hours old to start with.
Regards
Steen|||You are probably out of luck. You could see if any of the log reader tools c
an extract log records
from the ldf file for you. But the log records might not exist anymore in th
e ldf file. They will
most probably not exist if you never done a database backup or if the databa
se is in simple recovery
mode (as SQL Server will remove old log records in these cases every time it
does a checkpoint).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<gdf1903@.hotmail.com> wrote in message news:1146060959.519582.169180@.u72g2000cwu.googlegroup
s.com...
>I wish to revert back to a previous time. Around 8 hours ago.
>

No backup

Hi,
Is there any way of restoring a MSSQL 2000 database if there has been
no backup?
Possibly from the log files?
Thanks.Perhaps sp_detach_db, sp_attach_db?
<gdf1903@.hotmail.com> wrote in message
news:1146055288.324722.292320@.i40g2000cwc.googlegroups.com...
> Hi,
> Is there any way of restoring a MSSQL 2000 database if there has been
> no backup?
> Possibly from the log files?
> Thanks.
>|||What do you want to achieve by such a "restore"? Is the database gone (deleted)? Have you discovered
some physical corruption in the database? Do you wish to go back in time?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<gdf1903@.hotmail.com> wrote in message news:1146055288.324722.292320@.i40g2000cwc.googlegroups.com...
> Hi,
> Is there any way of restoring a MSSQL 2000 database if there has been
> no backup?
> Possibly from the log files?
> Thanks.
>|||I wish to revert back to a previous time. Around 8 hours ago.|||I wish to revert back to a previous time. Around 8 hours ago.|||gdf1903@.hotmail.com wrote:
> I wish to revert back to a previous time. Around 8 hours ago.
>
That will not be possible unless you have a full backup that are more
than 8 hours old to start with.
Regards
Steen|||You are probably out of luck. You could see if any of the log reader tools can extract log records
from the ldf file for you. But the log records might not exist anymore in the ldf file. They will
most probably not exist if you never done a database backup or if the database is in simple recovery
mode (as SQL Server will remove old log records in these cases every time it does a checkpoint).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<gdf1903@.hotmail.com> wrote in message news:1146060959.519582.169180@.u72g2000cwu.googlegroups.com...
>I wish to revert back to a previous time. Around 8 hours ago.
>

No access at sql 2000 DB after restore on an other sql server

HI,
i've some trouble with a sql server 2000 db.
the db uses sql server auth
i make a backup from the DB and take the backup to an other sqlserver, i had
restored the database at ther new server.
i've create ^the db owner user on the new server and executed
sp_change_users_login 'Update_One', 'username', 'loginname'
now my asp .net application works fine. but i would like to modify some
tables from the DB if, i start query analyzer and login as the db owner and
start a query
select *
rom issues
at the restored db i recieved an error
"Server: Nachr.-Nr. 208, Schweregrad 16, Status 1, Zeile 1
Ungültiger Objektname 'issues'." means the Object issues is invalid, but th
e
table exists. the same query on the original db Server is ok i recieved the
right result
whats wrong?
Many Thanks for your helpflabs (flabs@.discussions.microsoft.com) writes:
> i've some trouble with a sql server 2000 db.
> the db uses sql server auth
> i make a backup from the DB and take the backup to an other sqlserver, i
> had restored the database at ther new server.
> i've create ^the db owner user on the new server and executed
> sp_change_users_login 'Update_One', 'username', 'loginname'
> now my asp .net application works fine. but i would like to modify some
> tables from the DB if, i start query analyzer and login as the db owner
> and start a query
> select *
> rom issues
> at the restored db i recieved an error
> "Server: Nachr.-Nr. 208, Schweregrad 16, Status 1, Zeile 1
> Ungltiger Objektname 'issues'." means the Object issues is invalid, but
> the table exists. the same query on the original db Server is ok i
> recieved the right result
Apparently your default schema on the server is not the schema where the
issues table is, nor is the table in the default schema of dbo. Note that
on SQL 2000 the default schema for a user is always the username.
It's not clear to me whether you did an sp_changedbowner of the database,
but you should probably have done that.
Run this query:
SELECT user_name(uid), *
FROM sysobjects
WHERE name= 'issues'
This should give you the owner/schema for the issues table.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Hej
no, i didn't run sp_changedbowner. why must i run the sp ?
the result of SELECT user_name(uid), *
geminiuser issues 341576255 U 5 26 1610620982 64 0 0 2006-08-11
16:02:18.570 0 64 0 U 1 8291 0 2006-08-11 16:02:18.570 0 0 0 0 0 18433 0
i find out, if i run select *
from geminiuser.issues i recieved the right result
run i only issues without geniniuser. before issue i recieved an error.
what happens if i run sp_changeDBowner, sure i think it change the owner of
the db? but some else?
must i change all tables, add prefix geminiuser. in my sql script, i don't
like this.
"Erland Sommarskog" wrote:

> flabs (flabs@.discussions.microsoft.com) writes:
> Apparently your default schema on the server is not the schema where the
> issues table is, nor is the table in the default schema of dbo. Note that
> on SQL 2000 the default schema for a user is always the username.
> It's not clear to me whether you did an sp_changedbowner of the database,
> but you should probably have done that.
> Run this query:
> SELECT user_name(uid), *
> FROM sysobjects
> WHERE name= 'issues'
> This should give you the owner/schema for the issues table.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx
>|||flabs (flabs@.discussions.microsoft.com) writes:
> no, i didn't run sp_changedbowner. why must i run the sp ?
> the result of SELECT user_name(uid), *
> geminiuser issues 341576255 U 5 26 1610620982
> 64 0 0 2006-08-11
> 16:02:18.570 0 64 0 U 1 8291 0 2006-08-11
> 16:02:18.570 0 0 0 0 0 18433 0
> i find out, if i run select *
> from geminiuser.issues i recieved the right result
> run i only issues without geniniuser. before issue i recieved an error.
> what happens if i run sp_changeDBowner, sure i think it change the owner
> of the db? but some else?
> must i change all tables, add prefix geminiuser. in my sql script, i don't
> like this.
The simplest is if you run with a user that has geminiuser as its default
schema. On SQL 2000, this means that you should run as geminiuser.
I don't know which login you are logged in as, but this login needs to
map to geminiuser. Note that if the login geminiuser owns the database,
the login geminiuser maps to the user dbo.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Tuesday, March 20, 2012

no .trn files

I have two sql servers, one is replicating to the other using log shipping.
The backup directory got deleted.
Now replication says it is working, but I don't know how because the .trn
files are not being generated.
What do I have to do to get that started again?
Scott EmickScott,
Repliction is not the same as log shipping. If you are replicating, the
process can continue without transaction logs, but your publisher db will
increase in size if it is not in SIMPLE recovery model and you are not
taking transaction log backups.
Hope this helps,
Ron
--
Ron Talmage
SQL Server MVP
"Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> I have two sql servers, one is replicating to the other using log
shipping.
> The backup directory got deleted.
> Now replication says it is working, but I don't know how because the .trn
> files are not being generated.
> What do I have to do to get that started again?
> Scott Emick
>|||I did flip all the db's from FULL to simple, and back again, but I
still get no .trn files. I was trying to read about backups and maint
plans yesterday, but I haven't gotten anywhere yet. Yes, the
replication is still working, and I am glad of that, but I would like
to get things back to the way they were.
Scott
"Ron Talmage" <rtalmage@.prospice.com> wrote in message news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.
phx.gbl>...
> Scott,
> Repliction is not the same as log shipping. If you are replicating, the
> process can continue without transaction logs, but your publisher db will
> increase in size if it is not in SIMPLE recovery model and you are not
> taking transaction log backups.
> Hope this helps,
> Ron
> --
> Ron Talmage
> SQL Server MVP
> "Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
> news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> shipping.|||Also, restarted sql server agent and the maint plans...Apparently one was
hung and I did not know it...
Scott
"Scott Emick" <semick@.msn.com> wrote in message
news:a2794831.0403020315.1c3ad442@.posting.google.com...
> I did flip all the db's from FULL to simple, and back again, but I
> still get no .trn files. I was trying to read about backups and maint
> plans yesterday, but I haven't gotten anywhere yet. Yes, the
> replication is still working, and I am glad of that, but I would like
> to get things back to the way they were.
> Scott
> "Ron Talmage" <rtalmage@.prospice.com> wrote in message
news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
will

no .trn files

I have two sql servers, one is replicating to the other using log shipping.
The backup directory got deleted.
Now replication says it is working, but I don't know how because the .trn
files are not being generated.
What do I have to do to get that started again?
Scott EmickScott,
Repliction is not the same as log shipping. If you are replicating, the
process can continue without transaction logs, but your publisher db will
increase in size if it is not in SIMPLE recovery model and you are not
taking transaction log backups.
Hope this helps,
Ron
--
Ron Talmage
SQL Server MVP
"Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> I have two sql servers, one is replicating to the other using log
shipping.
> The backup directory got deleted.
> Now replication says it is working, but I don't know how because the .trn
> files are not being generated.
> What do I have to do to get that started again?
> Scott Emick
>|||I did flip all the db's from FULL to simple, and back again, but I
still get no .trn files. I was trying to read about backups and maint
plans yesterday, but I haven't gotten anywhere yet. Yes, the
replication is still working, and I am glad of that, but I would like
to get things back to the way they were.
Scott
"Ron Talmage" <rtalmage@.prospice.com> wrote in message news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
> Scott,
> Repliction is not the same as log shipping. If you are replicating, the
> process can continue without transaction logs, but your publisher db will
> increase in size if it is not in SIMPLE recovery model and you are not
> taking transaction log backups.
> Hope this helps,
> Ron
> --
> Ron Talmage
> SQL Server MVP
> "Scott Emick" <semick@.ham.phoenix-sys.com> wrote in message
> news:OolQXwu$DHA.1212@.TK2MSFTNGP12.phx.gbl...
> > I have two sql servers, one is replicating to the other using log
> shipping.
> >
> > The backup directory got deleted.
> >
> > Now replication says it is working, but I don't know how because the .trn
> > files are not being generated.
> >
> > What do I have to do to get that started again?
> >
> > Scott Emick
> >
> >|||Also, restarted sql server agent and the maint plans...Apparently one was
hung and I did not know it...
Scott
"Scott Emick" <semick@.msn.com> wrote in message
news:a2794831.0403020315.1c3ad442@.posting.google.com...
> I did flip all the db's from FULL to simple, and back again, but I
> still get no .trn files. I was trying to read about backups and maint
> plans yesterday, but I haven't gotten anywhere yet. Yes, the
> replication is still working, and I am glad of that, but I would like
> to get things back to the way they were.
> Scott
> "Ron Talmage" <rtalmage@.prospice.com> wrote in message
news:<#qyZTf1$DHA.1844@.TK2MSFTNGP11.phx.gbl>...
> > Scott,
> >
> > Repliction is not the same as log shipping. If you are replicating, the
> > process can continue without transaction logs, but your publisher db
will
> > increase in size if it is not in SIMPLE recovery model and you are not
> > taking transaction log backups.

Monday, March 19, 2012

nightly rebooting of server

SQL 2000 patched up running under SBS2003
we shutdown and reboot automatically at 2AM into DOS and backup entire
server via Ghost onto a backup and drive and restart server
Question: are there any issues with rebooting SQL daily?
a another consultant claims there are but I can find no mentions in MS db or
literature.
craig@.computermagic.net(donotspam)Hi
If you cleanly shut down SQL server there should be no issue
http://msdn.microsoft.com/library/d...>
rt_6628.asp,
but anything connected to the server would need to handle this loss.
John
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)|||The only issue is that you are blowing away your data cache and query cache,
so this is why queries in the morning run a lot more slowly than they do in
the afternoon.
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)

nightly rebooting of server

SQL 2000 patched up running under SBS2003
we shutdown and reboot automatically at 2AM into DOS and backup entire
server via Ghost onto a backup and drive and restart server
Question: are there any issues with rebooting SQL daily?
a another consultant claims there are but I can find no mentions in MS db or
literature.
craig@.computermagic.net(donotspam)Hi
If you cleanly shut down SQL server there should be no issue
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_1_start_6628.asp,
but anything connected to the server would need to handle this loss.
John
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)|||The only issue is that you are blowing away your data cache and query cache,
so this is why queries in the morning run a lot more slowly than they do in
the afternoon.
--
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)

nightly rebooting of server

SQL 2000 patched up running under SBS2003
we shutdown and reboot automatically at 2AM into DOS and backup entire
server via Ghost onto a backup and drive and restart server
Question: are there any issues with rebooting SQL daily?
a another consultant claims there are but I can find no mentions in MS db or
literature.
craig@.computermagic.net(donotspam)
Hi
If you cleanly shut down SQL server there should be no issue
http://msdn.microsoft.com/library/de...tart_6628.asp,
but anything connected to the server would need to handle this loss.
John
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)
|||The only issue is that you are blowing away your data cache and query cache,
so this is why queries in the morning run a lot more slowly than they do in
the afternoon.
Mike
Mentor
Solid Quality Learning
http://www.solidqualitylearning.com
"computermagic" <craig@.computermagic.net(donotspam)> wrote in message
news:716D85E1-E2E7-4EFA-9201-0CFF53556126@.microsoft.com...
> SQL 2000 patched up running under SBS2003
> we shutdown and reboot automatically at 2AM into DOS and backup entire
> server via Ghost onto a backup and drive and restart server
> Question: are there any issues with rebooting SQL daily?
> a another consultant claims there are but I can find no mentions in MS db
> or
> literature.
> craig@.computermagic.net(donotspam)

Nightly Maintenance Backup Plan fails -- no trace of why

We have been running a backup plan (created using the sql 2005 Maintenance wizard) for some time. It failed last night but all databases seemed to be backed up.

I looked at the ERRORLOG in <mssql2005>\mssql.1\log as well as

"Servname DB Backup Plan_20070118184358.txt"

but found no errors. Where else can I look to see what went wrong?

TIA,

barkingdog

You can also check the logs of the Sql Server Agent job corresponding to the maintenance plan.

Thanks,

Kuntal

|||

>>> check the logs of the Sql Server Agent job

Where are these located? (Are you referring to SQLAgent.OUT? It had nothing of interest.)

Barkingdog

|||

In Sql 2005, for every maintenance plan an Sql Agent job is created by the same name. You can view its logs as Sql Server Agent -> Jobs -> select the job & right click to View History.

Hope that helps

Kuntal

|||

What was the error under the scheduled job for this maintenance plan?

Also try to run thsi manually from SSMS to see the execution, also ensure the SQLAgent account has required privileges to run this job. ALso check what changes have been since last time when this job was running succesfsully.

Friday, March 9, 2012

Next question regarding to backup location.

Hi,
First of all, thanks for the answer about "Have you found any solution for
this?" qustion...
Here is another question, but related previous question.
Environment : Win Svr 2003/SQL Svr 2000
As far as I know, to specify a UNC path for backup location, MSSQLServer
service should be running with an account that can access network resources.
.
As you know, by default, SQL Svr 2000 is installed with LocalSystem account.
Prior to the release of the Win200 OS, LocalSystem account can't access
network resources, but with the release of Win2000, the account has been
changed to allow authentication to network resources...
However, according to my testing, when I run the MSSQLServer service with
LocalSystem account, a UNC path couldn't be used, however, the service
running with an account that has network access rights, a UNC path could be
used for backup location...
Is my understanding something wrong?
Since the LocalSystem account was modified to allow authentication to
network resources, should it work a UNC path for backup location when the SQ
L
service is running with LocalSystem account?
Thank you in advance.
......................................................TJHi again,
it might be better to keep posting responses as opposed to posting new
threads, as people that have posted tend to see those in preference to
new stuff.
Anyway, permissions wise, I've never tried altering the permissions of
the local system account to try to make things happen, if you need
additional behaviour, why not actually run the service under a more
priviledged account.
On a separate note, could you explain what you're trying to do? the
nature of a backup is to preserve data, and while it can be used to
transfer it (and I do that regularly) I would not expect that behaviour
to be built in to an automated process, if you need data elsewhere
there are probably better ways of moving it.
Cheers
Will
P.S I should point out (and am about to amend my sig to say it) - I am
not in anyway an expert/ affiliated with any company/ in anyway
competent. I post for fun, and to help people. Don't assume my advice
to be expert.|||Hi, Will
Thanks for your posting.
Sombody answered the question about my account issue...
He/She provided this link for the issue. (This is a just information for
somebody needs this...)
http://support.microsoft.com/?id=555128
I am trying to develop an application to backup remote SQL server(SQL-DMO),
and the physical backup file(xxxx.bak) should be exist in my app folder(Of
course, my app is running in another machine) because another app needs to
access them via the folder...
To backup SQL server into a UNC path, I do not think that it is a scable
soultion since there are some requirements to use a UNC path in SQL server.
Also, once the backup is done to each temporary folder in remote machine, I
may be able to move the backup file from remote temporary folder to my app
folder. However, I also do not think that is is a scable or reliable
solution...
Any idea?
Thanks.
.........................................................
..........TJ
"Will" wrote:

> Hi again,
> it might be better to keep posting responses as opposed to posting new
> threads, as people that have posted tend to see those in preference to
> new stuff.
> Anyway, permissions wise, I've never tried altering the permissions of
> the local system account to try to make things happen, if you need
> additional behaviour, why not actually run the service under a more
> priviledged account.
> On a separate note, could you explain what you're trying to do? the
> nature of a backup is to preserve data, and while it can be used to
> transfer it (and I do that regularly) I would not expect that behaviour
> to be built in to an automated process, if you need data elsewhere
> there are probably better ways of moving it.
> Cheers
> Will
> P.S I should point out (and am about to amend my sig to say it) - I am
> not in anyway an expert/ affiliated with any company/ in anyway
> competent. I post for fun, and to help people. Don't assume my advice
> to be expert.
>|||Hi TJ,
I think that the main point that needs to be considered here is what's
actually doing the backup. It's not a trivial task for a SQL server to
convert it's live database into a restorable form, as a result the
processing and the storage of the result would have to take place
locally.
You want to create a utility that backs up databases to a remote
location, but if this was simple, it would have been implemented.
As for scalable, the idea of a scalable set of backups is not really
one that people often consider as usually you're in control of the
device you're backing up.
You've said that you want to backup databases, but what is the ultimate
aim of these backups? is this so that the data can be retrieved (in
which case your app seems a little trivial), or do you intend to move
this data to a new location? or something else?
I "think" I can help out here, but you'll need to post a few specifics
as to what you're trying to do.
Cheers
Will|||Hi, Will.
Thanks for your posting again.
I know that backup processing is expensive one...
For your questions, the simple answer would be that I am trying to move the
data to a new location(Central location)...
There could be some better solution, but I would like to stay with backup
for some reasons...
Thanks again.
...................................................TJ
"Will" wrote:

> Hi TJ,
> I think that the main point that needs to be considered here is what's
> actually doing the backup. It's not a trivial task for a SQL server to
> convert it's live database into a restorable form, as a result the
> processing and the storage of the result would have to take place
> locally.
> You want to create a utility that backs up databases to a remote
> location, but if this was simple, it would have been implemented.
> As for scalable, the idea of a scalable set of backups is not really
> one that people often consider as usually you're in control of the
> device you're backing up.
> You've said that you want to backup databases, but what is the ultimate
> aim of these backups? is this so that the data can be retrieved (in
> which case your app seems a little trivial), or do you intend to move
> this data to a new location? or something else?
> I "think" I can help out here, but you'll need to post a few specifics
> as to what you're trying to do.
> Cheers
> Will
>|||Hi TJ,
As far as the sql server backup route goes, to my knowledge (which is
far from expert) the only way you're going to get the sql server to
write the backup file to a new location is to use a UNC path, you
cannot get it to use the client machine to perform the backup, it will
be done by the server, the permissions on the account performing the
backup will be those of the user for the service running on the server.
If a UNC path is not an option then I think the sql backup route won't
work.
As for other things you could do, without more info than "moving the
data to a new location" I can't really suggest much.
Do you want the data to be live in the new location? If so perhaps
features such as replication may be a better route.
Is your app intended as an end user application that has to be able to
apply to lots of situations, or is it to solve one specific problem?
When you say you want a scalable solution, what needs to scale - the
number of databases, the size of the databases, the distance between
the client and server, etc.?
If you could provide a lot more info as to how you intend to use the
backup, there are probably other ways of doing it.
Cheers
Will

Wednesday, March 7, 2012

Newbie-shrink transaction log files

Hi. I know this is an often-discussed topic, but I hope you can clear up
some confusion for me. I set up a SQL Server 2005 maintenance plan to back
up my databases to disk (we also backup to tape using Backup Exec). My goals
in backing up to disk are 1) to have a couple days of backups on disk in case
I need to do quick restores, and 2) to reduce the size of transaction log
files. In the maint plan, I selected the options to shrink the databases,
backup databases (full), and backup transaction logs. The problem is that
when I executed the maint plan, it didn't reduce the size of the transaction
log physical files which are growing.
I grabbed this SQL code from the Internet, and it works to shrink the tran
log file size:
USE mydb
BACKUP LOG mydb WITH TRUNCATEONLY
DBCC SHRINKFILE [mydb_log, TRUNCATEONLY]
GO
I want to automate this task. I don't want to have to edit the above script
every time I create or drop a database. I know I can just have a SQL Agent
job run the script, BUT isn't the maintenance job supposed to shrink tran log
files as part of the "Backup Database (Full)" and Backup Database
"(Transaction Log)" options?
By the way, is the BACKUP LOG statement required to precede the DBCC
SHRINKFILE statement?
Thanks for your help.
Hi Coop,
I see a couple of problems with your request. First, do not shrink your
database and transaction log files periodically. When you shrink a file, the
next thing SQL Server will do is to expand these files to do its work, and
shrinking and expanding these files periodically could be a performance
problem in addition to creating more disk fragmentation that probably will
also affect the performance of your database. My recommendation here is just
schedule full database and transaction log backups. You can still shrink the
files manually once in a while only if you need it.
Second, you want to use TRUNCATE_ONLY which truncates the log without really
doing a backup. The problem here is that you are not doing a transaction log
backup and you are breaking the log chain. I recommend here that you see the
SQL Server documentation (BOL) and understand the SQL Server recovery models
simple, bulk-logged and full. If you really need to use TRUNCATE_ONLY better
change the recovery model to simple.
Hope this helps,
Ben Nevarez
Senior Database Administrator
AIG SunAmerica
"Coop" wrote:

> Hi. I know this is an often-discussed topic, but I hope you can clear up
> some confusion for me. I set up a SQL Server 2005 maintenance plan to back
> up my databases to disk (we also backup to tape using Backup Exec). My goals
> in backing up to disk are 1) to have a couple days of backups on disk in case
> I need to do quick restores, and 2) to reduce the size of transaction log
> files. In the maint plan, I selected the options to shrink the databases,
> backup databases (full), and backup transaction logs. The problem is that
> when I executed the maint plan, it didn't reduce the size of the transaction
> log physical files which are growing.
> I grabbed this SQL code from the Internet, and it works to shrink the tran
> log file size:
> USE mydb
> BACKUP LOG mydb WITH TRUNCATEONLY
> DBCC SHRINKFILE [mydb_log, TRUNCATEONLY]
> GO
> I want to automate this task. I don't want to have to edit the above script
> every time I create or drop a database. I know I can just have a SQL Agent
> job run the script, BUT isn't the maintenance job supposed to shrink tran log
> files as part of the "Backup Database (Full)" and Backup Database
> "(Transaction Log)" options?
> By the way, is the BACKUP LOG statement required to precede the DBCC
> SHRINKFILE statement?
> Thanks for your help.
|||Coop
http://www.karaszi.com/SQLServer/info_dont_shrink.asp
"Coop" <Coop@.discussions.microsoft.com> wrote in message
news:91C8FA70-23CF-4D9A-8879-93EC8EDAEF71@.microsoft.com...
> Hi. I know this is an often-discussed topic, but I hope you can clear up
> some confusion for me. I set up a SQL Server 2005 maintenance plan to
> back
> up my databases to disk (we also backup to tape using Backup Exec). My
> goals
> in backing up to disk are 1) to have a couple days of backups on disk in
> case
> I need to do quick restores, and 2) to reduce the size of transaction log
> files. In the maint plan, I selected the options to shrink the databases,
> backup databases (full), and backup transaction logs. The problem is that
> when I executed the maint plan, it didn't reduce the size of the
> transaction
> log physical files which are growing.
> I grabbed this SQL code from the Internet, and it works to shrink the tran
> log file size:
> USE mydb
> BACKUP LOG mydb WITH TRUNCATEONLY
> DBCC SHRINKFILE [mydb_log, TRUNCATEONLY]
> GO
> I want to automate this task. I don't want to have to edit the above
> script
> every time I create or drop a database. I know I can just have a SQL
> Agent
> job run the script, BUT isn't the maintenance job supposed to shrink tran
> log
> files as part of the "Backup Database (Full)" and Backup Database
> "(Transaction Log)" options?
> By the way, is the BACKUP LOG statement required to precede the DBCC
> SHRINKFILE statement?
> Thanks for your help.