Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Thursday, March 29, 2012

Database name is a corrupt file - Veritas Backupexec

I am getting this message while backing up database using
Veritas Software. I need to find what causing this problem.
Thanks,
Mukul Agochiya
magochiya@.hotmail.comThis is the exact wording of error
Operating system error 995(The I/O operation has been
aborted because of either a thre4ad exit or an application
request.)
>--Original Message--
>I am getting this message while backing up database using
>Veritas Software. I need to find what causing this
problem.
>Thanks,
>Mukul Agochiya
>magochiya@.hotmail.com
>.
>|||don't use BE to backup DBs. Backup DBs to files using SQL native tools and
use BE to backup those files to tapes.
"Mukul Agochiya" <magochiya@.hotmail.com> wrote in message
news:13ac01c39258$1667e1f0$a101280a@.phx.gbl...
> I am getting this message while backing up database using
> Veritas Software. I need to find what causing this problem.
> Thanks,
> Mukul Agochiya
> magochiya@.hotmail.com

database name changing

I would like to change database name but also to change database data file name and log file name.
Any suggestions?
Changing only name is not a problem.
Thanks
Przemo
Hi
Take a look at ALTER DATABASE command on BOL
Why do you want to change a phsycal file name?
create database test
go
sp_detach_db test (Change now the name of files)
go
sp_attach_db test,
@.filename1 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test1.mdf',
@.filename2 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test_log1.ldf'
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo
|||Hi,
Database Name change
1. Remove all the users connected to the database
alter database <dbname> set single_user with rollback immediate
2. Run the below command to rename the database
alter database <current_db_name> modify name=<new_db_name>
You can replace the step-2 with sp_renamedb system stored Procedure.
Data and Log file name change
1. Detach the database using SP_DETACH_DB
2. Rename the physical files
3. Attach back the files using SP_ATTACH_DB with new physical file names.
Thanks
Hari
MCDBA
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo
|||Przemo
It is pretty simple
1. Using the GUI you can detach the DB. (Make sure you have a backup first)
2. Then go to the file location and rename the files
3. Then Using the GUI again you can attach the DB. It will automattically show the old file names and path. Change the path names to match the new naming and rename the DB and you are done.
Jeff Duncan
MCDBA, MCSE+I

database name changing

I would like to change database name but also to change database data file n
ame and log file name.
Any suggestions?
Changing only name is not a problem.
Thanks
PrzemoHi
Take a look at ALTER DATABASE command on BOL
Why do you want to change a phsycal file name?
create database test
go
sp_detach_db test (Change now the name of files)
go
sp_attach_db test,
@.filename1 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test1.mdf',
@.filename2 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test_log1.ldf'
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo|||Hi,
Database Name change
--
1. Remove all the users connected to the database
alter database <dbname> set single_user with rollback immediate
2. Run the below command to rename the database
alter database <current_db_name> modify name=<new_db_name>
You can replace the step-2 with sp_renamedb system stored Procedure.
Data and Log file name change
--
1. Detach the database using SP_DETACH_DB
2. Rename the physical files
3. Attach back the files using SP_ATTACH_DB with new physical file names.
Thanks
Hari
MCDBA
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo|||Przemo
It is pretty simple
1. Using the GUI you can detach the DB. (Make sure you have a backup first
)
2. Then go to the file location and rename the files
3. Then Using the GUI again you can attach the DB. It will automattically
show the old file names and path. Change the path names to match the new na
ming and rename the DB and you are done.
Jeff Duncan
MCDBA, MCSE+I

database name changing

I would like to change database name but also to change database data file name and log file name
Any suggestions
Changing only name is not a problem
Thank
PrzemoHi
Take a look at ALTER DATABASE command on BOL
Why do you want to change a phsycal file name?
create database test
go
sp_detach_db test (Change now the name of files)
go
sp_attach_db test,
@.filename1 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test1.mdf',
@.filename2 = N'd:\Program Files\Microsoft SQL
Server\MSSQL\Data\test_log1.ldf'
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo|||Hi,
Database Name change
--
1. Remove all the users connected to the database
alter database <dbname> set single_user with rollback immediate
2. Run the below command to rename the database
alter database <current_db_name> modify name=<new_db_name>
You can replace the step-2 with sp_renamedb system stored Procedure.
Data and Log file name change
--
1. Detach the database using SP_DETACH_DB
2. Rename the physical files
3. Attach back the files using SP_ATTACH_DB with new physical file names.
Thanks
Hari
MCDBA
"Przemo" <anonymous@.discussions.microsoft.com> wrote in message
news:95FB2D1B-C881-4382-ADDF-D927F99D7FC0@.microsoft.com...
> I would like to change database name but also to change database data file
name and log file name.
> Any suggestions?
> Changing only name is not a problem.
> Thanks
> Przemo

database move

I recently moved a database and its transaction log file to another drive due
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts?
Robert
Hi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set on
the mdf and ldf files.
John
"Robert Gandrud" wrote:

> I recently moved a database and its transaction log file to another drive due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get an
> error that it can't.
> Any thoughts?
> Robert
|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
[vbcol=seagreen]
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
|||Hi
Check out
http://msdn.microsoft.com/library/de...r_da2_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
[vbcol=seagreen]
> In the move of this large db/log to another volume, the sql service account
> that starts mssqlserver didn't have specific rights to the new location. I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit the
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:

database move

I recently moved a database and its transaction log file to another drive du
e
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts'
RobertHi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set o
n
the mdf and ldf files.
John
"Robert Gandrud" wrote:

> I recently moved a database and its transaction log file to another drive
due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get
an
> error that it can't.
> Any thoughts'
> Robert|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
[vbcol=seagreen]
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set
on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
>|||Hi
Check out
http://msdn.microsoft.com/library/d...r />
_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
[vbcol=seagreen]
> In the move of this large db/log to another volume, the sql service accoun
t
> that starts mssqlserver didn't have specific rights to the new location.
I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit t
he
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:
>sql

database move

I recently moved a database and its transaction log file to another drive due
to space issues. I followed the kb article 224071 on how to move a user
database and it appears that it worked correctly.
However, now the database comes up as "read-only" and if I view the
properties of the db and try to remove the "read-only" designation, I get an
error that it can't.
Any thoughts'
RobertHi Robert
Check the SQL Server error log to see if there is any information on the
problem. You may also want to check that the readonly attribute is not set on
the mdf and ldf files.
John
"Robert Gandrud" wrote:
> I recently moved a database and its transaction log file to another drive due
> to space issues. I followed the kb article 224071 on how to move a user
> database and it appears that it worked correctly.
> However, now the database comes up as "read-only" and if I view the
> properties of the db and try to remove the "read-only" designation, I get an
> error that it can't.
> Any thoughts'
> Robert|||In the move of this large db/log to another volume, the sql service account
that starts mssqlserver didn't have specific rights to the new location. I
gave it full control to the new db location and rebooted.
The error log then stated that it performed a full recovery on that db,
which it couldn't do before. I was then able to remove the Read-only
property in the db properties in Ent. Mgr.
Thanks for your help.
Also, for some reason, I have about a 30GB log file. I was under the
understanding that if I backup the transaction log, that it would commit the
transactions and severly reduce my log file size, but that didn't seem to
work.
Any thoughts on that?
Thanks again,
Robert
"John Bell" wrote:
> Hi Robert
> Check the SQL Server error log to see if there is any information on the
> problem. You may also want to check that the readonly attribute is not set on
> the mdf and ldf files.
> John
> "Robert Gandrud" wrote:
> > I recently moved a database and its transaction log file to another drive due
> > to space issues. I followed the kb article 224071 on how to move a user
> > database and it appears that it worked correctly.
> >
> > However, now the database comes up as "read-only" and if I view the
> > properties of the db and try to remove the "read-only" designation, I get an
> > error that it can't.
> >
> > Any thoughts'
> >
> > Robert|||Hi
Check out
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/architec/8_ar_da2_1uzr.asp
on shrinking the transaction log.
John
"Robert Gandrud" wrote:
> In the move of this large db/log to another volume, the sql service account
> that starts mssqlserver didn't have specific rights to the new location. I
> gave it full control to the new db location and rebooted.
> The error log then stated that it performed a full recovery on that db,
> which it couldn't do before. I was then able to remove the Read-only
> property in the db properties in Ent. Mgr.
> Thanks for your help.
> Also, for some reason, I have about a 30GB log file. I was under the
> understanding that if I backup the transaction log, that it would commit the
> transactions and severly reduce my log file size, but that didn't seem to
> work.
> Any thoughts on that?
> Thanks again,
> Robert
> "John Bell" wrote:
> > Hi Robert
> >
> > Check the SQL Server error log to see if there is any information on the
> > problem. You may also want to check that the readonly attribute is not set on
> > the mdf and ldf files.
> >
> > John
> >
> > "Robert Gandrud" wrote:
> >
> > > I recently moved a database and its transaction log file to another drive due
> > > to space issues. I followed the kb article 224071 on how to move a user
> > > database and it appears that it worked correctly.
> > >
> > > However, now the database comes up as "read-only" and if I view the
> > > properties of the db and try to remove the "read-only" designation, I get an
> > > error that it can't.
> > >
> > > Any thoughts'
> > >
> > > Robertsql

Tuesday, March 27, 2012

Database mirroring with truncate log on checkpoint

Hi All,
Understand that database mirroring need to use FULL recovery model, meaning
that all transaction detail will be save into log file. Hence the log file
will increase tremendously.
Can I enable truncate log on checkpoint on principle database and mirror
database? so the log file size will under control.
Thanks.
--
Regards,
VenedictHello There!
You have to set FULL recovery model for database mirroring.
To learn more about this, you can refer to the following document:
http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx
Also, when you try to dump \ truncate your log file which is used by
Database Mirroring, you'll get an error and operation will not be completed
successfully.
To keep log file's size under control, you may try to setup a job to take
it's backup regularly for example every 10-20 mins and disable it's
autogrowth and set some size manually. However, be wise while configuring
it.
Ekrem Ã?nsoy
http://www.ekremonsoy.net , http://ekremonsoy.blogspot.com
MCBDA, MCTS: SQL Server 2005, MCITP:DBA, MCSD.Net, MCSE, MCT
"Venedict" <Venedict@.discussions.microsoft.com> wrote in message
news:36A23B54-820D-4B0E-9DA9-8A37A850D7F8@.microsoft.com...
> Hi All,
> Understand that database mirroring need to use FULL recovery model,
> meaning
> that all transaction detail will be save into log file. Hence the log file
> will increase tremendously.
> Can I enable truncate log on checkpoint on principle database and mirror
> database? so the log file size will under control.
> Thanks.
> --
> Regards,
> Venedict

Thursday, March 22, 2012

Database mirroring and log file growth

Is there a way to shrink the log file while using database mirroring?
We have a 20 GB database with a log file about 80 GB.
Transaction log backup is done every 30 minutes, full backup each night, but the log file is not truncated.

Since it seems that the log file grows about 1 GB each day (we have migrated from sql2000 about 50 days ago) we are going to run out of disk space in a few weeks!

Ivan

refer this link,

http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=146&messageid=377087

they have suggested to ,issue checkpoint and then truncate log......

USE XXX
GO
CHECKPOINT
GO
BACKUP LOG [XXX] TO [XXX_TLOG] WITH NOFORMAT, INIT, NAME = N'XXX-Transaction Log Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
DBCC SHRINKFILE(XXX_Log, 1)
GO

|||

Is the Database also part of replication ?

Is the Database Mirroring Active , STATE = SYNCRONIZED ?

|||just try the above method and get back if its not possible you need to remove mirroring

refer, http://technet.microsoft.com/en-us/library/ms189112.aspx then try to truncate the tran log and try to shrink using dbcc shrinkfile........i am not sure which of the above 2 will work out.........|||

Removing and Reestablishing mirroring for a large database might be some work , again it depends how quickly you want to fix it , however what i will suggest ; check if the scheduled TLOG backups are successfull ? if the database is acting as a publisher in replication topology ; also if you could post the mode of mirroring Sync or Async ?

Monday, March 19, 2012

Database Market SUSPECT

How to recovery ?
starting up database 'DATA'
opening file d:\dados\data\DATA_data.mdf.
opening file d:\dados\data\msdblog.ldf
opening file d:\dados\data\northwnd.ldf
opening file d:\dados\data\pubs_log.ldf
opening file d:\dados\data\DATA_log.ldf
bypassing recovery for database 'DATA' because it is market SUSPECT
I don't have backup.
TanksBelow is a good start:
http://www.karaszi.com/sqlserver/in..._suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"jcarlos0402" <anonymous@.discussions.microsoft.com> wrote in message
news:4D6E77FE-4189-44C0-9EC2-B6E2C2BA0552@.microsoft.com...
> How to recovery ?
> starting up database 'DATA'
> opening file d:\dados\data\DATA_data.mdf.
> opening file d:\dados\data\msdblog.ldf
> opening file d:\dados\data\northwnd.ldf
> opening file d:\dados\data\pubs_log.ldf
> opening file d:\dados\data\DATA_log.ldf
> bypassing recovery for database 'DATA' because it is market SUSPECT
> I don't have backup.
> Tanks

Database Market SUSPECT

How to recovery ?
starting up database 'DATA'
opening file d:\dados\data\DATA_data.mdf.
opening file d:\dados\data\msdblog.ldf
opening file d:\dados\data\northwnd.ldf
opening file d:\dados\data\pubs_log.ldf
opening file d:\dados\data\DATA_log.ldf
bypassing recovery for database 'DATA' because it is market SUSPECT
I don't have backup.
Tanks
Below is a good start:
http://www.karaszi.com/sqlserver/inf...suspect_db.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"jcarlos0402" <anonymous@.discussions.microsoft.com> wrote in message
news:4D6E77FE-4189-44C0-9EC2-B6E2C2BA0552@.microsoft.com...
> How to recovery ?
> starting up database 'DATA'
> opening file d:\dados\data\DATA_data.mdf.
> opening file d:\dados\data\msdblog.ldf
> opening file d:\dados\data\northwnd.ldf
> opening file d:\dados\data\pubs_log.ldf
> opening file d:\dados\data\DATA_log.ldf
> bypassing recovery for database 'DATA' because it is market SUSPECT
> I don't have backup.
> Tanks

Database Market SUSPECT

How to recovery
starting up database 'DATA
opening file d:\dados\data\DATA_data.mdf
opening file d:\dados\data\msdblog.ld
opening file d:\dados\data\northwnd.ld
opening file d:\dados\data\pubs_log.ld
opening file d:\dados\data\DATA_log.ld
bypassing recovery for database 'DATA' because it is market SUSPEC
I don't have backup
TanksBelow is a good start:
http://www.karaszi.com/sqlserver/info_corrupt_suspect_db.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"jcarlos0402" <anonymous@.discussions.microsoft.com> wrote in message
news:4D6E77FE-4189-44C0-9EC2-B6E2C2BA0552@.microsoft.com...
> How to recovery ?
> starting up database 'DATA'
> opening file d:\dados\data\DATA_data.mdf.
> opening file d:\dados\data\msdblog.ldf
> opening file d:\dados\data\northwnd.ldf
> opening file d:\dados\data\pubs_log.ldf
> opening file d:\dados\data\DATA_log.ldf
> bypassing recovery for database 'DATA' because it is market SUSPECT
> I don't have backup.
> Tanks

Sunday, March 11, 2012

Database maintenance plan: .trn file not backed up

We have installed an SQL 2000 database over a Windows 2000
server platform. We have used the database maintenance
plan wizard to back up three databases on a daily basis.
We have been able to back up the .BAK files, but not
the .TRN files. In addition, a failure message has been
generated to the SQthe "Jobs" module
See my reply to your post int he other group. Please don't multipost.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"apm2524" <anonymous@.discussions.microsoft.com> wrote in message
news:8fd901c432fb$ce8ca380$a101280a@.phx.gbl...
> We have installed an SQL 2000 database over a Windows 2000
> server platform. We have used the database maintenance
> plan wizard to back up three databases on a daily basis.
> We have been able to back up the .BAK files, but not
> the .TRN files. In addition, a failure message has been
> generated to the SQthe "Jobs" module
|||Do not use the daily plan but use the weekly and tick all seven days if need be. For some reason 'Daily' is not quite what it seems, as it is more of a 'one off' than a schedule.

Database maintenance plan: .trn file not backed up

We have installed an SQL 2000 database over a Windows 2000
server platform. We have used the database maintenance
plan wizard to back up three databases on a daily basis.
We have been able to back up the .BAK files, but not
the .TRN files. In addition, a failure message has been
generated to the SQthe "Jobs" moduleSee my reply to your post int he other group. Please don't multipost.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"apm2524" <anonymous@.discussions.microsoft.com> wrote in message
news:8fd901c432fb$ce8ca380$a101280a@.phx.gbl...
> We have installed an SQL 2000 database over a Windows 2000
> server platform. We have used the database maintenance
> plan wizard to back up three databases on a daily basis.
> We have been able to back up the .BAK files, but not
> the .TRN files. In addition, a failure message has been
> generated to the SQthe "Jobs" module|||Do not use the daily plan but use the weekly and tick all seven days if need
be. For some reason 'Daily' is not quite what it seems, as it is more of a
'one off' than a schedule.

Database maintenance plan: .trn file not backed up

We have installed an SQL 2000 database over a Windows 2000
server platform. We have used the database maintenance
plan wizard to back up three databases on a daily basis.
We have been able to back up the .BAK files, but not
the .TRN files. In addition, a failure message has been
generated to the SQthe "Jobs" moduleSee my reply to your post int he other group. Please don't multipost.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"apm2524" <anonymous@.discussions.microsoft.com> wrote in message
news:8fd901c432fb$ce8ca380$a101280a@.phx.gbl...
> We have installed an SQL 2000 database over a Windows 2000
> server platform. We have used the database maintenance
> plan wizard to back up three databases on a daily basis.
> We have been able to back up the .BAK files, but not
> the .TRN files. In addition, a failure message has been
> generated to the SQthe "Jobs" module

Friday, February 17, 2012

Database logical file name

Is it possible to change the logical name given to a database file?
The reason I want to do this is that we have several remote SQL Servers, and
some have the logical file names consistenly named the same, which is what
we want, but some do not. What's the best way to get all of the logical file
names the same, i.e. consistent on each and every remote SQL Server. N.B.
These database are in production but can be, and are taken offline for
updates (schema, SPs, reference data, etc.).
Thanks.
Michael MacGregor
Database ArchitectHi
On Jun 18, 3:44 pm, "Michael MacGregor" <nos...@.nospam.com> wrote:
> Is it possible to change the logical name given to a database file?
> The reason I want to do this is that we have several remote SQL Servers, a
nd
> some have the logical file names consistenly named the same, which is what
> we want, but some do not. What's the best way to get all of the logical fi
le
> names the same, i.e. consistent on each and every remote SQL Server. N.B.
> These database are in production but can be, and are taken offline for
> updates (schema, SPs, reference data, etc.).
> Thanks.
> Michael MacGregor
> Database Architect
You can with the ALTER DATABASE command e.g.
USE master
GO
CREATE DATABASE test1
GO
USE test1
GO
EXEC sp_helpfile
GO
ALTER DATABASE Test1
MODIFY FILE
(NAME = test1,
NEWNAME = 'DataFile')
GO
EXEC sp_helpfile
GO
John|||D'oh! Thanks for pointing that out to me. I think I need glasses. ;-)
MTM

Database logical file name

Is it possible to change the logical name given to a database file?
The reason I want to do this is that we have several remote SQL Servers, and
some have the logical file names consistenly named the same, which is what
we want, but some do not. What's the best way to get all of the logical file
names the same, i.e. consistent on each and every remote SQL Server. N.B.
These database are in production but can be, and are taken offline for
updates (schema, SPs, reference data, etc.).
Thanks.
Michael MacGregor
Database ArchitectHi
On Jun 18, 3:44 pm, "Michael MacGregor" <nos...@.nospam.com> wrote:
> Is it possible to change the logical name given to a database file?
> The reason I want to do this is that we have several remote SQL Servers, and
> some have the logical file names consistenly named the same, which is what
> we want, but some do not. What's the best way to get all of the logical file
> names the same, i.e. consistent on each and every remote SQL Server. N.B.
> These database are in production but can be, and are taken offline for
> updates (schema, SPs, reference data, etc.).
> Thanks.
> Michael MacGregor
> Database Architect
You can with the ALTER DATABASE command e.g.
USE master
GO
CREATE DATABASE test1
GO
USE test1
GO
EXEC sp_helpfile
GO
ALTER DATABASE Test1
MODIFY FILE
(NAME = test1,
NEWNAME = 'DataFile')
GO
EXEC sp_helpfile
GO
John|||D'oh! Thanks for pointing that out to me. I think I need glasses. ;-)
MTM

Database log size

hi

my database on remote server i cannot access directly.

i can access it only with query analyzer.

my log file size is 9mb but nothing in database. only few tables there so how i can reduce log file size with query.

thanks

Hi,

I used to do this using the sa privileges.

Google it for (Truncating SQL Log)

Let me know if you need further help.

Regards

|||

Change the recovery model to simple. Set autoshrink to true, back up the database and it should reduce in size.

|||

I don't want you to waste your time, here is the query,

BACKUP LOG databasename WITH TRUNCATE_ONLY
DBCC SHRINKFILE ('databaselog_log', 100) WITH NO_INFOMSGS

It will shrink the log to 100 MB

|||

thanks dear

my problem solved with following

BACKUP LOG databasename WITH TRUNCATE_ONLY
DBCC SHRINKFILE ('databaselog_log', 2) WITH NO_INFOMSGS


DBCC SHRINKFILE(mydatabase)

Database log full

What to do when the database log file is full?
TIRislaabackup transaction log
see: "Transaction Log Backups" in BOL
"Tor Inge Rislaa" wrote:

> What to do when the database log file is full?
> TIRislaa
>
>|||Hi
BACKUP/ and DBCC SHRINKFILE if you want to reduce a physical size of the
file
"Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
news:uYMARE5XFHA.3096@.TK2MSFTNGP15.phx.gbl...
> What to do when the database log file is full?
> TIRislaa
>|||I am a bit new to administrating an sql server. How to backup the
transaction log trough the Enterprice Manager?
TIRislaa
"Uri Dimant" <urid@.iscar.co.il> skrev i melding
news:uwr%23rK5XFHA.3864@.TK2MSFTNGP10.phx.gbl...
> Hi
> BACKUP/ and DBCC SHRINKFILE if you want to reduce a physical size of the
> file
> "Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
> news:uYMARE5XFHA.3096@.TK2MSFTNGP15.phx.gbl...
>|||Right-click the database, All Tasks, Backup database. Do a full database
backup first, then the T-Log
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
news:OaFq8O5XFHA.2520@.TK2MSFTNGP09.phx.gbl...
>I am a bit new to administrating an sql server. How to backup the
>transaction log trough the Enterprice Manager?
> TIRislaa
> "Uri Dimant" <urid@.iscar.co.il> skrev i melding
> news:uwr%23rK5XFHA.3864@.TK2MSFTNGP10.phx.gbl...
>|||hi,
transaction log is very important for your database
read about log in SQL server books online - "How to create a transaction
log backup (Enterprise Manager)"
"Tor Inge Rislaa" wrote:

> I am a bit new to administrating an sql server. How to backup the
> transaction log trough the Enterprice Manager?
> TIRislaa
> "Uri Dimant" <urid@.iscar.co.il> skrev i melding
> news:uwr%23rK5XFHA.3864@.TK2MSFTNGP10.phx.gbl...
>
>|||Back it up: BACKUP LOG
If you don't require log backups then set the Simple recovery model to
minimize transaction log usage.
David Portas
SQL Server MVP
--|||When trying to backup the transaction log I get an error telling me that the
backup log is terminating abnormaly (status = 112), any ideas?
TIRislaa
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> skrev i melding
news:enyGpT5XFHA.2796@.TK2MSFTNGP09.phx.gbl...
> Right-click the database, All Tasks, Backup database. Do a full database
> backup first, then the T-Log
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
> news:OaFq8O5XFHA.2520@.TK2MSFTNGP09.phx.gbl...
>|||Do you have sufficient space to on your destination drive to write a file
the same size as your transaction log?
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
news:uIziBn5XFHA.1660@.TK2MSFTNGP10.phx.gbl...
> When trying to backup the transaction log I get an error telling me that
> the backup log is terminating abnormaly (status = 112), any ideas?
> TIRislaa
>
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> skrev i melding
> news:enyGpT5XFHA.2796@.TK2MSFTNGP09.phx.gbl...
>|||NET HELPMSG 112 displays "There is not enough space on the disk". Ensure
your backup disk has enough space.
Hope this helps.
Dan Guzman
SQL Server MVP
"Tor Inge Rislaa" <tor.ingenospam@.rislaa.no> wrote in message
news:uIziBn5XFHA.1660@.TK2MSFTNGP10.phx.gbl...
> When trying to backup the transaction log I get an error telling me that
> the backup log is terminating abnormaly (status = 112), any ideas?
> TIRislaa
>
> "Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> skrev i melding
> news:enyGpT5XFHA.2796@.TK2MSFTNGP09.phx.gbl...
>

database log file size problem!

Somehow my database log has (ldf file) has grown to over 60GB! and the
database it is associated with is only 32MB, how can I compress this file?
it seems to be getting larger by the hour and now disk space is running
out.. thanks!Hi
Look in books online about "recovery models". You probably have the DB set
to Full Recovery and are not making transaction log backups.
Regards
Mike
"Brian Henry" wrote:

> Somehow my database log has (ldf file) has grown to over 60GB! and the
> database it is associated with is only 32MB, how can I compress this file?
> it seems to be getting larger by the hour and now disk space is running
> out.. thanks!
>
>|||How to stop the transaction log of a SQL Server database from growing
unexpectedly
http://support.microsoft.com/?kbid=873235
AMB
"Brian Henry" wrote:

> Somehow my database log has (ldf file) has grown to over 60GB! and the
> database it is associated with is only 32MB, how can I compress this file?
> it seems to be getting larger by the hour and now disk space is running
> out.. thanks!
>
>