Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Friday, March 30, 2012

Moving an entire server(sql 2005) to a new physical machine

I'm trying to finalize the details of moving an entire sql server to a new box.

Is there a simpler way to do this? Can I restore all the system and user databases to the new server?

This is what I've done in sql 2000.

Backup all the system and user databases from the old Server (ServerB)

Install the new default server on a new box (ServerA)

script all the server level security logins from the old Server (ServerB) and create them on the new Server (ServerA)

Restore the system databases to the new Server (Server A) msdb

,tempdb,model. Restore all the user databases to the new server (Server A)

Yes...you can restore all databases to the new server.

The following articles provide more information on moving databases to another server:

How to move databases between computers that are running SQL Server

http://support.microsoft.com/kb/314546

How to move SQL Server databases to a new location by using Detach and Attach functions in SQL Server

http://support.microsoft.com/kb/224071

-Sue

Wednesday, March 28, 2012

Moving a SQL7 DB to SQL2000

I have a backup of a SQL7 DB that i need to restore into SQL 2000. I only have the backup of the DB , i don't have access to the SQL7 server. When ever I try to restore the DB into SQL2000 nothing works, the tables and properties all restore properly and the data is there but i can't retrieve info from it. I'm trying to move a website DB from SQL7 to SQL 2000 for use with Cold Fusion. I know they're is issues with going from 7 to 2000 but i don't know what they are. If anyone could help me with this i would greatly appreciate it. I know I need to do some special steps or changes before it will work in 2000, does anyone know what these are?

Thanks in advance,
B"...I can't retrieve info from it..."

can you provide a few more details? What are you using to retrieve info (QA, development IDE, EM)? What error messages are you getting?

Recall that if you restore a database onto a new server, the logins and permissions don't convey (kind of like the furniture in my house when I go to sell it).

Permissions may be a part of your issue.

Regards,

hmscott|||I've got it working, I had to do a DTS Import and I checked Use Collation. This seemed to fix the problem, thanks to those who helped!!!

Monday, March 26, 2012

moving a database to a different drive

Hi,
You could do a backup and restore using the 'WITH MOVE'
OPTION or you could (better use) detach the database, copy
the datafile to new location and attach the database files.
You can look at sp_detach_db and sp_attach_db procedures
in BOL.
hth
DeeJay
>--Original Message--
>what is the reccomended method for moving a database to a
different drive on
>the same computer? Just a backup and restore?
>
>.
>
ok. I'll check out those procedures in Books Online. Thanks for the input.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on
|||Hi,
I will use the detatch/attatch method to move but your reply brings another
question to me. I did not see an option to restore 'WITH MOVE' in enterprise
manager GUI restore... is it only available when using TSQL? The reason I
ask is I had previously done a backup and restore to new database name and
new location in order to quickly create a 'staging' or 'testing' version of
a production database and want to be sure that was ok... meaning I wanted to
verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
was a default option. Because, in that case, I wanted the database to be
different... not a move of the real database..
If I actually got a clear question out of that (doubtful ;) ) any info would
be appreciated... I think I'm just being overly paranoid.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on
|||The move option is exposed on the right-most tab, where EM specifies the physical file names. In the right
part, just type the desired file name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"djc" <noone@.nowhere.com> wrote in message news:%23Cj8oj5UEHA.2668@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I will use the detatch/attatch method to move but your reply brings another
> question to me. I did not see an option to restore 'WITH MOVE' in enterprise
> manager GUI restore... is it only available when using TSQL? The reason I
> ask is I had previously done a backup and restore to new database name and
> new location in order to quickly create a 'staging' or 'testing' version of
> a production database and want to be sure that was ok... meaning I wanted to
> verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
> was a default option. Because, in that case, I wanted the database to be
> different... not a move of the real database..
> If I actually got a clear question out of that (doubtful ;) ) any info would
> be appreciated... I think I'm just being overly paranoid.
>
> "DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> news:1cc9b01c45309$967fde70$a101280a@.phx.gbl...
>

moving a database to a different drive

Hi,
You could do a backup and restore using the 'WITH MOVE'
OPTION or you could (better use) detach the database, copy
the datafile to new location and attach the database files.
You can look at sp_detach_db and sp_attach_db procedures
in BOL.
hth
DeeJay
>--Original Message--
>what is the reccomended method for moving a database to a
different drive on
>the same computer? Just a backup and restore?
>
>.
>ok. I'll check out those procedures in Books Online. Thanks for the input.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on|||Hi,
I will use the detatch/attatch method to move but your reply brings another
question to me. I did not see an option to restore 'WITH MOVE' in enterprise
manager GUI restore... is it only available when using TSQL? The reason I
ask is I had previously done a backup and restore to new database name and
new location in order to quickly create a 'staging' or 'testing' version of
a production database and want to be sure that was ok... meaning I wanted to
verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
was a default option. Because, in that case, I wanted the database to be
different... not a move of the real database..
If I actually got a clear question out of that (doubtful ;) ) any info would
be appreciated... I think I'm just being overly paranoid.
"DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...[vbcol=seagreen]
> Hi,
> You could do a backup and restore using the 'WITH MOVE'
> OPTION or you could (better use) detach the database, copy
> the datafile to new location and attach the database files.
> You can look at sp_detach_db and sp_attach_db procedures
> in BOL.
> hth
> DeeJay
> different drive on|||The move option is exposed on the right-most tab, where EM specifies the phy
sical file names. In the right
part, just type the desired file name.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"djc" <noone@.nowhere.com> wrote in message news:%23Cj8oj5UEHA.2668@.TK2MSFTNGP10.phx.gbl...[v
bcol=seagreen]
> Hi,
> I will use the detatch/attatch method to move but your reply brings anothe
r
> question to me. I did not see an option to restore 'WITH MOVE' in enterpri
se
> manager GUI restore... is it only available when using TSQL? The reason I
> ask is I had previously done a backup and restore to new database name and
> new location in order to quickly create a 'staging' or 'testing' version
of
> a production database and want to be sure that was ok... meaning I wanted
to
> verify that I had NOT chosen the 'WITH MOVE' option... I didn't know if it
> was a default option. Because, in that case, I wanted the database to be
> different... not a move of the real database..
> If I actually got a clear question out of that (doubtful ;) ) any info wou
ld
> be appreciated... I think I'm just being overly paranoid.
>
> "DeeJay Puar" <deejaypuar@.yahoo.com> wrote in message
> news:1cc9b01c45309$967fde70$a101280a@.phx
.gbl...
>[/vbcol]sql

moving a database from SQL 2k to SQl 7

Is it possible to restore a database on SQL server ver 7.0 backed-up on SQL
server ver 2k sp3
No. You'll have to find some other way to move the data; DTS is probably
easiest.
"Linda" <pharmacare@.pharmacare-ltd.com> wrote in message
news:expyIQzmEHA.3564@.tk2msftngp13.phx.gbl...
> Is it possible to restore a database on SQL server ver 7.0 backed-up on
SQL
> server ver 2k sp3
>
|||Backups done in SQL Server 7 can be restored to SQL Server 2000. Backups
done in SQL Server 2000 cannot be restored to SQL Server 7.
Anith

moving a database from SQL 2k to SQl 7

Is it possible to restore a database on SQL server ver 7.0 backed-up on SQL
server ver 2k sp3No. You'll have to find some other way to move the data; DTS is probably
easiest.
"Linda" <pharmacare@.pharmacare-ltd.com> wrote in message
news:expyIQzmEHA.3564@.tk2msftngp13.phx.gbl...
> Is it possible to restore a database on SQL server ver 7.0 backed-up on
SQL
> server ver 2k sp3
>|||Backups done in SQL Server 7 can be restored to SQL Server 2000. Backups
done in SQL Server 2000 cannot be restored to SQL Server 7.
--
Anith

moving a database from 2005 to 2000

Hi I have heard that you can not restore a 2000 SQL database from a 2005 file
but wondering if you can run scripts in sql 2000 created in 2005 to recreate
the database?
thanks
--
Paul G
Software engineer.Yes. When you generate the script set the "Script for Server Version"
option to SQL Server 2000.
Roy Harvey
Beacon Falls, CT
On Fri, 25 Apr 2008 15:13:00 -0700, Paul
<Paul@.discussions.microsoft.com> wrote:
>Hi I have heard that you can not restore a 2000 SQL database from a 2005 file
>but wondering if you can run scripts in sql 2000 created in 2005 to recreate
>the database?
>thanks|||ok found the script type selection option! thanks.
--
Paul G
Software engineer.
"Roy Harvey (SQL Server MVP)" wrote:
> Yes. When you generate the script set the "Script for Server Version"
> option to SQL Server 2000.
> Roy Harvey
> Beacon Falls, CT
> On Fri, 25 Apr 2008 15:13:00 -0700, Paul
> <Paul@.discussions.microsoft.com> wrote:
> >Hi I have heard that you can not restore a 2000 SQL database from a 2005 file
> >but wondering if you can run scripts in sql 2000 created in 2005 to recreate
> >the database?
> >thanks
>sql

Friday, March 23, 2012

Moving 6.5 database

HI

I have to move a production 6.5 database to another server (also 6.5) in wich other dbs already exist.
1. Can I just backup and restore on the other server ?
2. Do I have to check for the same service packs on both?
3. Are there other ways to do it?

Any help will be apreciated, since I can't find much info about this version.

Thank youIt's been awhile since I've used 6.5, however I know in the pass I've moved a dump over from one machine to another, a few notes:[list=a]
Make sure both machines where setup with the same CodePage
You'll have to resync any UserIDs in the database sysusers, to those in Master..syslogins, I believe Microsoft have a stored proc that does this
Recompile all of your procs, we use to have a problem with this. Use a simple cursor to loop through user tables issuing a 'SP_RECOMPILE' on each table
[/list=a]

Monday, March 19, 2012

Move SQL Server EE databases to SQL Server Std.

I would like to know if we have sql server 2000 EE on build 818, can we
simply restore the master database and other databases to a sql server 2000
standard build 818 without issue?I doubt you can do this with the master database but the others should be
fine.
Mike Kruchten
"ECS" <xxxx@.xx.com> wrote in message
news:OjaxVZdEEHA.2660@.TK2MSFTNGP12.phx.gbl...
> I would like to know if we have sql server 2000 EE on build 818, can we
> simply restore the master database and other databases to a sql server
2000
> standard build 818 without issue?
>|||Anyone else like to comment. If this can not be done what would be the best
and easiest way to move
like 50 databases off of EE onto a standard version of MS SQL?|||Like I said you should be fine for everything except the master, and you
could try that one and see. I'm assuming you have a different machine with
Std. installed that you can test on. The only thing you really need from
master is the login info, which is easy enough to recreate.
I know the other databases work as I use this process on a weekly basis for
a test environment. I'm guessing that if you try it with master the restore
process will complain but I'm only guessing, try it and see. I know it will
complain if you try to restore a backup of master with a different service
pack level.
Mike Kruchten
"ECS" <ecs@.netset.com> wrote in message
news:uNziNjmEEHA.2768@.tk2msftngp13.phx.gbl...
> Anyone else like to comment. If this can not be done what would be the
best
> and easiest way to move
> like 50 databases off of EE onto a standard version of MS SQL?
>|||Thanks mike,
any websites to point us to for scripting the sql server logins?|||I don't have any links for you, but I'm sure there are several places that
have this info. I think you can use DTS also, though I haven't done that
myself
Here's what I use. Run these on the old system, and results of each
statement is a script you run on the new system. They can be easily modified
to include a GO between each statement, otherwise you have to run each line
individually.
--For SQL logins
SELECT 'sp_addlogin '''+
left(name + ''', ',15), --Adjust for max login length
password,
+ ', ''' +
db_name(dbid) +
+ ''', ''' +
+ language
+ ''', ',
sid,
', skip_encryption'
FROM master.dbo.sysxlogins
where srvid is null
and xstatus&4 <> 4 --isntname
order by name
--For Windows logins
SELECT 'sp_grantlogin '''+ name + ''''
FROM master.dbo.sysxlogins
where srvid is null
and xstatus&4 = 4 --isntname
and name <> 'BUILTIN\ADMINISTRATORS'
order by name
"ECS" <xxxx@.xx.com> wrote in message
news:uvyjrhqEEHA.3392@.TK2MSFTNGP11.phx.gbl...
> Thanks mike,
> any websites to point us to for scripting the sql server logins?
>

Wednesday, March 7, 2012

Move DTS packages

Is there anyway to move the DTS packages to a new server. Can I backup and
restore the master database?
Any ideas?
ThanksGreg,
DTS packages are stored in MSDB not in master. The easist way to move a
small number of packages is to design the package, and click on the package
drop down menu, and click save as, and select the name of the new server.
--
Denny Cherry
DBA
GameSpy Industries
"Greg Richards" <grichards@.matrixwebs.com> wrote in message
news:eM2Yy$iVDHA.1948@.TK2MSFTNGP11.phx.gbl...
> Is there anyway to move the DTS packages to a new server. Can I backup
and
> restore the master database?
> Any ideas?
> Thanks
>|||Greg,
Follow this link for good tips on moving DTS packages.
http://www.sqldts.com/default.aspx?6,105,204,0,1
Hope this helps
John

Move DB by backup/restore or SP_Detach?

Question: Which method should I use to do the simultaneous change from SQL
2000 to 2005, and the change from an old PC (server) to a new one?
Current: SQL 2000 + Old Hardware
New (Future): SQL 2005 + New Hardware
What's the best way to get a single live database from the current to the
new? I expect to add users manually and point the client applications to
the new server. I've done the Upgrade Advisor and resolved a couple minor
things. For testing, I've taken a BAK file from the old server (sql 2000)
and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
2005 in the process, and a few test queries execute properly. So I'm
inclined to just do a backup and restore at that magic moment when we do the
upgrade. And then I'd add logins and jobs manually. Is there some
reason why SP_Detach & Attach is better? At least with a backup/restore
method, I can easily switch back to the old database if something doesn't
work. Plus, I can test this method many times before the big day, but I
can't easily test a detach of this database in advance. Thoughts?
Hi HK
You can use both forms obviously, the detach and attach would be quicker and
you can just take a copy of your data and log files where a backup and
restore will take a bit longer, which ever method you choose i would suggest
you rebuild all your indexes, stored procs, functions and views and then last
run update stats.
Regards
Charl
http://www.sqlserver.co.za
"HK" wrote:

> Question: Which method should I use to do the simultaneous change from SQL
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple minor
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do the
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>
|||How to move databases between computers that are running SQL Server
http://support.microsoft.com/default...b;en-us;314546
AMB
"HK" wrote:

> Question: Which method should I use to do the simultaneous change from SQL
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple minor
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do the
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>
|||Why would I have to do anything with stored procs?
Re-indexing doesn't seem required, but I can easily do that, and it is a
good idea anyway while I have the servers down. I don't have any functions
or views.
Can you elaborate on "update stats"?
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:FE5CFB19-0B91-48E4-A9C5-97BC0D419D03@.microsoft.com...
> Hi HK
> You can use both forms obviously, the detach and attach would be quicker
and
> you can just take a copy of your data and log files where a backup and
> restore will take a bit longer, which ever method you choose i would
suggest
> you rebuild all your indexes, stored procs, functions and views and then
last[vbcol=seagreen]
> run update stats.
> Regards
> Charl
> --
> http://www.sqlserver.co.za
>
> "HK" wrote:
SQL[vbcol=seagreen]
the[vbcol=seagreen]
to[vbcol=seagreen]
minor[vbcol=seagreen]
2000)[vbcol=seagreen]
FILELISTONLY[vbcol=seagreen]
the[vbcol=seagreen]
backup/restore[vbcol=seagreen]
doesn't[vbcol=seagreen]
|||Hi HK
The reasoning behind this is based on personal experience when we moved a
SQL 2000 DB to SQL 2005, we ran into some performance issues when migrating,
we rebuilt all the objects and ran sp_updatestats to update the table
statistics again and it resolved our problems. MS have made changes to the
query optimizer and to ensure that your procs use the best possible execution
plan i would suggest it. SQL should be intelligent enough to do it but we did
it as a precausionary and it helped our implementation.
Regards
charl
http://www.sqlserver.co.za
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> How to move databases between computers that are running SQL Server
> http://support.microsoft.com/default...b;en-us;314546
>
> AMB
> "HK" wrote:
|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:427477
You wrote that you rebuild all the objects. Which types of objects were
rebuilt besides indexes? Thanks.
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:7736D8DD-EEFC-4470-8EF8-D2F08BE8D96A@.microsoft.com...
> Hi HK
> The reasoning behind this is based on personal experience when we moved a
> SQL 2000 DB to SQL 2005, we ran into some performance issues when
migrating,
> we rebuilt all the objects and ran sp_updatestats to update the table
> statistics again and it resolved our problems. MS have made changes to the
> query optimizer and to ensure that your procs use the best possible
execution
> plan i would suggest it. SQL should be intelligent enough to do it but we
did[vbcol=seagreen]
> it as a precausionary and it helped our implementation.
> Regards
> charl
>
> --
> http://www.sqlserver.co.za
>
> "Alejandro Mesa" wrote:
from SQL[vbcol=seagreen]
the[vbcol=seagreen]
applications to[vbcol=seagreen]
minor[vbcol=seagreen]
2000)[vbcol=seagreen]
FILELISTONLY[vbcol=seagreen]
to[vbcol=seagreen]
I'm[vbcol=seagreen]
do the[vbcol=seagreen]
backup/restore[vbcol=seagreen]
doesn't[vbcol=seagreen]
I[vbcol=seagreen]

Move DB by backup/restore or SP_Detach?

Question: Which method should I use to do the simultaneous change from SQL
2000 to 2005, and the change from an old PC (server) to a new one?
Current: SQL 2000 + Old Hardware
New (Future): SQL 2005 + New Hardware
What's the best way to get a single live database from the current to the
new? I expect to add users manually and point the client applications to
the new server. I've done the Upgrade Advisor and resolved a couple minor
things. For testing, I've taken a BAK file from the old server (sql 2000)
and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
2005 in the process, and a few test queries execute properly. So I'm
inclined to just do a backup and restore at that magic moment when we do the
upgrade. And then I'd add logins and jobs manually. Is there some
reason why SP_Detach & Attach is better? At least with a backup/restore
method, I can easily switch back to the old database if something doesn't
work. Plus, I can test this method many times before the big day, but I
can't easily test a detach of this database in advance. Thoughts?Hi HK
You can use both forms obviously, the detach and attach would be quicker and
you can just take a copy of your data and log files where a backup and
restore will take a bit longer, which ever method you choose i would sugges
t
you rebuild all your indexes, stored procs, functions and views and then las
t
run update stats.
Regards
Charl
http://www.sqlserver.co.za
"HK" wrote:

> Question: Which method should I use to do the simultaneous change from SQ
L
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple mino
r
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do t
he
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>|||How to move databases between computers that are running SQL Server
http://support.microsoft.com/defaul...kb;en-us;314546
AMB
"HK" wrote:

> Question: Which method should I use to do the simultaneous change from SQ
L
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple mino
r
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do t
he
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>|||Why would I have to do anything with stored procs?
Re-indexing doesn't seem required, but I can easily do that, and it is a
good idea anyway while I have the servers down. I don't have any functions
or views.
Can you elaborate on "update stats"?
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:FE5CFB19-0B91-48E4-A9C5-97BC0D419D03@.microsoft.com...
> Hi HK
> You can use both forms obviously, the detach and attach would be quicker
and
> you can just take a copy of your data and log files where a backup and
> restore will take a bit longer, which ever method you choose i would
suggest
> you rebuild all your indexes, stored procs, functions and views and then
last[vbcol=seagreen]
> run update stats.
> Regards
> Charl
> --
> http://www.sqlserver.co.za
>
> "HK" wrote:
>
SQL[vbcol=seagreen]
the[vbcol=seagreen]
to[vbcol=seagreen]
minor[vbcol=seagreen]
2000)[vbcol=seagreen]
FILELISTONLY[vbcol=seagreen]
the[vbcol=seagreen]
backup/restore[vbcol=seagreen]
doesn't[vbcol=seagreen]|||Hi HK
The reasoning behind this is based on personal experience when we moved a
SQL 2000 DB to SQL 2005, we ran into some performance issues when migrating,
we rebuilt all the objects and ran sp_updatestats to update the table
statistics again and it resolved our problems. MS have made changes to the
query optimizer and to ensure that your procs use the best possible executio
n
plan i would suggest it. SQL should be intelligent enough to do it but we di
d
it as a precausionary and it helped our implementation.
Regards
charl
http://www.sqlserver.co.za
"Alejandro Mesa" wrote:
[vbcol=seagreen]
> How to move databases between computers that are running SQL Server
> http://support.microsoft.com/defaul...kb;en-us;314546
>
> AMB
> "HK" wrote:
>|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:427477
You wrote that you rebuild all the objects. Which types of objects were
rebuilt besides indexes? Thanks.
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:7736D8DD-EEFC-4470-8EF8-D2F08BE8D96A@.microsoft.com...
> Hi HK
> The reasoning behind this is based on personal experience when we moved a
> SQL 2000 DB to SQL 2005, we ran into some performance issues when
migrating,
> we rebuilt all the objects and ran sp_updatestats to update the table
> statistics again and it resolved our problems. MS have made changes to the
> query optimizer and to ensure that your procs use the best possible
execution
> plan i would suggest it. SQL should be intelligent enough to do it but we
did[vbcol=seagreen]
> it as a precausionary and it helped our implementation.
> Regards
> charl
>
> --
> http://www.sqlserver.co.za
>
> "Alejandro Mesa" wrote:
>
from SQL[vbcol=seagreen]
the[vbcol=seagreen]
applications to[vbcol=seagreen]
minor[vbcol=seagreen]
2000)[vbcol=seagreen]
FILELISTONLY[vbcol=seagreen]
to[vbcol=seagreen]
I'm[vbcol=seagreen]
do the[vbcol=seagreen]
backup/restore[vbcol=seagreen]
doesn't[vbcol=seagreen]
I[vbcol=seagreen]

Move DB by backup/restore or SP_Detach?

Question: Which method should I use to do the simultaneous change from SQL
2000 to 2005, and the change from an old PC (server) to a new one?
Current: SQL 2000 + Old Hardware
New (Future): SQL 2005 + New Hardware
What's the best way to get a single live database from the current to the
new? I expect to add users manually and point the client applications to
the new server. I've done the Upgrade Advisor and resolved a couple minor
things. For testing, I've taken a BAK file from the old server (sql 2000)
and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
2005 in the process, and a few test queries execute properly. So I'm
inclined to just do a backup and restore at that magic moment when we do the
upgrade. And then I'd add logins and jobs manually. Is there some
reason why SP_Detach & Attach is better? At least with a backup/restore
method, I can easily switch back to the old database if something doesn't
work. Plus, I can test this method many times before the big day, but I
can't easily test a detach of this database in advance. Thoughts?Hi HK
You can use both forms obviously, the detach and attach would be quicker and
you can just take a copy of your data and log files where a backup and
restore will take a bit longer, which ever method you choose i would suggest
you rebuild all your indexes, stored procs, functions and views and then last
run update stats.
Regards
Charl
--
http://www.sqlserver.co.za
"HK" wrote:
> Question: Which method should I use to do the simultaneous change from SQL
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple minor
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do the
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>|||How to move databases between computers that are running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"HK" wrote:
> Question: Which method should I use to do the simultaneous change from SQL
> 2000 to 2005, and the change from an old PC (server) to a new one?
> Current: SQL 2000 + Old Hardware
> New (Future): SQL 2005 + New Hardware
> What's the best way to get a single live database from the current to the
> new? I expect to add users manually and point the client applications to
> the new server. I've done the Upgrade Advisor and resolved a couple minor
> things. For testing, I've taken a BAK file from the old server (sql 2000)
> and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> 2005 in the process, and a few test queries execute properly. So I'm
> inclined to just do a backup and restore at that magic moment when we do the
> upgrade. And then I'd add logins and jobs manually. Is there some
> reason why SP_Detach & Attach is better? At least with a backup/restore
> method, I can easily switch back to the old database if something doesn't
> work. Plus, I can test this method many times before the big day, but I
> can't easily test a detach of this database in advance. Thoughts?
>
>|||Why would I have to do anything with stored procs?
Re-indexing doesn't seem required, but I can easily do that, and it is a
good idea anyway while I have the servers down. I don't have any functions
or views.
Can you elaborate on "update stats"?
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:FE5CFB19-0B91-48E4-A9C5-97BC0D419D03@.microsoft.com...
> Hi HK
> You can use both forms obviously, the detach and attach would be quicker
and
> you can just take a copy of your data and log files where a backup and
> restore will take a bit longer, which ever method you choose i would
suggest
> you rebuild all your indexes, stored procs, functions and views and then
last
> run update stats.
> Regards
> Charl
> --
> http://www.sqlserver.co.za
>
> "HK" wrote:
> > Question: Which method should I use to do the simultaneous change from
SQL
> > 2000 to 2005, and the change from an old PC (server) to a new one?
> >
> > Current: SQL 2000 + Old Hardware
> > New (Future): SQL 2005 + New Hardware
> >
> > What's the best way to get a single live database from the current to
the
> > new? I expect to add users manually and point the client applications
to
> > the new server. I've done the Upgrade Advisor and resolved a couple
minor
> > things. For testing, I've taken a BAK file from the old server (sql
2000)
> > and imported it onto the new server (sql 2005) using RESTORE
FILELISTONLY
> > and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> > 2005 in the process, and a few test queries execute properly. So I'm
> > inclined to just do a backup and restore at that magic moment when we do
the
> > upgrade. And then I'd add logins and jobs manually. Is there some
> > reason why SP_Detach & Attach is better? At least with a
backup/restore
> > method, I can easily switch back to the old database if something
doesn't
> > work. Plus, I can test this method many times before the big day, but I
> > can't easily test a detach of this database in advance. Thoughts?
> >
> >
> >|||Hi HK
The reasoning behind this is based on personal experience when we moved a
SQL 2000 DB to SQL 2005, we ran into some performance issues when migrating,
we rebuilt all the objects and ran sp_updatestats to update the table
statistics again and it resolved our problems. MS have made changes to the
query optimizer and to ensure that your procs use the best possible execution
plan i would suggest it. SQL should be intelligent enough to do it but we did
it as a precausionary and it helped our implementation.
Regards
charl
http://www.sqlserver.co.za
"Alejandro Mesa" wrote:
> How to move databases between computers that are running SQL Server
> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
>
> AMB
> "HK" wrote:
> > Question: Which method should I use to do the simultaneous change from SQL
> > 2000 to 2005, and the change from an old PC (server) to a new one?
> >
> > Current: SQL 2000 + Old Hardware
> > New (Future): SQL 2005 + New Hardware
> >
> > What's the best way to get a single live database from the current to the
> > new? I expect to add users manually and point the client applications to
> > the new server. I've done the Upgrade Advisor and resolved a couple minor
> > things. For testing, I've taken a BAK file from the old server (sql 2000)
> > and imported it onto the new server (sql 2005) using RESTORE FILELISTONLY
> > and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading to
> > 2005 in the process, and a few test queries execute properly. So I'm
> > inclined to just do a backup and restore at that magic moment when we do the
> > upgrade. And then I'd add logins and jobs manually. Is there some
> > reason why SP_Detach & Attach is better? At least with a backup/restore
> > method, I can easily switch back to the old database if something doesn't
> > work. Plus, I can test this method many times before the big day, but I
> > can't easily test a detach of this database in advance. Thoughts?
> >
> >
> >|||You wrote that you rebuild all the objects. Which types of objects were
rebuilt besides indexes? Thanks.
"Charl" <Charl@.discussions.microsoft.com> wrote in message
news:7736D8DD-EEFC-4470-8EF8-D2F08BE8D96A@.microsoft.com...
> Hi HK
> The reasoning behind this is based on personal experience when we moved a
> SQL 2000 DB to SQL 2005, we ran into some performance issues when
migrating,
> we rebuilt all the objects and ran sp_updatestats to update the table
> statistics again and it resolved our problems. MS have made changes to the
> query optimizer and to ensure that your procs use the best possible
execution
> plan i would suggest it. SQL should be intelligent enough to do it but we
did
> it as a precausionary and it helped our implementation.
> Regards
> charl
>
> --
> http://www.sqlserver.co.za
>
> "Alejandro Mesa" wrote:
> > How to move databases between computers that are running SQL Server
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
> >
> >
> > AMB
> >
> > "HK" wrote:
> >
> > > Question: Which method should I use to do the simultaneous change
from SQL
> > > 2000 to 2005, and the change from an old PC (server) to a new one?
> > >
> > > Current: SQL 2000 + Old Hardware
> > > New (Future): SQL 2005 + New Hardware
> > >
> > > What's the best way to get a single live database from the current to
the
> > > new? I expect to add users manually and point the client
applications to
> > > the new server. I've done the Upgrade Advisor and resolved a couple
minor
> > > things. For testing, I've taken a BAK file from the old server (sql
2000)
> > > and imported it onto the new server (sql 2005) using RESTORE
FILELISTONLY
> > > and then RESTORE DATABASE -- FROM DISK. It imported fine, upgrading
to
> > > 2005 in the process, and a few test queries execute properly. So
I'm
> > > inclined to just do a backup and restore at that magic moment when we
do the
> > > upgrade. And then I'd add logins and jobs manually. Is there some
> > > reason why SP_Detach & Attach is better? At least with a
backup/restore
> > > method, I can easily switch back to the old database if something
doesn't
> > > work. Plus, I can test this method many times before the big day, but
I
> > > can't easily test a detach of this database in advance. Thoughts?
> > >
> > >
> > >

Saturday, February 25, 2012

Move Database to client

Hi,
We have a database that we built for a client and we would like to make a
backup of the database and restore the database on our clients Sql Server
box. Both environments are running SQL Server 2000 SP3a.
We make a backup of the database on our server and when we go to the clients
site and run the restore it complains and gives an error message that states
SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
tried the WITH MOVE but aree not experienced DBA so we are not sure if we
configured it right.
RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Data.MDF',
MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Log.LDF'
We were able to restore the database some how and then it gives us an
SQL-DMO error 21776.
Any ideas on how we should best approach this situation so that we can get
the full database (structure and data)?
Thanks for the assistance.Please post the entire error message. Error 21776 is the
generic error used for an object not found in a collection.
The specifics of what object in what collection would be in
the entire error message.
-Sue
On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
S@.discussions.microsoft.com> wrote:
>Hi,
>We have a database that we built for a client and we would like to make a
>backup of the database and restore the database on our clients Sql Server
>box. Both environments are running SQL Server 2000 SP3a.
>We make a backup of the database on our server and when we go to the clients
>site and run the restore it complains and gives an error message that states
>SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
>tried the WITH MOVE but aree not experienced DBA so we are not sure if we
>configured it right.
>RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
>WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Data.MDF',
>MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Log.LDF'
>
>We were able to restore the database some how and then it gives us an
>SQL-DMO error 21776.
>Any ideas on how we should best approach this situation so that we can get
>the full database (structure and data)?
>Thanks for the assistance.|||Hi,
Sorry Sue, I should have elaborated more:
We have two problems:
1. we areunable to restore the database properly using either the GUI based
restore tool in the Enterprise Manager or usign the Query Analyzer with the
script included.
2. We some how managed to restore the database on the client's server and
when we try to access any component of the "restored" database, we receive
the SQL-DMO 21776 error. Which states the following
"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databases
colelction. If the name is a qualified name, use [ ] to separate various
parts of the name and try again."
So what i am looking for is what is the best mechanism to move our database
from out SQL Server 2000 environment to the clients SQL Server 2000
environment where we can preserve the table structure and data contained
within the database.
As well, how can we delete the database that we were able to create but now
is not recognized by the Enterprise manager due to the 21776 error.
I hope this provides a more detailed explanation of the situation we are
facing.
Thanks for the assistance,
Rod
"Sue Hoegemeier" wrote:
> Please post the entire error message. Error 21776 is the
> generic error used for an object not found in a collection.
> The specifics of what object in what collection would be in
> the entire error message.
> -Sue
> On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
> S@.discussions.microsoft.com> wrote:
> >Hi,
> >
> >We have a database that we built for a client and we would like to make a
> >backup of the database and restore the database on our clients Sql Server
> >box. Both environments are running SQL Server 2000 SP3a.
> >
> >We make a backup of the database on our server and when we go to the clients
> >site and run the restore it complains and gives an error message that states
> >SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
> >tried the WITH MOVE but aree not experienced DBA so we are not sure if we
> >configured it right.
> >
> >RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
> >WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
> >server\mssql\data\CDR-Prod_Data.MDF',
> >MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
> >server\mssql\data\CDR-Prod_Log.LDF'
> >
> >
> >We were able to restore the database some how and then it gives us an
> >SQL-DMO error 21776.
> >
> >Any ideas on how we should best approach this situation so that we can get
> >the full database (structure and data)?
> >
> >Thanks for the assistance.
>|||The best mechanism is a backup and restore. You can also use
sp_detach_db, copy the data and log files and have the
client attach the files with sp_attach_db.
I would guess many of the problems are from having a
non-standard database name. The rules for identifier and
what characters are allowed in what positions is in the
books online topic: Using Identifiers
In terms of how to delete the database now, try dropping the
database using query analyzer and putting brackets around
the database name.
drop database [CDR-Prod]
-Sue
On Mon, 14 Mar 2005 08:11:05 -0800, "Rod S"
<RodS@.discussions.microsoft.com> wrote:
>Hi,
>Sorry Sue, I should have elaborated more:
>We have two problems:
>1. we areunable to restore the database properly using either the GUI based
>restore tool in the Enterprise Manager or usign the Query Analyzer with the
>script included.
>2. We some how managed to restore the database on the client's server and
>when we try to access any component of the "restored" database, we receive
>the SQL-DMO 21776 error. Which states the following
>"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databases
>colelction. If the name is a qualified name, use [ ] to separate various
>parts of the name and try again."
>So what i am looking for is what is the best mechanism to move our database
>from out SQL Server 2000 environment to the clients SQL Server 2000
>environment where we can preserve the table structure and data contained
>within the database.
>As well, how can we delete the database that we were able to create but now
>is not recognized by the Enterprise manager due to the 21776 error.
>I hope this provides a more detailed explanation of the situation we are
>facing.
>Thanks for the assistance,
>Rod
>"Sue Hoegemeier" wrote:
>> Please post the entire error message. Error 21776 is the
>> generic error used for an object not found in a collection.
>> The specifics of what object in what collection would be in
>> the entire error message.
>> -Sue
>> On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
>> S@.discussions.microsoft.com> wrote:
>> >Hi,
>> >
>> >We have a database that we built for a client and we would like to make a
>> >backup of the database and restore the database on our clients Sql Server
>> >box. Both environments are running SQL Server 2000 SP3a.
>> >
>> >We make a backup of the database on our server and when we go to the clients
>> >site and run the restore it complains and gives an error message that states
>> >SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
>> >tried the WITH MOVE but aree not experienced DBA so we are not sure if we
>> >configured it right.
>> >
>> >RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
>> >WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
>> >server\mssql\data\CDR-Prod_Data.MDF',
>> >MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
>> >server\mssql\data\CDR-Prod_Log.LDF'
>> >
>> >
>> >We were able to restore the database some how and then it gives us an
>> >SQL-DMO error 21776.
>> >
>> >Any ideas on how we should best approach this situation so that we can get
>> >the full database (structure and data)?
>> >
>> >Thanks for the assistance.
>>

Move Database to client

Hi,
We have a database that we built for a client and we would like to make a
backup of the database and restore the database on our clients Sql Server
box. Both environments are running SQL Server 2000 SP3a.
We make a backup of the database on our server and when we go to the clients
site and run the restore it complains and gives an error message that states
SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
tried the WITH MOVE but aree not experienced DBA so we are not sure if we
configured it right.
RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Data.MDF',
MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Log.LDF'
We were able to restore the database some how and then it gives us an
SQL-DMO error 21776.
Any ideas on how we should best approach this situation so that we can get
the full database (structure and data)?
Thanks for the assistance.
Please post the entire error message. Error 21776 is the
generic error used for an object not found in a collection.
The specifics of what object in what collection would be in
the entire error message.
-Sue
On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
S@.discussions.microsoft.com> wrote:

>Hi,
>We have a database that we built for a client and we would like to make a
>backup of the database and restore the database on our clients Sql Server
>box. Both environments are running SQL Server 2000 SP3a.
>We make a backup of the database on our server and when we go to the clients
>site and run the restore it complains and gives an error message that states
>SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
>tried the WITH MOVE but aree not experienced DBA so we are not sure if we
>configured it right.
>RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
>WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Data.MDF',
>MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Log.LDF'
>
>We were able to restore the database some how and then it gives us an
>SQL-DMO error 21776.
>Any ideas on how we should best approach this situation so that we can get
>the full database (structure and data)?
>Thanks for the assistance.
|||Hi,
Sorry Sue, I should have elaborated more:
We have two problems:
1. we areunable to restore the database properly using either the GUI based
restore tool in the Enterprise Manager or usign the Query Analyzer with the
script included.
2. We some how managed to restore the database on the client's server and
when we try to access any component of the "restored" database, we receive
the SQL-DMO 21776 error. Which states the following
"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databases
colelction. If the name is a qualified name, use [ ] to separate various
parts of the name and try again."
So what i am looking for is what is the best mechanism to move our database
from out SQL Server 2000 environment to the clients SQL Server 2000
environment where we can preserve the table structure and data contained
within the database.
As well, how can we delete the database that we were able to create but now
is not recognized by the Enterprise manager due to the 21776 error.
I hope this provides a more detailed explanation of the situation we are
facing.
Thanks for the assistance,
Rod
"Sue Hoegemeier" wrote:

> Please post the entire error message. Error 21776 is the
> generic error used for an object not found in a collection.
> The specifics of what object in what collection would be in
> the entire error message.
> -Sue
> On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
> S@.discussions.microsoft.com> wrote:
>
>
|||The best mechanism is a backup and restore. You can also use
sp_detach_db, copy the data and log files and have the
client attach the files with sp_attach_db.
I would guess many of the problems are from having a
non-standard database name. The rules for identifier and
what characters are allowed in what positions is in the
books online topic: Using Identifiers
In terms of how to delete the database now, try dropping the
database using query analyzer and putting brackets around
the database name.
drop database [CDR-Prod]
-Sue
On Mon, 14 Mar 2005 08:11:05 -0800, "Rod S"
<RodS@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi,
>Sorry Sue, I should have elaborated more:
>We have two problems:
>1. we areunable to restore the database properly using either the GUI based
>restore tool in the Enterprise Manager or usign the Query Analyzer with the
>script included.
>2. We some how managed to restore the database on the client's server and
>when we try to access any component of the "restored" database, we receive
>the SQL-DMO 21776 error. Which states the following
>"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databases
>colelction. If the name is a qualified name, use [ ] to separate various
>parts of the name and try again."
>So what i am looking for is what is the best mechanism to move our database
>from out SQL Server 2000 environment to the clients SQL Server 2000
>environment where we can preserve the table structure and data contained
>within the database.
>As well, how can we delete the database that we were able to create but now
>is not recognized by the Enterprise manager due to the 21776 error.
>I hope this provides a more detailed explanation of the situation we are
>facing.
>Thanks for the assistance,
>Rod
>"Sue Hoegemeier" wrote:

Move Database to client

Hi,
We have a database that we built for a client and we would like to make a
backup of the database and restore the database on our clients Sql Server
box. Both environments are running SQL Server 2000 SP3a.
We make a backup of the database on our server and when we go to the clients
site and run the restore it complains and gives an error message that states
SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
tried the WITH MOVE but aree not experienced DBA so we are not sure if we
configured it right.
RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Data.MDF',
MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
server\mssql\data\CDR-Prod_Log.LDF'
We were able to restore the database some how and then it gives us an
SQL-DMO error 21776.
Any ideas on how we should best approach this situation so that we can get
the full database (structure and data)?
Thanks for the assistance.Please post the entire error message. Error 21776 is the
generic error used for an object not found in a collection.
The specifics of what object in what collection would be in
the entire error message.
-Sue
On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
S@.discussions.microsoft.com> wrote:

>Hi,
>We have a database that we built for a client and we would like to make a
>backup of the database and restore the database on our clients Sql Server
>box. Both environments are running SQL Server 2000 SP3a.
>We make a backup of the database on our server and when we go to the client
s
>site and run the restore it complains and gives an error message that state
s
>SQL-DMO (ODBC SQLState: 42000) and states we should use the WITH MOVE. We
>tried the WITH MOVE but aree not experienced DBA so we are not sure if we
>configured it right.
>RESTORE DATABASE TEST FROM DISK='C:\TEMP\CDR-Prod.BAK'
>WITH MOVE 'TEST_Data' TO 'c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Data.MDF',
>MOVE 'TEST_Log' TO ' c:\program files\microsoft sql
>server\mssql\data\CDR-Prod_Log.LDF'
>
>We were able to restore the database some how and then it gives us an
>SQL-DMO error 21776.
>Any ideas on how we should best approach this situation so that we can get
>the full database (structure and data)?
>Thanks for the assistance.|||Hi,
Sorry Sue, I should have elaborated more:
We have two problems:
1. we areunable to restore the database properly using either the GUI based
restore tool in the Enterprise Manager or usign the Query Analyzer with the
script included.
2. We some how managed to restore the database on the client's server and
when we try to access any component of the "restored" database, we receive
the SQL-DMO 21776 error. Which states the following
"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databas
es
colelction. If the name is a qualified name, use [ ] to separate variou
s
parts of the name and try again."
So what i am looking for is what is the best mechanism to move our database
from out SQL Server 2000 environment to the clients SQL Server 2000
environment where we can preserve the table structure and data contained
within the database.
As well, how can we delete the database that we were able to create but now
is not recognized by the Enterprise manager due to the 21776 error.
I hope this provides a more detailed explanation of the situation we are
facing.
Thanks for the assistance,
Rod
"Sue Hoegemeier" wrote:

> Please post the entire error message. Error 21776 is the
> generic error used for an object not found in a collection.
> The specifics of what object in what collection would be in
> the entire error message.
> -Sue
> On Sun, 13 Mar 2005 18:55:02 -0800, "Rod S" <Rod
> S@.discussions.microsoft.com> wrote:
>
>|||The best mechanism is a backup and restore. You can also use
sp_detach_db, copy the data and log files and have the
client attach the files with sp_attach_db.
I would guess many of the problems are from having a
non-standard database name. The rules for identifier and
what characters are allowed in what positions is in the
books online topic: Using Identifiers
In terms of how to delete the database now, try dropping the
database using query analyzer and putting brackets around
the database name.
drop database [CDR-Prod]
-Sue
On Mon, 14 Mar 2005 08:11:05 -0800, "Rod S"
<RodS@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Hi,
>Sorry Sue, I should have elaborated more:
>We have two problems:
>1. we areunable to restore the database properly using either the GUI based
>restore tool in the Enterprise Manager or usign the Query Analyzer with the
>script included.
>2. We some how managed to restore the database on the client's server and
>when we try to access any component of the "restored" database, we receive
>the SQL-DMO 21776 error. Which states the following
>"Error 21776: [SQL-DMO} The name 'CDR-Prod' was not found in the Databa
ses
>colelction. If the name is a qualified name, use [ ] to separate vario
us
>parts of the name and try again."
>So what i am looking for is what is the best mechanism to move our database
>from out SQL Server 2000 environment to the clients SQL Server 2000
>environment where we can preserve the table structure and data contained
>within the database.
>As well, how can we delete the database that we were able to create but now
>is not recognized by the Enterprise manager due to the 21776 error.
>I hope this provides a more detailed explanation of the situation we are
>facing.
>Thanks for the assistance,
>Rod
>"Sue Hoegemeier" wrote:
>

Move database from 1 server to another

If we would like to move a database from Server A to
Server B, we should use sp_detach_db or make a backup copy
and restore on Server B ?
Is there any difference and advantage of these 2 methods ?
Moreover, if there are 60 logins & users are created in
that database (It is done by contractor), is it necessary
for us to create those Logins in Server B before
restoring / attaching the Database ?
Thanks
Detach or backup is fine. Detach (with update statistics) / Attach
is probably easier.
Doesn't really matter when you handle the users. You could
write a little script for that. If you use the Generate Script option on
the database and select the option to include users and permissions,
you can review the script and pull out just that section.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:749e01c525d6$99190530$a401280a@.phx.gbl...
> If we would like to move a database from Server A to
> Server B, we should use sp_detach_db or make a backup copy
> and restore on Server B ?
> Is there any difference and advantage of these 2 methods ?
> Moreover, if there are 60 logins & users are created in
> that database (It is done by contractor), is it necessary
> for us to create those Logins in Server B before
> restoring / attaching the Database ?
> Thanks
|||Dear Robbe,
Thank you for your advice.
I have selected the database I have to transfer to another
Server, Generate Script, select all options AND get a SQL
script generated.
Should I run the script in target server before I attach
the database from Source Server ?
Thank you !

>--Original Message--
>Detach or backup is fine. Detach (with update
statistics) / Attach
>is probably easier.
>Doesn't really matter when you handle the users. You
could
>write a little script for that. If you use the Generate
Script option on
>the database and select the option to include users and
permissions,
>you can review the script and pull out just that section.
>--
>2005 Microsoft MVP C#
>Robbe Morris
>http://www.robbemorris.com
>http://www.masterado.net/home/listings.aspx
>
>"Jason" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:749e01c525d6$99190530$a401280a@.phx.gbl...
copy[vbcol=seagreen]
methods ?[vbcol=seagreen]
necessary
>
>.
>
|||Pull the script up in Query analyzer and strip out everything but
the code that creates the users and grants permissions. Attach
your database and then run the modified script.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:753701c525ee$0457e340$a401280a@.phx.gbl...[vbcol=seagreen]
> Dear Robbe,
> Thank you for your advice.
> I have selected the database I have to transfer to another
> Server, Generate Script, select all options AND get a SQL
> script generated.
> Should I run the script in target server before I attach
> the database from Source Server ?
> Thank you !
> statistics) / Attach
> could
> Script option on
> permissions,
> message
> copy
> methods ?
> necessary

Move database from 1 server to another

If we would like to move a database from Server A to
Server B, we should use sp_detach_db or make a backup copy
and restore on Server B ?
Is there any difference and advantage of these 2 methods ?
Moreover, if there are 60 logins & users are created in
that database (It is done by contractor), is it necessary
for us to create those Logins in Server B before
restoring / attaching the Database ?
ThanksDetach or backup is fine. Detach (with update statistics) / Attach
is probably easier.
Doesn't really matter when you handle the users. You could
write a little script for that. If you use the Generate Script option on
the database and select the option to include users and permissions,
you can review the script and pull out just that section.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:749e01c525d6$99190530$a401280a@.phx.gbl...
> If we would like to move a database from Server A to
> Server B, we should use sp_detach_db or make a backup copy
> and restore on Server B ?
> Is there any difference and advantage of these 2 methods ?
> Moreover, if there are 60 logins & users are created in
> that database (It is done by contractor), is it necessary
> for us to create those Logins in Server B before
> restoring / attaching the Database ?
> Thanks|||Dear Robbe,
Thank you for your advice.
I have selected the database I have to transfer to another
Server, Generate Script, select all options AND get a SQL
script generated.
Should I run the script in target server before I attach
the database from Source Server ?
Thank you !

>--Original Message--
>Detach or backup is fine. Detach (with update
statistics) / Attach
>is probably easier.
>Doesn't really matter when you handle the users. You
could
>write a little script for that. If you use the Generate
Script option on
>the database and select the option to include users and
permissions,
>you can review the script and pull out just that section.
>--
>2005 Microsoft MVP C#
>Robbe Morris
>http://www.robbemorris.com
>http://www.masterado.net/home/listings.aspx
>
>"Jason" <anonymous@.discussions.microsoft.com> wrote in
message
>news:749e01c525d6$99190530$a401280a@.phx.gbl...
copy[vbcol=seagreen]
methods ?[vbcol=seagreen]
necessary[vbcol=seagreen]
>
>.
>|||Pull the script up in Query analyzer and strip out everything but
the code that creates the users and grants permissions. Attach
your database and then run the modified script.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:753701c525ee$0457e340$a401280a@.phx.gbl...[vbcol=seagreen]
> Dear Robbe,
> Thank you for your advice.
> I have selected the database I have to transfer to another
> Server, Generate Script, select all options AND get a SQL
> script generated.
> Should I run the script in target server before I attach
> the database from Source Server ?
> Thank you !
>
> statistics) / Attach
> could
> Script option on
> permissions,
> message
> copy
> methods ?
> necessary

Move database from 1 server to another

If we would like to move a database from Server A to
Server B, we should use sp_detach_db or make a backup copy
and restore on Server B ?
Is there any difference and advantage of these 2 methods ?
Moreover, if there are 60 logins & users are created in
that database (It is done by contractor), is it necessary
for us to create those Logins in Server B before
restoring / attaching the Database ?
ThanksDetach or backup is fine. Detach (with update statistics) / Attach
is probably easier.
Doesn't really matter when you handle the users. You could
write a little script for that. If you use the Generate Script option on
the database and select the option to include users and permissions,
you can review the script and pull out just that section.
--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:749e01c525d6$99190530$a401280a@.phx.gbl...
> If we would like to move a database from Server A to
> Server B, we should use sp_detach_db or make a backup copy
> and restore on Server B ?
> Is there any difference and advantage of these 2 methods ?
> Moreover, if there are 60 logins & users are created in
> that database (It is done by contractor), is it necessary
> for us to create those Logins in Server B before
> restoring / attaching the Database ?
> Thanks|||Dear Robbe,
Thank you for your advice.
I have selected the database I have to transfer to another
Server, Generate Script, select all options AND get a SQL
script generated.
Should I run the script in target server before I attach
the database from Source Server ?
Thank you !
>--Original Message--
>Detach or backup is fine. Detach (with update
statistics) / Attach
>is probably easier.
>Doesn't really matter when you handle the users. You
could
>write a little script for that. If you use the Generate
Script option on
>the database and select the option to include users and
permissions,
>you can review the script and pull out just that section.
>--
>2005 Microsoft MVP C#
>Robbe Morris
>http://www.robbemorris.com
>http://www.masterado.net/home/listings.aspx
>
>"Jason" <anonymous@.discussions.microsoft.com> wrote in
message
>news:749e01c525d6$99190530$a401280a@.phx.gbl...
>> If we would like to move a database from Server A to
>> Server B, we should use sp_detach_db or make a backup
copy
>> and restore on Server B ?
>> Is there any difference and advantage of these 2
methods ?
>> Moreover, if there are 60 logins & users are created in
>> that database (It is done by contractor), is it
necessary
>> for us to create those Logins in Server B before
>> restoring / attaching the Database ?
>> Thanks
>
>.
>|||Pull the script up in Query analyzer and strip out everything but
the code that creates the users and grants permissions. Attach
your database and then run the modified script.
--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.masterado.net/home/listings.aspx
"Jason" <anonymous@.discussions.microsoft.com> wrote in message
news:753701c525ee$0457e340$a401280a@.phx.gbl...
> Dear Robbe,
> Thank you for your advice.
> I have selected the database I have to transfer to another
> Server, Generate Script, select all options AND get a SQL
> script generated.
> Should I run the script in target server before I attach
> the database from Source Server ?
> Thank you !
>>--Original Message--
>>Detach or backup is fine. Detach (with update
> statistics) / Attach
>>is probably easier.
>>Doesn't really matter when you handle the users. You
> could
>>write a little script for that. If you use the Generate
> Script option on
>>the database and select the option to include users and
> permissions,
>>you can review the script and pull out just that section.
>>--
>>2005 Microsoft MVP C#
>>Robbe Morris
>>http://www.robbemorris.com
>>http://www.masterado.net/home/listings.aspx
>>
>>"Jason" <anonymous@.discussions.microsoft.com> wrote in
> message
>>news:749e01c525d6$99190530$a401280a@.phx.gbl...
>> If we would like to move a database from Server A to
>> Server B, we should use sp_detach_db or make a backup
> copy
>> and restore on Server B ?
>> Is there any difference and advantage of these 2
> methods ?
>> Moreover, if there are 60 logins & users are created in
>> that database (It is done by contractor), is it
> necessary
>> for us to create those Logins in Server B before
>> restoring / attaching the Database ?
>> Thanks
>>
>>.

Monday, February 20, 2012

Moving indexes to their own disk drive

I am trying to find out if it is possible to move indexes to a separate filegroup/disk drive during database restore. I am trying this to see if it improves performance. Also if I cannot move the indexes during restore, how would I move them afterwards to a different filegroup/disk drive? Thanks in advance for all the help.Just recreate indexes:

CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name
ON { table | view } ( column [ ASC | DESC ] [ ,...n ] )
[ WITH < index_option > [ ,...n] ]
[ ON filegroup ] --<<<<<<<<<<<<<<<<<<<<<<|||Look up ALTER TABLE

I think you can ALTER the contraint (The indexes) and change the file group

Never done it though...let me look into it...|||I was meesing with

USE Northwind
GO

CREATE TABLE myTable99 (Col1 int IDENTITY(1,1),Col2 char(1))
GO

CREATE INDEX myTable99_IX1 ON myTable99(Col1)
GO

ALTER TABLE myTable99 NOCHECK CONSTRAINT myTable99_IX1 ON Secondary
GO

DROP TABLE myTable99
GO

But can't get it to work...

Seems like you have to drop and recreate...I would have thought there might have been a move or alter or something...

How big is the database?|||Will that SQL allow me to move the existing index to a different drive, and can you show me an example. Thanks.|||One thing to remember, you can not move a clustered index to a drive (filegroup) that is different from the filegroup the data is on. In short, a clustered index is the data. As for an example, suppose you have two filegroups named UserData and IndexData. For table Customers you would have:

create (unique) index indexname on Customers (fields) on IndexData

alter table Customers add constraint pk_customers primary key (keyfield(s)) on UserData|||I can't find a way to move the index across filegroups...

Even EM does a drop and recreate...|||if this is going to be a one time thing then i would invest the time and do it right and completely recreate the index on the new disk.
this would give you a fresh index on the new disk

and kids
dont forget your fill factor.