Showing posts with label log. Show all posts
Showing posts with label log. Show all posts

Monday, March 19, 2012

Bug when changing the default data and log directories

We have seen this problem on several SQL 2000 Standard Servers and was wonde
ring if anyone else had encountered it:
We started having problems restoring databases. We were receving errors tha
t the physical files paths were incorrect. When we looked at the file paths
for the databases we noticed that they looked like this "e:\mssql\data\\fil
e.mdf" and "F:\mssql\logs\\
logfile.ldf"" Note the double slashes.
What we found that is we changed the default data and log paths through ente
rprise manager. When we did it, we went to EM, clicked the browse button an
d then selected the target directories. This left the settings looking like
this:
"E:\mssql\data\"
"F:\mssql\logs\"
When you create a database through EM, everything works fine. When you crea
te a database using the create database command, it gets created with the do
uble backslashes in the file path for the data and log files.
We have been able to re-create this on several servers. If you take out the
trailing backslashes and stop and start the MSSQL Service (it appears chang
es to this setting only takes affect after a service stop and start even tho
ugh the running value would
indicate otherwise) then the 'create database' function work fine and only i
nserts single slashes from then on.
We are running SQL 2000 SP3 and we haven't been able to find any other docum
ented instance of this. If anyone else can re-create this issue we would be
very grateful to hear that it isn't something we are doing wrong.
ThanksThis is a known issue but I don't think there is a KB article. As you have
found, the default data and log directory strings should not have a trailing
backslash or you get the \\ in the filepath. Whilst it may be fixed in a
future service pack, it seems unlikely as it has been round for a while, is
fairly benign and has a simple workaround.
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Mike Holleran" <mholleran@.infodir.com> wrote in message
news:ED046519-1519-4579-A6FE-F5EE63C18B05@.microsoft.com...
> We have seen this problem on several SQL 2000 Standard Servers and was
wondering if anyone else had encountered it:
> We started having problems restoring databases. We were receving errors
that the physical files paths were incorrect. When we looked at the file
paths for the databases we noticed that they looked like this
"e:\mssql\data\\file.mdf" and "F:\mssql\logs\\logfile.ldf"" Note the double
slashes.
> What we found that is we changed the default data and log paths through
enterprise manager. When we did it, we went to EM, clicked the browse
button and then selected the target directories. This left the settings
looking like this:
> "E:\mssql\data\"
> "F:\mssql\logs\"
> When you create a database through EM, everything works fine. When you
create a database using the create database command, it gets created with
the double backslashes in the file path for the data and log files.
> We have been able to re-create this on several servers. If you take out
the trailing backslashes and stop and start the MSSQL Service (it appears
changes to this setting only takes affect after a service stop and start
even though the running value would indicate otherwise) then the 'create
database' function work fine and only inserts single slashes from then on.
> We are running SQL 2000 SP3 and we haven't been able to find any other
documented instance of this. If anyone else can re-create this issue we
would be very grateful to hear that it isn't something we are doing wrong.
> Thanks
>
>
>

Thursday, March 8, 2012

Bug in DBCC SHRINKDATABASE ?

Hi,
My real DB size is 5 MB and transaction log 30 MB. But transaction log
allocated 900 MB. And if I run
DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
it does not shrink me transaction log neither a bit. Why ????
I do not want to have so big transaction log.
BJ
Run DBCC SHRINKFILE instead
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> Hi,
> My real DB size is 5 MB and transaction log 30 MB. But transaction log
> allocated 900 MB. And if I run
> DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> it does not shrink me transaction log neither a bit. Why
????
> I do not want to have so big transaction log.
|||I tried
DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
and nothing happened.
"Uri Dimant" wrote:

> BJ
> Run DBCC SHRINKFILE instead
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> ????
>
>
|||B.J
What are you really trying to do?
You have emptied the file, have you tried to remove it by using EM?
Are you trying to reduce the size of the log file?
Are you trying to delete/remove the log file?
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...[vbcol=seagreen]
> I tried
> DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> and nothing happened.
> "Uri Dimant" wrote:
|||I want to reduce transaction log size.
when I right click my database and point to all task / shrink database / files
then I have :
Data
current size : 5 MB
Space used : 4 MB
Log
current size : 900,62 MB
Space used : 33,4 MB
And this does not like me. I have allocated to much size. I want to truncate
log to 35 MB. I did all combination of options in all task / shrink database
and no result and also I have not set minimal transaction log so I do not
know wehre is problem.
Hope I said you what you want.
"Uri Dimant" wrote:

> B.J
> What are you really trying to do?
> You have emptied the file, have you tried to remove it by using EM?
> Are you trying to reduce the size of the log file?
> Are you trying to delete/remove the log file?
>
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
>
>
|||BJ
1) Backup Log file (to truncate a commited transaction (inactive portion)
2) Run DBCC SHRINKFILE
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database /
files
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
truncate
> log to 35 MB. I did all combination of options in all task / shrink
database[vbcol=seagreen]
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
log[vbcol=seagreen]
|||Hi B.J.
Try to look up BACKUP LOG and DBCC SHRINKFILE in BOL and make sure that you
do the right things. It could be that you haven't truncated the logfile
correctly and/or haven't shrinked the logfile but the database.
Regards
Steen
B.J. wrote:[vbcol=seagreen]
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink
> database / files then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
> truncate log to 35 MB. I did all combination of options in all task /
> shrink database and no result and also I have not set minimal
> transaction log so I do not know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
|||B J
Have a look at these articles on shrinking the Transaction log.
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/default...b;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/default...b;en-us;272318
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Usually a transaction log only needs to be around 10 - 20% of the size of
the database. I assume you have a database in Full recovery mode and you do
not perform transaction log backups. Either set your database to simple
recovery mode or start taking regular transaction log backups.
Hope this helps
John
"B.J." wrote:
[vbcol=seagreen]
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database / files
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to truncate
> log to 35 MB. I did all combination of options in all task / shrink database
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
|||I did it and nothing. Read all about how to truncate log from help which is
installed to SQL Server 2000 but it does not work.
"Uri Dimant" wrote:

> BJ
> 1) Backup Log file (to truncate a commited transaction (inactive portion)
> 2) Run DBCC SHRINKFILE
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> files
> truncate
> database
> log
>
>

Bug in DBCC SHRINKDATABASE ?

Hi,
My real DB size is 5 MB and transaction log 30 MB. But transaction log
allocated 900 MB. And if I run
DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
it does not shrink me transaction log neither a bit. Why '''?
I do not want to have so big transaction log.BJ
Run DBCC SHRINKFILE instead
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> Hi,
> My real DB size is 5 MB and transaction log 30 MB. But transaction log
> allocated 900 MB. And if I run
> DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> it does not shrink me transaction log neither a bit. Why
'''?
> I do not want to have so big transaction log.|||I tried
DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
and nothing happened.
"Uri Dimant" wrote:

> BJ
> Run DBCC SHRINKFILE instead
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> '''?
>
>|||B.J
What are you really trying to do?
You have emptied the file, have you tried to remove it by using EM?
Are you trying to reduce the size of the log file?
Are you trying to delete/remove the log file?
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...[vbcol=seagreen]
> I tried
> DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> and nothing happened.
> "Uri Dimant" wrote:
>|||I want to reduce transaction log size.
when I right click my database and point to all task / shrink database / fil
es
then I have :
Data
current size : 5 MB
Space used : 4 MB
Log
current size : 900,62 MB
Space used : 33,4 MB
And this does not like me. I have allocated to much size. I want to truncate
log to 35 MB. I did all combination of options in all task / shrink database
and no result and also I have not set minimal transaction log so I do not
know wehre is problem.
Hope I said you what you want.
"Uri Dimant" wrote:

> B.J
> What are you really trying to do?
> You have emptied the file, have you tried to remove it by using EM?
> Are you trying to reduce the size of the log file?
> Are you trying to delete/remove the log file?
>
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
>
>|||BJ
1) Backup Log file (to truncate a commited transaction (inactive portion)
2) Run DBCC SHRINKFILE
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database /
files
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
truncate
> log to 35 MB. I did all combination of options in all task / shrink
database[vbcol=seagreen]
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
>
log[vbcol=seagreen]|||Hi B.J.
Try to look up BACKUP LOG and DBCC SHRINKFILE in BOL and make sure that you
do the right things. It could be that you haven't truncated the logfile
correctly and/or haven't shrinked the logfile but the database.
Regards
Steen
B.J. wrote:[vbcol=seagreen]
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink
> database / files then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
> truncate log to 35 MB. I did all combination of options in all task /
> shrink database and no result and also I have not set minimal
> transaction log so I do not know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
>|||B J
Have a look at these articles on shrinking the Transaction log.
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/defaul...kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/defaul...kb;en-us;272318
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Usually a transaction log only needs to be around 10 - 20% of the size of
the database. I assume you have a database in Full recovery mode and you do
not perform transaction log backups. Either set your database to simple
recovery mode or start taking regular transaction log backups.
Hope this helps
John
"B.J." wrote:
[vbcol=seagreen]
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database / f
iles
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to trunca
te
> log to 35 MB. I did all combination of options in all task / shrink databa
se
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
>|||I did it and nothing. Read all about how to truncate log from help which is
installed to SQL Server 2000 but it does not work.
"Uri Dimant" wrote:

> BJ
> 1) Backup Log file (to truncate a commited transaction (inactive portion)
> 2) Run DBCC SHRINKFILE
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> files
> truncate
> database
> log
>
>

Bug in DBCC SHRINKDATABASE ?

Hi,
My real DB size is 5 MB and transaction log 30 MB. But transaction log
allocated 900 MB. And if I run
DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
it does not shrink me transaction log neither a bit. Why '''?
I do not want to have so big transaction log.BJ
Run DBCC SHRINKFILE instead
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> Hi,
> My real DB size is 5 MB and transaction log 30 MB. But transaction log
> allocated 900 MB. And if I run
> DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> it does not shrink me transaction log neither a bit. Why
'''?
> I do not want to have so big transaction log.|||I tried
DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
and nothing happened.
"Uri Dimant" wrote:
> BJ
> Run DBCC SHRINKFILE instead
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > Hi,
> >
> > My real DB size is 5 MB and transaction log 30 MB. But transaction log
> > allocated 900 MB. And if I run
> >
> > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> >
> > it does not shrink me transaction log neither a bit. Why
> '''?
> > I do not want to have so big transaction log.
>
>|||B.J
What are you really trying to do?
You have emptied the file, have you tried to remove it by using EM?
Are you trying to reduce the size of the log file?
Are you trying to delete/remove the log file?
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> I tried
> DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> and nothing happened.
> "Uri Dimant" wrote:
> > BJ
> > Run DBCC SHRINKFILE instead
> >
> > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > Hi,
> > >
> > > My real DB size is 5 MB and transaction log 30 MB. But transaction log
> > > allocated 900 MB. And if I run
> > >
> > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > >
> > > it does not shrink me transaction log neither a bit. Why
> > '''?
> > > I do not want to have so big transaction log.
> >
> >
> >|||I want to reduce transaction log size.
when I right click my database and point to all task / shrink database / files
then I have :
Data
current size : 5 MB
Space used : 4 MB
Log
current size : 900,62 MB
Space used : 33,4 MB
And this does not like me. I have allocated to much size. I want to truncate
log to 35 MB. I did all combination of options in all task / shrink database
and no result and also I have not set minimal transaction log so I do not
know wehre is problem.
Hope I said you what you want.
"Uri Dimant" wrote:
> B.J
> What are you really trying to do?
> You have emptied the file, have you tried to remove it by using EM?
> Are you trying to reduce the size of the log file?
> Are you trying to delete/remove the log file?
>
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> > I tried
> >
> > DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> >
> > and nothing happened.
> >
> > "Uri Dimant" wrote:
> >
> > > BJ
> > > Run DBCC SHRINKFILE instead
> > >
> > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > > Hi,
> > > >
> > > > My real DB size is 5 MB and transaction log 30 MB. But transaction log
> > > > allocated 900 MB. And if I run
> > > >
> > > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > > >
> > > > it does not shrink me transaction log neither a bit. Why
> > > '''?
> > > > I do not want to have so big transaction log.
> > >
> > >
> > >
>
>|||BJ
1) Backup Log file (to truncate a commited transaction (inactive portion)
2) Run DBCC SHRINKFILE
"B.J." <BJ@.discussions.microsoft.com> wrote in message
news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database /
files
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
truncate
> log to 35 MB. I did all combination of options in all task / shrink
database
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
> > B.J
> > What are you really trying to do?
> > You have emptied the file, have you tried to remove it by using EM?
> >
> > Are you trying to reduce the size of the log file?
> >
> > Are you trying to delete/remove the log file?
> >
> >
> >
> >
> >
> >
> > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> > > I tried
> > >
> > > DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> > >
> > > and nothing happened.
> > >
> > > "Uri Dimant" wrote:
> > >
> > > > BJ
> > > > Run DBCC SHRINKFILE instead
> > > >
> > > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > > > Hi,
> > > > >
> > > > > My real DB size is 5 MB and transaction log 30 MB. But transaction
log
> > > > > allocated 900 MB. And if I run
> > > > >
> > > > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > > > >
> > > > > it does not shrink me transaction log neither a bit. Why
> > > > '''?
> > > > > I do not want to have so big transaction log.
> > > >
> > > >
> > > >
> >
> >
> >|||Hi B.J.
Try to look up BACKUP LOG and DBCC SHRINKFILE in BOL and make sure that you
do the right things. It could be that you haven't truncated the logfile
correctly and/or haven't shrinked the logfile but the database.
Regards
Steen
B.J. wrote:
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink
> database / files then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to
> truncate log to 35 MB. I did all combination of options in all task /
> shrink database and no result and also I have not set minimal
> transaction log so I do not know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
>> B.J
>> What are you really trying to do?
>> You have emptied the file, have you tried to remove it by using EM?
>> Are you trying to reduce the size of the log file?
>> Are you trying to delete/remove the log file?
>>
>>
>>
>> "B.J." <BJ@.discussions.microsoft.com> wrote in message
>> news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
>> I tried
>> DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
>> and nothing happened.
>> "Uri Dimant" wrote:
>> BJ
>> Run DBCC SHRINKFILE instead
>> "B.J." <BJ@.discussions.microsoft.com> wrote in message
>> news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
>> Hi,
>> My real DB size is 5 MB and transaction log 30 MB. But
>> transaction log allocated 900 MB. And if I run
>> DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
>> it does not shrink me transaction log neither a bit. Why
>> '''? I do not want to have so big transaction log.|||B J
Have a look at these articles on shrinking the Transaction log.
INF: How to Shrink the SQL Server 7.0 Transaction Log
http://support.microsoft.com/default.aspx?scid=kb;en-us;256650
INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
http://support.microsoft.com/default.aspx?scid=kb;en-us;272318
http://www.mssqlserver.com/faq/logs-shrinklog.asp
Usually a transaction log only needs to be around 10 - 20% of the size of
the database. I assume you have a database in Full recovery mode and you do
not perform transaction log backups. Either set your database to simple
recovery mode or start taking regular transaction log backups.
Hope this helps
John
"B.J." wrote:
> I want to reduce transaction log size.
> when I right click my database and point to all task / shrink database / files
> then I have :
> Data
> current size : 5 MB
> Space used : 4 MB
> Log
> current size : 900,62 MB
> Space used : 33,4 MB
>
> And this does not like me. I have allocated to much size. I want to truncate
> log to 35 MB. I did all combination of options in all task / shrink database
> and no result and also I have not set minimal transaction log so I do not
> know wehre is problem.
> Hope I said you what you want.
> "Uri Dimant" wrote:
> > B.J
> > What are you really trying to do?
> > You have emptied the file, have you tried to remove it by using EM?
> >
> > Are you trying to reduce the size of the log file?
> >
> > Are you trying to delete/remove the log file?
> >
> >
> >
> >
> >
> >
> > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> > > I tried
> > >
> > > DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> > >
> > > and nothing happened.
> > >
> > > "Uri Dimant" wrote:
> > >
> > > > BJ
> > > > Run DBCC SHRINKFILE instead
> > > >
> > > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > > > Hi,
> > > > >
> > > > > My real DB size is 5 MB and transaction log 30 MB. But transaction log
> > > > > allocated 900 MB. And if I run
> > > > >
> > > > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > > > >
> > > > > it does not shrink me transaction log neither a bit. Why
> > > > '''?
> > > > > I do not want to have so big transaction log.
> > > >
> > > >
> > > >
> >
> >
> >|||I did it and nothing. Read all about how to truncate log from help which is
installed to SQL Server 2000 but it does not work.
"Uri Dimant" wrote:
> BJ
> 1) Backup Log file (to truncate a commited transaction (inactive portion)
> 2) Run DBCC SHRINKFILE
>
>
> "B.J." <BJ@.discussions.microsoft.com> wrote in message
> news:4E607247-C485-468F-B5E7-7EAFAA1C03D9@.microsoft.com...
> > I want to reduce transaction log size.
> >
> > when I right click my database and point to all task / shrink database /
> files
> > then I have :
> > Data
> > current size : 5 MB
> > Space used : 4 MB
> >
> > Log
> > current size : 900,62 MB
> > Space used : 33,4 MB
> >
> >
> > And this does not like me. I have allocated to much size. I want to
> truncate
> > log to 35 MB. I did all combination of options in all task / shrink
> database
> > and no result and also I have not set minimal transaction log so I do not
> > know wehre is problem.
> > Hope I said you what you want.
> >
> > "Uri Dimant" wrote:
> >
> > > B.J
> > > What are you really trying to do?
> > > You have emptied the file, have you tried to remove it by using EM?
> > >
> > > Are you trying to reduce the size of the log file?
> > >
> > > Are you trying to delete/remove the log file?
> > >
> > >
> > >
> > >
> > >
> > >
> > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> > > > I tried
> > > >
> > > > DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> > > >
> > > > and nothing happened.
> > > >
> > > > "Uri Dimant" wrote:
> > > >
> > > > > BJ
> > > > > Run DBCC SHRINKFILE instead
> > > > >
> > > > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > > > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > > > > Hi,
> > > > > >
> > > > > > My real DB size is 5 MB and transaction log 30 MB. But transaction
> log
> > > > > > allocated 900 MB. And if I run
> > > > > >
> > > > > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > > > > >
> > > > > > it does not shrink me transaction log neither a bit. Why
> > > > > '''?
> > > > > > I do not want to have so big transaction log.
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>|||Thank you,
KB help me, exactly
DBCC SHRINKFILE('N_Log', 0);
BACKUP LOG N WITH TRUNCATE_ONLY
DBCC SHRINKFILE('N', 0);
Have a nice day :)
"John Bandettini" wrote:
> B J
> Have a look at these articles on shrinking the Transaction log.
> INF: How to Shrink the SQL Server 7.0 Transaction Log
> http://support.microsoft.com/default.aspx?scid=kb;en-us;256650
> INF: Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE
> http://support.microsoft.com/default.aspx?scid=kb;en-us;272318
> http://www.mssqlserver.com/faq/logs-shrinklog.asp
> Usually a transaction log only needs to be around 10 - 20% of the size of
> the database. I assume you have a database in Full recovery mode and you do
> not perform transaction log backups. Either set your database to simple
> recovery mode or start taking regular transaction log backups.
> Hope this helps
> John
> "B.J." wrote:
> > I want to reduce transaction log size.
> >
> > when I right click my database and point to all task / shrink database / files
> > then I have :
> > Data
> > current size : 5 MB
> > Space used : 4 MB
> >
> > Log
> > current size : 900,62 MB
> > Space used : 33,4 MB
> >
> >
> > And this does not like me. I have allocated to much size. I want to truncate
> > log to 35 MB. I did all combination of options in all task / shrink database
> > and no result and also I have not set minimal transaction log so I do not
> > know wehre is problem.
> > Hope I said you what you want.
> >
> > "Uri Dimant" wrote:
> >
> > > B.J
> > > What are you really trying to do?
> > > You have emptied the file, have you tried to remove it by using EM?
> > >
> > > Are you trying to reduce the size of the log file?
> > >
> > > Are you trying to delete/remove the log file?
> > >
> > >
> > >
> > >
> > >
> > >
> > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > news:8404C0B7-1D3C-4B71-B22B-D5EEC6C12A69@.microsoft.com...
> > > > I tried
> > > >
> > > > DBCC SHRINKFILE ('IDFROMSysfile..', EMPTYFILE);
> > > >
> > > > and nothing happened.
> > > >
> > > > "Uri Dimant" wrote:
> > > >
> > > > > BJ
> > > > > Run DBCC SHRINKFILE instead
> > > > >
> > > > > "B.J." <BJ@.discussions.microsoft.com> wrote in message
> > > > > news:0D8B571A-0F7D-4F47-AD2C-3B1FEEB7924B@.microsoft.com...
> > > > > > Hi,
> > > > > >
> > > > > > My real DB size is 5 MB and transaction log 30 MB. But transaction log
> > > > > > allocated 900 MB. And if I run
> > > > > >
> > > > > > DBCC SHRINKDATABASE (MyDB, 0, TRUNCATEONLY)
> > > > > >
> > > > > > it does not shrink me transaction log neither a bit. Why
> > > > > '''?
> > > > > > I do not want to have so big transaction log.
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >

Wednesday, March 7, 2012

bug described in article 872843

I am experiencing same problem described in article 872843. even though my
sql server is on SP4.
I try to tweak Log reader Agent Properties & other things but that is not
helping.
It is my impression whether this bug is not fixed or got break in SP4.
Any reply/feedback/solutions/tips will be highly appreciated.
Can you try to reapply the SP. There have been instances where the sp was
not completely applied.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Jay" <sqldba@.abc.com> wrote in message
news:7f4e272a5b544937af6958bf9119db34@.ureader.com. ..
>I am experiencing same problem described in article 872843. even though my
> sql server is on SP4.
> I try to tweak Log reader Agent Properties & other things but that is not
> helping.
> It is my impression whether this bug is not fixed or got break in SP4.
> Any reply/feedback/solutions/tips will be highly appreciated.

Saturday, February 25, 2012

buffer latch?

The following error got posted in the error log:
Could not open FCB for invalid file ID 21808 in
database 'USAAREP'. Table or database may be corrupted..
It was followed by series of messages:
Time out occurred while waiting for buffer latch type 3,
bp 0x147cc500, page (21808:808465440), stat 0x40d, object
ID 8:-271269168:0, waittime 500. Continuing to wait.
At this point we cannot do any backups using SQLMAINT or
BACKUP neither through EM nor QA.
Anybody heard of how to fix this? The server is 7.0 SP4.
TIA,
RobertRobert
I had a problem like this, it was fun to fix as I could
find very little info anywhere. I was using SQL 7 and it
hangs the whole database and you need to stop and start
SQL Server to fix it.
You need to identify the process that is causing the
problem, the buffer latch error message should point you
at the object. Try to work out what processes where
running against that object shortly before the problem
occured.
What was happening in my case was that we had a stored
procedure that updated a table, but due to a design fault
in the database, a small amount of duplicate records were
getting inserted to the table. At the end of the stored
procedure it called another stored procedure to delete the
duplicate records. At some time during this process an
automatic checkpoint kicked in. A combination of updated
records not yet physically written to the database, a
checkpoint trying to write them and another process trying
to delete records that had not yet been written, seemed to
cause the problem.
In the short term I changed the job to have three steps,
do the updates, perform a chackpoint and then the deletes.
For the longterm fix, I rewrote the update process to not
insert duplicates.
You possibilly have something similar going on. Out of
interest do you have a checkpoint process trying to run,
but unable to finish?
Hope this helps
Regards
John

Sunday, February 19, 2012

Broken BI Studio after Office 2k7 install

After an install of Office 2k7 last night, I'm getting some errors in my event log when i run BI Studio. The errors occur when i click a tab that tries to browse the metadata of the cube. IE: The calculations tab, or KPI's, etc..

These are the 2 errors:

Event Type: Error
Event Source: MSOLAP$LocalCube
Event Category: (289)
Event ID: 1
Date: 1/09/07
Time: 8:54:08 AM
User: N/A
Computer: WS124
Description:
The description for Event ID ( 1 ) in Source ( MSOLAP$LocalCube ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Message-handling subsystem: The message manager for the 4105 locale cannot be found..

Event Type: Error
Event Source: MSOLAP$LocalCube
Event Category: (289)
Event ID: 0
Date: 1/09/07
Time: 8:54:08 AM
User: N/A
Computer: WS124
Description:
The description for Event ID ( 0 ) in Source ( MSOLAP$LocalCube ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Errors in the metadata manager. The configuration property updates were not persisted. Internal error: An unexpected exception occured..

I am going to have BI Studio reinstalled, to see if that fixes the error. I am curious if anyone else has had/heard of this issue?

Thanks,
C

Hello. Here is a blog post that might help.

http://geekswithblogs.net/darrengosbell/archive/2006/11/17/97367.aspx

I am running Office 2007 with SQL Server 2005 SP2 CTP3(december). I never uninstalled the Office 2003 web components when I upgraded to Office 2007. This mix works without any problems.

HTH

Thomas Ivarsson

|||Thanks,
We are getting the hotfix from MS to give it a go. I will certainly post the results.

C|||

Hi

I got the same problem after installing MS Excel 2007 with the option to remove Excel 2003. I reinstalled Excel 2003 again later for testing purposes.

Chris, you never posted the results of the hotfix so I suppose that it worked!

Problem is, which hotfix did you use and where did you get it?

Thomas the link that you've supplied doesn't work ...

Thanks

Kobus

|||

Hi

Sorry Thomas, your link worked the second time around. Our Service Provider is experiencing problems with our connection so now we are on the backup ISDN line, we don't have T1 in South Africa like you guys in the US. The page may have timed out.

Info on the hotfix is here:
http://support.microsoft.com/default.aspx/kb/926421

More info on the workaround here:
http://sqlug.be/forums/339/ShowThread.aspx#339

You have to contact MS for the hotfix. SQL Server 2005 SP2 will solve the problem and since our company has that, that's the way I'll go.

Word Out
Kobus

|||Sorry Kobus,

You're right, i didn't post my results..

After applying the hotfix, i still ended up having to copy some DLL's around, as per your second link.

After i did that, it worked fine. But then i had some other software installed (i can't remember what it is right now) and it reverted the DLL's, so i had to re-copy them back so they were all the same version again.

Regardless, it should be ok if you install the hotfix, and make sure all the DLL's in those locations are the same version.

C

Broken BI Studio after Office 2k7 install

After an install of Office 2k7 last night, I'm getting some errors in my event log when i run BI Studio. The errors occur when i click a tab that tries to browse the metadata of the cube. IE: The calculations tab, or KPI's, etc..

These are the 2 errors:

Event Type: Error
Event Source: MSOLAP$LocalCube
Event Category: (289)
Event ID: 1
Date: 1/09/07
Time: 8:54:08 AM
User: N/A
Computer: WS124
Description:
The description for Event ID ( 1 ) in Source ( MSOLAP$LocalCube ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Message-handling subsystem: The message manager for the 4105 locale cannot be found..

Event Type: Error
Event Source: MSOLAP$LocalCube
Event Category: (289)
Event ID: 0
Date: 1/09/07
Time: 8:54:08 AM
User: N/A
Computer: WS124
Description:
The description for Event ID ( 0 ) in Source ( MSOLAP$LocalCube ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Message-handling subsystem: The message manager for the default locale cannot be found. The locale will be changed to US English. Errors in the metadata manager. The configuration property updates were not persisted. Internal error: An unexpected exception occured..

I am going to have BI Studio reinstalled, to see if that fixes the error. I am curious if anyone else has had/heard of this issue?

Thanks,
C

Hello. Here is a blog post that might help.

http://geekswithblogs.net/darrengosbell/archive/2006/11/17/97367.aspx

I am running Office 2007 with SQL Server 2005 SP2 CTP3(december). I never uninstalled the Office 2003 web components when I upgraded to Office 2007. This mix works without any problems.

HTH

Thomas Ivarsson

|||Thanks,
We are getting the hotfix from MS to give it a go. I will certainly post the results.

C|||

Hi

I got the same problem after installing MS Excel 2007 with the option to remove Excel 2003. I reinstalled Excel 2003 again later for testing purposes.

Chris, you never posted the results of the hotfix so I suppose that it worked!

Problem is, which hotfix did you use and where did you get it?

Thomas the link that you've supplied doesn't work ...

Thanks

Kobus

|||

Hi

Sorry Thomas, your link worked the second time around. Our Service Provider is experiencing problems with our connection so now we are on the backup ISDN line, we don't have T1 in South Africa like you guys in the US. The page may have timed out.

Info on the hotfix is here:
http://support.microsoft.com/default.aspx/kb/926421

More info on the workaround here:
http://sqlug.be/forums/339/ShowThread.aspx#339

You have to contact MS for the hotfix. SQL Server 2005 SP2 will solve the problem and since our company has that, that's the way I'll go.

Word Out
Kobus

|||Sorry Kobus,

You're right, i didn't post my results..

After applying the hotfix, i still ended up having to copy some DLL's around, as per your second link.

After i did that, it worked fine. But then i had some other software installed (i can't remember what it is right now) and it reverted the DLL's, so i had to re-copy them back so they were all the same version again.

Regardless, it should be ok if you install the hotfix, and make sure all the DLL's in those locations are the same version.

C

Thursday, February 16, 2012

Bringing Standby server online when in "no recovery mode"

Hi,

I am trying to set up Log Shipping. Though I have the following problem...
I want to set up LS without any user being able to connect. As I understand, this means I have to select the "No recovery mode" in the "Add Destination Database" window when creating the Log Shipping Maintenance Plan.
This all works fine. I set this up, no user can connect to the database (it shows status: (Loading) ), perfect.

However, the problem I encounter is when I want to bring the Standby server online.
I run the 'sp_change_primary_role' SP on the primary server... works fine.
I run the 'sp_change_secondary_role' on the standby server... errors:

Server: Msg 927, Level 14, State 2, Line 1
Database 'Northwind' cannot be opened. It is in the middle of a restore.
Server: Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Server: Msg 14440, Level 16, State 1, Procedure sp_change_secondary_role, Line 49
Could not set single user mode.

So what am I doing wrong? Am I forgetting something? I think i must do. The only way to get the secondary (standby) online is to do a "detach - attach", as far as I know.
I can not check its Properties or do a restore or backup of this database either.

Any help would be very much appreciated.

Thanks in advance and kind regards,

Jan V.Run the following command, to open the database:

restore database (name of database) with recovery

This will trigger a recovery of the database, and reset the database to "open" from "loading"

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,
Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
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/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>
|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> 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/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
last
>
|||Can you post that exact RESTORE command you are executing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> last
>
|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
4326,[vbcol=seagreen]
is[vbcol=seagreen]
includes[vbcol=seagreen]
again[vbcol=seagreen]
|||If you just want to make the database accessible (fail over), try executing (as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> 4326,
> is
> includes
> again
>

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
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/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> 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/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
last[vbcol=seagreen]
>|||Can you post that exact RESTORE command you are executing?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[v
bcol=seagreen]
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326
,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> last
>[/vbcol]|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
4326,[vbcol=seagreen]
is[vbcol=seagreen]
includes[vbcol=seagreen]
again[vbcol=seagreen]|||If you just want to make the database accessible (fail over), try executing
(as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...[v
bcol=seagreen]
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> 4326,
> is
> includes
> again
>[/vbcol]

Bring up the standby server in sql 2k

Hi,
How do I bring up the standby server online in sql2k by restoring the last
log backup(backed up with noinit).
This log file has been restored with standby clause. can I restore again
with recovery?
Thanks,Hi
Yes.
RESTORE <dbname> WITH RECOVERY
will bring the DB into a usable state.
--
--
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/
"mecn" <mecn2002@.yahoo.com> wrote in message
news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> Hi,
> How do I bring up the standby server online in sql2k by restoring the last
> log backup(backed up with noinit).
> This log file has been restored with standby clause. can I restore again
> with recovery?
> Thanks,
>|||Thanks,
But when I doing restore with recovery give me error says Server: Msg 4326,
Level 16, State 1, Line 11
The log in this backup set terminates at LSN 6791000023918900001, which is
too early to apply to the database. A more recent log backup that includes
LSN 6794000015810000001 can be restored.
I don't know why?
"Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> Hi
> Yes.
> RESTORE <dbname> WITH RECOVERY
> will bring the DB into a usable state.
> --
> --
> 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/
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> > Hi,
> >
> > How do I bring up the standby server online in sql2k by restoring the
last
> > log backup(backed up with noinit).
> > This log file has been restored with standby clause. can I restore again
> > with recovery?
> >
> > Thanks,
> >
> >
>|||Can you post that exact RESTORE command you are executing?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> Thanks,
> But when I doing restore with recovery give me error says Server: Msg 4326,
> Level 16, State 1, Line 11
> The log in this backup set terminates at LSN 6791000023918900001, which is
> too early to apply to the database. A more recent log backup that includes
> LSN 6794000015810000001 can be restored.
> I don't know why?
> "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
>> Hi
>> Yes.
>> RESTORE <dbname> WITH RECOVERY
>> will bring the DB into a usable state.
>> --
>> --
>> 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/
>> "mecn" <mecn2002@.yahoo.com> wrote in message
>> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
>> > Hi,
>> >
>> > How do I bring up the standby server online in sql2k by restoring the
> last
>> > log backup(backed up with noinit).
>> > This log file has been restored with standby clause. can I restore again
>> > with recovery?
>> >
>> > Thanks,
>> >
>> >
>>
>|||This is the script I excuted with error.
restore log LDNPROD from disk = 'path.bak' with recovery
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
> Can you post that exact RESTORE command you are executing?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "mecn" <mecn2002@.yahoo.com> wrote in message
news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
> > Thanks,
> > But when I doing restore with recovery give me error says Server: Msg
4326,
> > Level 16, State 1, Line 11
> > The log in this backup set terminates at LSN 6791000023918900001, which
is
> > too early to apply to the database. A more recent log backup that
includes
> > LSN 6794000015810000001 can be restored.
> >
> > I don't know why?
> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
> > news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
> >> Hi
> >>
> >> Yes.
> >>
> >> RESTORE <dbname> WITH RECOVERY
> >> will bring the DB into a usable state.
> >>
> >> --
> >> --
> >> 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/
> >>
> >> "mecn" <mecn2002@.yahoo.com> wrote in message
> >> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
> >> > Hi,
> >> >
> >> > How do I bring up the standby server online in sql2k by restoring the
> > last
> >> > log backup(backed up with noinit).
> >> > This log file has been restored with standby clause. can I restore
again
> >> > with recovery?
> >> >
> >> > Thanks,
> >> >
> >> >
> >>
> >>
> >
> >|||If you just want to make the database accessible (fail over), try executing (as suggested by Mike):
RESTORE DATABASE LDNPROD WITH RECOVERY
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"mecn" <mecn2002@.yahoo.com> wrote in message news:eRuvPeo9FHA.1224@.TK2MSFTNGP12.phx.gbl...
> This is the script I excuted with error.
> restore log LDNPROD from disk = 'path.bak' with recovery
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
> message news:ObMuJOn9FHA.3660@.TK2MSFTNGP09.phx.gbl...
>> Can you post that exact RESTORE command you are executing?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:u4ki7ag9FHA.1332@.tk2msftngp13.phx.gbl...
>> > Thanks,
>> > But when I doing restore with recovery give me error says Server: Msg
> 4326,
>> > Level 16, State 1, Line 11
>> > The log in this backup set terminates at LSN 6791000023918900001, which
> is
>> > too early to apply to the database. A more recent log backup that
> includes
>> > LSN 6794000015810000001 can be restored.
>> >
>> > I don't know why?
>> > "Mike Epprecht (SQL MVP)" <mike@.epprecht.net> wrote in message
>> > news:um6tXTg9FHA.252@.TK2MSFTNGP15.phx.gbl...
>> >> Hi
>> >>
>> >> Yes.
>> >>
>> >> RESTORE <dbname> WITH RECOVERY
>> >> will bring the DB into a usable state.
>> >>
>> >> --
>> >> --
>> >> 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/
>> >>
>> >> "mecn" <mecn2002@.yahoo.com> wrote in message
>> >> news:uAtveOg9FHA.2264@.tk2msftngp13.phx.gbl...
>> >> > Hi,
>> >> >
>> >> > How do I bring up the standby server online in sql2k by restoring the
>> > last
>> >> > log backup(backed up with noinit).
>> >> > This log file has been restored with standby clause. can I restore
> again
>> >> > with recovery?
>> >> >
>> >> > Thanks,
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>

Bring Online (Missing Transaction Log)

I cant bring my database online since the LDF is missing. However, the MDF
is fine. If I try to bring it online I get an error 5181 due to the missing
file.
Is there anyway to get the database going again without the transaction log?
Cheers,
elzikoHi,
Start the database in Emergency mode. So that Database will be started with
out transaction log. After that you can use DTS to transfer the data
and objects to a new database.
How to start the database in Emergency Mode:
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768
where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
Note:
Setting the database status to emergency mode tells SQL Server to skip
automatic recovery and
lets you access the data.
Thanks
Hari
MCDBA
"elziko" <elziko@.NOTSPAMMINGyahoo.co.uk> wrote in message
news:u6nrn1kEEHA.1368@.TK2MSFTNGP11.phx.gbl...
> I cant bring my database online since the LDF is missing. However, the MDF
> is fine. If I try to bring it online I get an error 5181 due to the
missing
> file.
> Is there anyway to get the database going again without the transaction
log?
> --
> Cheers,
> elziko
>

Bring Log File (LDF) Online

Hi,
I have a server with two separate paritions running SQL 2005. One partition
with the data (mdf) files failed entirely and all data was lost. The second
partition with the log (ldf) files remained entact.
One of the failed databases was restored from tape, but it's not recent
enough. I want to make the database "see" the log file. How can I make a
SQL database recongize a more recent log file?
Once the database/log file are both online, then I can hopefully analyze the
log file using third party tools (ie: Apex or Lumigent) to retrieve data.
Thanks in advance.Hi Dennis
You can't see the log as such, the restored database would have it's own log
file. If your database is in full recovery mode and you have log backups,
they could be rolled forward
http://msdn2.microsoft.com/en-us/library/ms189596.aspx although if you have
not backed up the tail log it will not be up to the point of failure
http://msdn2.microsoft.com/en-us/library/ms179314.aspx
John
"Dennis Grecu" <Dennis Grecu@.discussions.microsoft.com> wrote in message
news:728FC0C4-B069-40F6-A874-96265D0FF4FE@.microsoft.com...
> Hi,
> I have a server with two separate paritions running SQL 2005. One
> partition
> with the data (mdf) files failed entirely and all data was lost. The
> second
> partition with the log (ldf) files remained entact.
> One of the failed databases was restored from tape, but it's not recent
> enough. I want to make the database "see" the log file. How can I make a
> SQL database recongize a more recent log file?
> Once the database/log file are both online, then I can hopefully analyze
> the
> log file using third party tools (ie: Apex or Lumigent) to retrieve data.
> Thanks in advance.
>

Bring Log File (LDF) Online

Hi,
I have a server with two separate paritions running SQL 2005. One partition
with the data (mdf) files failed entirely and all data was lost. The second
partition with the log (ldf) files remained entact.
One of the failed databases was restored from tape, but it's not recent
enough. I want to make the database "see" the log file. How can I make a
SQL database recongize a more recent log file?
Once the database/log file are both online, then I can hopefully analyze the
log file using third party tools (ie: Apex or Lumigent) to retrieve data.
Thanks in advance.Hi Dennis
You can't see the log as such, the restored database would have it's own log
file. If your database is in full recovery mode and you have log backups,
they could be rolled forward
http://msdn2.microsoft.com/en-us/library/ms189596.aspx although if you have
not backed up the tail log it will not be up to the point of failure
http://msdn2.microsoft.com/en-us/library/ms179314.aspx
John
"Dennis Grecu" <Dennis Grecu@.discussions.microsoft.com> wrote in message
news:728FC0C4-B069-40F6-A874-96265D0FF4FE@.microsoft.com...
> Hi,
> I have a server with two separate paritions running SQL 2005. One
> partition
> with the data (mdf) files failed entirely and all data was lost. The
> second
> partition with the log (ldf) files remained entact.
> One of the failed databases was restored from tape, but it's not recent
> enough. I want to make the database "see" the log file. How can I make a
> SQL database recongize a more recent log file?
> Once the database/log file are both online, then I can hopefully analyze
> the
> log file using third party tools (ie: Apex or Lumigent) to retrieve data.
> Thanks in advance.
>