Showing posts with label physical. Show all posts
Showing posts with label physical. Show all posts

Tuesday, March 27, 2012

Changing the server name and IP address

A server with SQL 2000 installed is moving to a new physical location. Our
company standards mean that the name of the server and the IP address of the
server will change also. This SQL instance name is the same as the server
name. Will I have to uninstall and reinstall SQL Server (and recover the
databases) when this move is made so that the instance name equals the
server name? Is there a stored procedure that changes the instance name to
the server name? Thank you.[posted and mailed, please reply in news]

steven virnig (pezguy@.mn.rr.com) writes:
> A server with SQL 2000 installed is moving to a new physical location.
> Our company standards mean that the name of the server and the IP
> address of the server will change also. This SQL instance name is the
> same as the server name. Will I have to uninstall and reinstall SQL
> Server (and recover the databases) when this move is made so that the
> instance name equals the server name? Is there a stored procedure that
> changes the instance name to the server name? Thank you.

If memory serves, it's as simple as:

exec sp_dropserver @.@.servername
exec sp_addserver 'NewName', 'local'

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Changing The Physical Server

Hi,
I have Production Database on one server which shares the space with
many other databases. Now I am planning to shift the database to
another (separate) physical server.
As long as data and logins are concerned I can transfer it to the
new database server. But I also have many of the critical scheduled
Jobs and DTS packages on the existing server. Is there any way through
which I can get these DTS packages and Jobs on the new server?
regards
Rohit
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Server-Chang...ict250272.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311
DTS packages -- Open the package, Menu Package --> Save as... 1. to a new
server, or 2. structured storage file, import the file in the new server
Jobs -- Right click on the job, Generate SQL Script...
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Rohit" wrote:

> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Chang...ict250272.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311
>
|||Hi
You may want to look at using:
http://www.sqldts.com/default.aspx?242
Also check out:
http://support.microsoft.com/default...;en-us;Q314546
John
"Rohit" wrote:

> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Chang...ict250272.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311
>
sql

Changing The Physical Server

Hi,
I have Production Database on one server which shares the space with
many other databases. Now I am planning to shift the database to
another (separate) physical server.
As long as data and logins are concerned I can transfer it to the
new database server. But I also have many of the critical scheduled
Jobs and DTS packages on the existing server. Is there any way through
which I can get these DTS packages and Jobs on the new server?
regards
Rohit
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Server-Chan...rm.php?p=866311DTS packages -- Open the package, Menu Package --> Save as... 1. to a new
server, or 2. structured storage file, import the file in the new server
Jobs -- Right click on the job, Generate SQL Script...
--
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Rohit" wrote:

> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Chan...rm.php?p=866311
>|||Hi
You may want to look at using:
http://www.sqldts.com/default.aspx?242
Also check out:
http://support.microsoft.com/defaul...b;en-us;Q314546
John
"Rohit" wrote:

> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Chan...rm.php?p=866311
>

Changing The Physical Server

Hi,
I have Production Database on one server which shares the space with
many other databases. Now I am planning to shift the database to
another (separate) physical server.
As long as data and logins are concerned I can transfer it to the
new database server. But I also have many of the critical scheduled
Jobs and DTS packages on the existing server. Is there any way through
which I can get these DTS packages and Jobs on the new server?
regards
Rohit
--
Posted using the http://www.dbforumz.com interface, at author's request
Articles individually checked for conformance to usenet standards
Topic URL: http://www.dbforumz.com/Server-Changing-Physical-ftopict250272.html
Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311DTS packages -- Open the package, Menu Package --> Save as... 1. to a new
server, or 2. structured storage file, import the file in the new server
Jobs -- Right click on the job, Generate SQL Script...
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Rohit" wrote:
> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Changing-Physical-ftopict250272.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311
>|||Hi
You may want to look at using:
http://www.sqldts.com/default.aspx?242
Also check out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
John
"Rohit" wrote:
> Hi,
> I have Production Database on one server which shares the space with
> many other databases. Now I am planning to shift the database to
> another (separate) physical server.
> As long as data and logins are concerned I can transfer it to the
> new database server. But I also have many of the critical scheduled
> Jobs and DTS packages on the existing server. Is there any way through
> which I can get these DTS packages and Jobs on the new server?
> regards
> Rohit
> --
> Posted using the http://www.dbforumz.com interface, at author's request
> Articles individually checked for conformance to usenet standards
> Topic URL: http://www.dbforumz.com/Server-Changing-Physical-ftopict250272.html
> Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=866311
>

Changing the Logical/Physical name of a DB, or log

The system I'm working with has many databases, almost all of which have a
logical name of "DBname_Data" and "DBname_Log" which have physical names if
"DBname_Data.MDF" and "DBname_Log.LDF".
All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
What do I have to do to change this, so it is consistant with all the others?
Thanks,
Jay
Just thought to add that I know how to do it with a backup and a restore with
move. Hoping for simpler.
"JayKon" wrote:

> The system I'm working with has many databases, almost all of which have a
> logical name of "DBname_Data" and "DBname_Log" which have physical names if
> "DBname_Data.MDF" and "DBname_Log.LDF".
> All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
> What do I have to do to change this, so it is consistant with all the others?
> Thanks,
> Jay
|||try alter database with the modify file portion:
e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
new_path/os_file_name ' )
BOL does a good job of explaining this so just look under 'alter database'
Robert Towne
"JayKon" wrote:
[vbcol=seagreen]
> Just thought to add that I know how to do it with a backup and a restore with
> move. Hoping for simpler.
> "JayKon" wrote:
|||Yes, it does.
Thank you.
"sql411@.nospam.com" wrote:
[vbcol=seagreen]
> try alter database with the modify file portion:
> e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
> new_path/os_file_name ' )
> BOL does a good job of explaining this so just look under 'alter database'
> Robert Towne
>
>
> "JayKon" wrote:

Sunday, March 25, 2012

Changing the Logical/Physical name of a DB, or log

The system I'm working with has many databases, almost all of which have a
logical name of "DBname_Data" and "DBname_Log" which have physical names if
"DBname_Data.MDF" and "DBname_Log.LDF".
All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
What do I have to do to change this, so it is consistant with all the others
?
Thanks,
JayJust thought to add that I know how to do it with a backup and a restore wit
h
move. Hoping for simpler.
"JayKon" wrote:

> The system I'm working with has many databases, almost all of which have a
> logical name of "DBname_Data" and "DBname_Log" which have physical names i
f
> "DBname_Data.MDF" and "DBname_Log.LDF".
> All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
> What do I have to do to change this, so it is consistant with all the othe
rs?
> Thanks,
> Jay|||try alter database with the modify file portion:
e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
new_path/os_file_name ' )
BOL does a good job of explaining this so just look under 'alter database'
Robert Towne
"JayKon" wrote:
[vbcol=seagreen]
> Just thought to add that I know how to do it with a backup and a restore w
ith
> move. Hoping for simpler.
> "JayKon" wrote:
>|||Yes, it does.
Thank you.
"sql411@.nospam.com" wrote:
[vbcol=seagreen]
> try alter database with the modify file portion:
> e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
> new_path/os_file_name ' )
> BOL does a good job of explaining this so just look under 'alter database'
> Robert Towne
>
>
> "JayKon" wrote:
>sql

Changing the Logical/Physical name of a DB, or log

The system I'm working with has many databases, almost all of which have a
logical name of "DBname_Data" and "DBname_Log" which have physical names if
"DBname_Data.MDF" and "DBname_Log.LDF".
All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
What do I have to do to change this, so it is consistant with all the others?
Thanks,
JayJust thought to add that I know how to do it with a backup and a restore with
move. Hoping for simpler.
"JayKon" wrote:
> The system I'm working with has many databases, almost all of which have a
> logical name of "DBname_Data" and "DBname_Log" which have physical names if
> "DBname_Data.MDF" and "DBname_Log.LDF".
> All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
> What do I have to do to change this, so it is consistant with all the others?
> Thanks,
> Jay|||try alter database with the modify file portion:
e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
new_path/os_file_name ' )
BOL does a good job of explaining this so just look under 'alter database'
Robert Towne
"JayKon" wrote:
> Just thought to add that I know how to do it with a backup and a restore with
> move. Hoping for simpler.
> "JayKon" wrote:
> > The system I'm working with has many databases, almost all of which have a
> > logical name of "DBname_Data" and "DBname_Log" which have physical names if
> > "DBname_Data.MDF" and "DBname_Log.LDF".
> >
> > All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
> >
> > What do I have to do to change this, so it is consistant with all the others?
> >
> > Thanks,
> > Jay|||Yes, it does.
Thank you.
"sql411@.nospam.com" wrote:
> try alter database with the modify file portion:
> e.g, --> MODIFY FILE ( NAME = logical_file_name, FILENAME = '
> new_path/os_file_name ' )
> BOL does a good job of explaining this so just look under 'alter database'
> Robert Towne
>
>
> "JayKon" wrote:
> > Just thought to add that I know how to do it with a backup and a restore with
> > move. Hoping for simpler.
> >
> > "JayKon" wrote:
> >
> > > The system I'm working with has many databases, almost all of which have a
> > > logical name of "DBname_Data" and "DBname_Log" which have physical names if
> > > "DBname_Data.MDF" and "DBname_Log.LDF".
> > >
> > > All except one that is. It is named "DBname_dat" & "DBname_dat.MDF".
> > >
> > > What do I have to do to change this, so it is consistant with all the others?
> > >
> > > Thanks,
> > > Jay

Wednesday, March 7, 2012

Changing physical SQL Server

Hello all,

We are in the process of upgrading our SQL physical server (with SS2k). In
the process we will change the OS form NT4 to W2K. What is the best way to
copy all my databases and SQL logins, roles, jobs, alerts, etc. from my
actual (old) SQL Server to my new one?

Thanks for your time.

YannickTransfer logins: see msft support article KB 246133

Transfer databases: backup and restore the Dbs on the new server. This
should copy the permissions and roles. (I recommend ftp'ing the backup
files from one server to another. I learned this the hard way.)

Transfer jobs & alerts: I don't know an easy way. I used EM to
generate sql scripts for each one and then ran them on the new server.|||Thanks for that Louis.

Yannick

"louis" <louisducnguyen@.gmail.com> wrote in message
news:1105044803.604211.75490@.z14g2000cwz.googlegro ups.com...
> Transfer logins: see msft support article KB 246133
> Transfer databases: backup and restore the Dbs on the new server. This
> should copy the permissions and roles. (I recommend ftp'ing the backup
> files from one server to another. I learned this the hard way.)
> Transfer jobs & alerts: I don't know an easy way. I used EM to
> generate sql scripts for each one and then ran them on the new server.

Friday, February 24, 2012

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
Aron
Create a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL)
http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:

> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is that
> on one of my servers i created the copy of est databse called test_new. On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>
|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
http://msdn.microsoft.com/library/de...ackpc_6ng9.asp[vbcol=seagreen]
>
> Regards.
> "Aron E. Tekulsky" wrote:
same[vbcol=seagreen]
that[vbcol=seagreen]
On[vbcol=seagreen]
but[vbcol=seagreen]
in[vbcol=seagreen]
access to[vbcol=seagreen]
i[vbcol=seagreen]
|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:

> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>
>
|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> http://msdn.microsoft.com/library/de...ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
AronCreate a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:
> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is that
> on one of my servers i created the copy of est databse called test_new. On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
--
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
>
> Regards.
> "Aron E. Tekulsky" wrote:
> > I have a database called test. it has 2 logical files : test_data,
> > test_log. they are in the following physical files: test_data.mdf,
> > test_log.ldf.
> > I make a backup of the database test.
> >
> > I wish to make a copy of the test database with a different name on teh
same
> > machine. I want to end up with a databse called test_new which has
> > test_new_data and test_new_log as logical files. It ahsould then have
> > test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> > this using a dump fro the test database.
> >
> > Does anyone know how to do this ? The reason for doing it this way is
that
> > on one of my servers i created the copy of est databse called test_new.
On
> > that test_new databse i had logical files of test_data and test_log.
but
> > the physical files were called test_new_data.mdf and test_new_log.ldf.
> > since teh logical file names were the same there seems to be a problem
in
> > which in order for me to access the test_new database, i must give
access to
> > the test database as well as the test_new database to an id. otherwise
i
> > get an access violation.
> >
> > Any insight into this problem or my proprsed solution would be greatly
> > appreciated.
> > Aron
> >
> >
> >|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> > Create a new database test_new, then
> > when you will restore data from backup over this database
> > either use MOVE optin in RESTORE DATABASE command in QA
> > or choose Device names and paths on Options tab in EM
> >
> > How to restore a database with a new name (Transact-SQL)
> >
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
> >
> >
> > Regards.
> >
> > "Aron E. Tekulsky" wrote:
> >
> > > I have a database called test. it has 2 logical files : test_data,
> > > test_log. they are in the following physical files: test_data.mdf,
> > > test_log.ldf.
> > > I make a backup of the database test.
> > >
> > > I wish to make a copy of the test database with a different name on teh
> same
> > > machine. I want to end up with a databse called test_new which has
> > > test_new_data and test_new_log as logical files. It ahsould then have
> > > test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> > > this using a dump fro the test database.
> > >
> > > Does anyone know how to do this ? The reason for doing it this way is
> that
> > > on one of my servers i created the copy of est databse called test_new.
> On
> > > that test_new databse i had logical files of test_data and test_log.
> but
> > > the physical files were called test_new_data.mdf and test_new_log.ldf.
> > > since teh logical file names were the same there seems to be a problem
> in
> > > which in order for me to access the test_new database, i must give
> access to
> > > the test database as well as the test_new database to an id. otherwise
> i
> > > get an access violation.
> > >
> > > Any insight into this problem or my proprsed solution would be greatly
> > > appreciated.
> > > Aron
> > >
> > >
> > >
>
>|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME ='NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
>> Create a new database test_new, then
>> when you will restore data from backup over this database
>> either use MOVE optin in RESTORE DATABASE command in QA
>> or choose Device names and paths on Options tab in EM
>> How to restore a database with a new name (Transact-SQL)
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp
>>
>> Regards.
>> "Aron E. Tekulsky" wrote:
>> > I have a database called test. it has 2 logical files : test_data,
>> > test_log. they are in the following physical files: test_data.mdf,
>> > test_log.ldf.
>> > I make a backup of the database test.
>> >
>> > I wish to make a copy of the test database with a different name on teh
> same
>> > machine. I want to end up with a databse called test_new which has
>> > test_new_data and test_new_log as logical files. It ahsould then have
>> > test_new_data.mdf and test_new_log.ldf for physical files. I want to
>> > do
>> > this using a dump fro the test database.
>> >
>> > Does anyone know how to do this ? The reason for doing it this way is
> that
>> > on one of my servers i created the copy of est databse called
>> > test_new.
> On
>> > that test_new databse i had logical files of test_data and test_log.
> but
>> > the physical files were called test_new_data.mdf and test_new_log.ldf.
>> > since teh logical file names were the same there seems to be a problem
> in
>> > which in order for me to access the test_new database, i must give
> access to
>> > the test database as well as the test_new database to an id. otherwise
> i
>> > get an access violation.
>> >
>> > Any insight into this problem or my proprsed solution would be greatly
>> > appreciated.
>> > Aron
>> >
>> >
>> >
>

changing logical filename

I have a database called test. it has 2 logical files : test_data,
test_log. they are in the following physical files: test_data.mdf,
test_log.ldf.
I make a backup of the database test.
I wish to make a copy of the test database with a different name on teh same
machine. I want to end up with a databse called test_new which has
test_new_data and test_new_log as logical files. It ahsould then have
test_new_data.mdf and test_new_log.ldf for physical files. I want to do
this using a dump fro the test database.
Does anyone know how to do this ? The reason for doing it this way is that
on one of my servers i created the copy of est databse called test_new. On
that test_new databse i had logical files of test_data and test_log. but
the physical files were called test_new_data.mdf and test_new_log.ldf.
since teh logical file names were the same there seems to be a problem in
which in order for me to access the test_new database, i must give access to
the test database as well as the test_new database to an id. otherwise i
get an access violation.
Any insight into this problem or my proprsed solution would be greatly
appreciated.
AronCreate a new database test_new, then
when you will restore data from backup over this database
either use MOVE optin in RESTORE DATABASE command in QA
or choose Device names and paths on Options tab in EM
How to restore a database with a new name (Transact-SQL)
kpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...>
kpc_6ng9.asp
Regards.
"Aron E. Tekulsky" wrote:

> I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh sa
me
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is tha
t
> on one of my servers i created the copy of est databse called test_new. O
n
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>
>|||One way to deal with it is to restore the db into a different directory than
the original. The other is to use the WITH MOVE option of RESTORE to get a
new physical name. You can rename the Logical names with ALTER DATABASE
after you restore it.
Andrew J. Kelly SQL MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:uaQkgQiYFHA.2768@.tk2msftngp13.phx.gbl...
>I have a database called test. it has 2 logical files : test_data,
> test_log. they are in the following physical files: test_data.mdf,
> test_log.ldf.
> I make a backup of the database test.
> I wish to make a copy of the test database with a different name on teh
> same
> machine. I want to end up with a databse called test_new which has
> test_new_data and test_new_log as logical files. It ahsould then have
> test_new_data.mdf and test_new_log.ldf for physical files. I want to do
> this using a dump fro the test database.
> Does anyone know how to do this ? The reason for doing it this way is
> that
> on one of my servers i created the copy of est databse called test_new.
> On
> that test_new databse i had logical files of test_data and test_log. but
> the physical files were called test_new_data.mdf and test_new_log.ldf.
> since teh logical file names were the same there seems to be a problem in
> which in order for me to access the test_new database, i must give access
> to
> the test database as well as the test_new database to an id. otherwise i
> get an access violation.
> Any insight into this problem or my proprsed solution would be greatly
> appreciated.
> Aron
>|||Thanks for the information. But that does not give the desired result. I
will still have logical file names that are the same as teh original
database. I am looking for a way to have diffrent logical file names as
well.
"SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> Create a new database test_new, then
> when you will restore data from backup over this database
> either use MOVE optin in RESTORE DATABASE command in QA
> or choose Device names and paths on Options tab in EM
> How to restore a database with a new name (Transact-SQL)
>
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/howtosql/ht_7_backpc_6ng9.asp[/ur
l][vbcol=seagreen]
>
> Regards.
> "Aron E. Tekulsky" wrote:
>
same[vbcol=seagreen]
that[vbcol=seagreen]
On[vbcol=seagreen]
but[vbcol=seagreen]
in[vbcol=seagreen]
access to[vbcol=seagreen]
i[vbcol=seagreen]|||As Andrew mentioned already you can rename logical name with ALTER DATABASE
after it will restored.
Regards.
"Aron E. Tekulsky" wrote:

> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> ackpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...
ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>
>|||Hi,
For changing the Logical file name see the below command:-
ALTER DATABASE <DBNAME> modify file (NAME = 'old_MDF_NAME', NEWNAME =
'NEW_MDF_NAME')
do the same for LDF file as well.
Note:
We can not change the logical file name in SQL 7. The command will only work
in SQL 2000.
Thanks
Hari
SQL Server MVP
"Aron E. Tekulsky" <atekulsky@.iie.org> wrote in message
news:%23BXP2giYFHA.796@.TK2MSFTNGP10.phx.gbl...
> Thanks for the information. But that does not give the desired result. I
> will still have logical file names that are the same as teh original
> database. I am looking for a way to have diffrent logical file names as
> well.
> "SkyWalker" <SkyWalker@.discussions.microsoft.com> wrote in message
> news:B87ECFED-4075-4B81-87E8-84879F5C883A@.microsoft.com...
> ackpc_6ng9.asp" target="_blank">http://msdn.microsoft.com/library/d...
ackpc_6ng9.asp
> same
> that
> On
> but
> in
> access to
> i
>