Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Friday, March 30, 2012

Moving backup devices

Is there a way to copy backup devices between 2 servers with a script or
something else ? I actually need to move my current installation on a new
server and I don't want to recreate 200 backup devices manually.
Thanks in advance
script out the sysdevices table... eg
USE master
GO
SELECT *
FROM dbo.sysdevices

Moving backup devices

Is there a way to copy backup devices between 2 servers with a script or
something else ? I actually need to move my current installation on a new
server and I don't want to recreate 200 backup devices manually.
Thanks in advancescript out the sysdevices table... eg
USE master
GO
SELECT *
FROM dbo.sysdevices

Moving backup devices

Is there a way to copy backup devices between 2 servers with a script or
something else ? I actually need to move my current installation on a new
server and I don't want to recreate 200 backup devices manually.
Thanks in advancescript out the sysdevices table... eg
USE master
GO
SELECT *
FROM dbo.sysdevices

Moving all DTS packages from server to server

Hi,
Is there any way of copying ALL DTS Packages from server to server
apart from direct copy of sysdtspackages table and saving them one by
one?
ThanksThis tool can copy all packages or individual packages, and it also has
a command line version, so you can automate copying:

http://www.sqldts.com/default.aspx?242

Simonsql

Moving ALL DBs to new server

I am building a new SQL server and would like to copy ALL DBs (user and
system) to it. The server will eventually have the same name, but the
DB files will be in different locations (paths). Are there any links I
should check out or MSFT KB articles? I tried searching but wasn't
able to get anything for my specific issues. (Also, upgrading Windows
2000 to Windows 2003, but still on SQL Server 2000 SP3.)
I found this one.
http://support.microsoft.com/default.aspx/kb/224071
"tommydogs@.sickoflosers.com" wrote:

> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>
|||In addition to the link posted by Jen, here are some more articles that you
may find helpful:
INF: Disaster Recovery Articles for Microsoft SQL Server
http://www.support.microsoft.com/?id=307775
INF: Moving SQL Server databases to a new location with Detach/Attach
http://www.support.microsoft.com/?id=224071
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://www.support.microsoft.com/?id=314546
INF: Using the WITH MOVE Option with the RESTORE Statement
http://support.microsoft.com/?id=221465
PRB: User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://www.support.microsoft.com/?id=246133
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://www.support.microsoft.com/?id=274188
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases When
Database Is Moved
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
Keith
<tommydogs@.sickoflosers.com> wrote in message
news:1107283271.072157.290890@.c13g2000cwb.googlegr oups.com...
> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>
|||Thanks for the help! One of the questions I have that doesn't seem to
be answered is this: I detach all user DBs from my current SQL server,
then copy over the master, model, msdb, & tempdb system DBs to the new
server. Can I then copy and reattach user DB files?
Keith Kratochvil wrote:
> In addition to the link posted by Jen, here are some more articles
that you
> may find helpful:
>
>
> INF: Disaster Recovery Articles for Microsoft SQL Server
> http://www.support.microsoft.com/?id=307775
> INF: Moving SQL Server databases to a new location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://www.support.microsoft.com/?id=314546
> INF: Using the WITH MOVE Option with the RESTORE Statement
> http://support.microsoft.com/?id=221465
> PRB: User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
> http://www.support.microsoft.com/?id=246133
> PRB: "Troubleshooting Orphaned Users" Topic in Books Online is
Incomplete
> http://www.support.microsoft.com/?id=274188
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases
When[vbcol=seagreen]
> Database Is Moved
> http://www.support.microsoft.com/?id=298897
>
> Utility to map users to the correct login
> http://www.dbmaint.com/SyncSqlLogins.asp
>
> --
> Keith
>
> <tommydogs@.sickoflosers.com> wrote in message
> news:1107283271.072157.290890@.c13g2000cwb.googlegr oups.com...
and[vbcol=seagreen]
the[vbcol=seagreen]
links I[vbcol=seagreen]
Windows[vbcol=seagreen]
|||I've just recently had to move my database to other server. A mirror in fact.
The faster way to move and get them running was stopping sql services copy
the .ldf and .mdf files to the other server. Copy the folder \mssql\data to
the other server and start the services.
It worked.
But i think it wont work for you since you're gonna place db on different
paths.
Hope you dont have a bad time doing that
"tommydogs@.sickoflosers.com" wrote:

> Thanks for the help! One of the questions I have that doesn't seem to
> be answered is this: I detach all user DBs from my current SQL server,
> then copy over the master, model, msdb, & tempdb system DBs to the new
> server. Can I then copy and reattach user DB files?
>
> Keith Kratochvil wrote:
> that you
> Incomplete
> When
> and
> the
> links I
> Windows
>

Moving ALL DBs to new server

I am building a new SQL server and would like to copy ALL DBs (user and
system) to it. The server will eventually have the same name, but the
DB files will be in different locations (paths). Are there any links I
should check out or MSFT KB articles? I tried searching but wasn't
able to get anything for my specific issues. (Also, upgrading Windows
2000 to Windows 2003, but still on SQL Server 2000 SP3.)I found this one.
http://support.microsoft.com/default.aspx/kb/224071
"tommydogs@.sickoflosers.com" wrote:
> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>|||In addition to the link posted by Jen, here are some more articles that you
may find helpful:
INF: Disaster Recovery Articles for Microsoft SQL Server
http://www.support.microsoft.com/?id=307775
INF: Moving SQL Server databases to a new location with Detach/Attach
http://www.support.microsoft.com/?id=224071
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://www.support.microsoft.com/?id=314546
INF: Using the WITH MOVE Option with the RESTORE Statement
http://support.microsoft.com/?id=221465
PRB: User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://www.support.microsoft.com/?id=246133
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://www.support.microsoft.com/?id=274188
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases When
Database Is Moved
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
Keith
<tommydogs@.sickoflosers.com> wrote in message
news:1107283271.072157.290890@.c13g2000cwb.googlegroups.com...
> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>|||Thanks for the help! One of the questions I have that doesn't seem to
be answered is this: I detach all user DBs from my current SQL server,
then copy over the master, model, msdb, & tempdb system DBs to the new
server. Can I then copy and reattach user DB files?
Keith Kratochvil wrote:
> In addition to the link posted by Jen, here are some more articles
that you
> may find helpful:
>
>
> INF: Disaster Recovery Articles for Microsoft SQL Server
> http://www.support.microsoft.com/?id=307775
> INF: Moving SQL Server databases to a new location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://www.support.microsoft.com/?id=314546
> INF: Using the WITH MOVE Option with the RESTORE Statement
> http://support.microsoft.com/?id=221465
> PRB: User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
> http://www.support.microsoft.com/?id=246133
> PRB: "Troubleshooting Orphaned Users" Topic in Books Online is
Incomplete
> http://www.support.microsoft.com/?id=274188
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases
When
> Database Is Moved
> http://www.support.microsoft.com/?id=298897
>
> Utility to map users to the correct login
> http://www.dbmaint.com/SyncSqlLogins.asp
>
> --
> Keith
>
> <tommydogs@.sickoflosers.com> wrote in message
> news:1107283271.072157.290890@.c13g2000cwb.googlegroups.com...
> > I am building a new SQL server and would like to copy ALL DBs (user
and
> > system) to it. The server will eventually have the same name, but
the
> > DB files will be in different locations (paths). Are there any
links I
> > should check out or MSFT KB articles? I tried searching but wasn't
> > able to get anything for my specific issues. (Also, upgrading
Windows
> > 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
> >|||I've just recently had to move my database to other server. A mirror in fact.
The faster way to move and get them running was stopping sql services copy
the .ldf and .mdf files to the other server. Copy the folder \mssql\data to
the other server and start the services.
It worked.
But i think it wont work for you since you're gonna place db on different
paths.
Hope you dont have a bad time doing that :)
"tommydogs@.sickoflosers.com" wrote:
> Thanks for the help! One of the questions I have that doesn't seem to
> be answered is this: I detach all user DBs from my current SQL server,
> then copy over the master, model, msdb, & tempdb system DBs to the new
> server. Can I then copy and reattach user DB files?
>
> Keith Kratochvil wrote:
> > In addition to the link posted by Jen, here are some more articles
> that you
> > may find helpful:
> >
> >
> >
> >
> > INF: Disaster Recovery Articles for Microsoft SQL Server
> > http://www.support.microsoft.com/?id=307775
> >
> > INF: Moving SQL Server databases to a new location with Detach/Attach
> > http://www.support.microsoft.com/?id=224071
> >
> > HOW TO: Move Databases Between Computers That Are Running SQL Server
> > http://www.support.microsoft.com/?id=314546
> >
> > INF: Using the WITH MOVE Option with the RESTORE Statement
> > http://support.microsoft.com/?id=221465
> >
> > PRB: User Logon and/or Permission Errors After Restoring Dump
> > http://www.support.microsoft.com/?id=168001
> >
> > HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
> > http://www.support.microsoft.com/?id=246133
> >
> > PRB: "Troubleshooting Orphaned Users" Topic in Books Online is
> Incomplete
> > http://www.support.microsoft.com/?id=274188
> >
> > How to Resolve Permission Issues When a Database Is Moved Between SQL
> > Servers
> > http://www.support.microsoft.com/?id=240872
> >
> > SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases
> When
> > Database Is Moved
> > http://www.support.microsoft.com/?id=298897
> >
> >
> >
> > Utility to map users to the correct login
> > http://www.dbmaint.com/SyncSqlLogins.asp
> >
> >
> > --
> > Keith
> >
> >
> > <tommydogs@.sickoflosers.com> wrote in message
> > news:1107283271.072157.290890@.c13g2000cwb.googlegroups.com...
> > > I am building a new SQL server and would like to copy ALL DBs (user
> and
> > > system) to it. The server will eventually have the same name, but
> the
> > > DB files will be in different locations (paths). Are there any
> links I
> > > should check out or MSFT KB articles? I tried searching but wasn't
> > > able to get anything for my specific issues. (Also, upgrading
> Windows
> > > 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
> > >
>

Moving ALL DBs to new server

I am building a new SQL server and would like to copy ALL DBs (user and
system) to it. The server will eventually have the same name, but the
DB files will be in different locations (paths). Are there any links I
should check out or MSFT KB articles? I tried searching but wasn't
able to get anything for my specific issues. (Also, upgrading Windows
2000 to Windows 2003, but still on SQL Server 2000 SP3.)I found this one.
http://support.microsoft.com/default.aspx/kb/224071
"tommydogs@.sickoflosers.com" wrote:

> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>|||In addition to the link posted by Jen, here are some more articles that you
may find helpful:
INF: Disaster Recovery Articles for Microsoft SQL Server
http://www.support.microsoft.com/?id=307775
INF: Moving SQL Server databases to a new location with Detach/Attach
http://www.support.microsoft.com/?id=224071
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://www.support.microsoft.com/?id=314546
INF: Using the WITH MOVE Option with the RESTORE Statement
http://support.microsoft.com/?id=221465
PRB: User Logon and/or Permission Errors After Restoring Dump
http://www.support.microsoft.com/?id=168001
HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
http://www.support.microsoft.com/?id=246133
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://www.support.microsoft.com/?id=274188
How to Resolve Permission Issues When a Database Is Moved Between SQL
Servers
http://www.support.microsoft.com/?id=240872
SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases When
Database Is Moved
http://www.support.microsoft.com/?id=298897
Utility to map users to the correct login
http://www.dbmaint.com/SyncSqlLogins.asp
Keith
<tommydogs@.sickoflosers.com> wrote in message
news:1107283271.072157.290890@.c13g2000cwb.googlegroups.com...
> I am building a new SQL server and would like to copy ALL DBs (user and
> system) to it. The server will eventually have the same name, but the
> DB files will be in different locations (paths). Are there any links I
> should check out or MSFT KB articles? I tried searching but wasn't
> able to get anything for my specific issues. (Also, upgrading Windows
> 2000 to Windows 2003, but still on SQL Server 2000 SP3.)
>|||Thanks for the help! One of the questions I have that doesn't seem to
be answered is this: I detach all user DBs from my current SQL server,
then copy over the master, model, msdb, & tempdb system DBs to the new
server. Can I then copy and reattach user DB files?
Keith Kratochvil wrote:
> In addition to the link posted by Jen, here are some more articles
that you
> may find helpful:
>
>
> INF: Disaster Recovery Articles for Microsoft SQL Server
> http://www.support.microsoft.com/?id=307775
> INF: Moving SQL Server databases to a new location with Detach/Attach
> http://www.support.microsoft.com/?id=224071
> HOW TO: Move Databases Between Computers That Are Running SQL Server
> http://www.support.microsoft.com/?id=314546
> INF: Using the WITH MOVE Option with the RESTORE Statement
> http://support.microsoft.com/?id=221465
> PRB: User Logon and/or Permission Errors After Restoring Dump
> http://www.support.microsoft.com/?id=168001
> HOW TO: Transfer Logins and Passwords Between Instances of SQL Server
> http://www.support.microsoft.com/?id=246133
> PRB: "Troubleshooting Orphaned Users" Topic in Books Online is
Incomplete
> http://www.support.microsoft.com/?id=274188
> How to Resolve Permission Issues When a Database Is Moved Between SQL
> Servers
> http://www.support.microsoft.com/?id=240872
> SAMPLE: Mapsids.exe Helps Map SIDs Between User and Master Databases
When[vbcol=seagreen]
> Database Is Moved
> http://www.support.microsoft.com/?id=298897
>
> Utility to map users to the correct login
> http://www.dbmaint.com/SyncSqlLogins.asp
>
> --
> Keith
>
> <tommydogs@.sickoflosers.com> wrote in message
> news:1107283271.072157.290890@.c13g2000cwb.googlegroups.com...
and[vbcol=seagreen]
the[vbcol=seagreen]
links I[vbcol=seagreen]
Windows[vbcol=seagreen]|||I've just recently had to move my database to other server. A mirror in fact
.
The faster way to move and get them running was stopping sql services copy
the .ldf and .mdf files to the other server. Copy the folder \mssql\data to
the other server and start the services.
It worked.
But i think it wont work for you since you're gonna place db on different
paths.
Hope you dont have a bad time doing that
"tommydogs@.sickoflosers.com" wrote:

> Thanks for the help! One of the questions I have that doesn't seem to
> be answered is this: I detach all user DBs from my current SQL server,
> then copy over the master, model, msdb, & tempdb system DBs to the new
> server. Can I then copy and reattach user DB files?
>
> Keith Kratochvil wrote:
> that you
> Incomplete
> When
> and
> the
> links I
> Windows
>

Wednesday, March 28, 2012

Moving a DB from SQL 2005 to SQL 2000

Hello all,
This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
SSMS, on the SQL 2005 server, I change the compatibility level for the DB to
SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files over to
the SQL 2000 server and try to reatach the DB on that server. I keep
getting the following error:
TITLE: Microsoft SQL Server Management Studio
--
Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?Prod...er&LinkId=20476
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
Could not find row in sysindexes for database ID 8, object ID 1, index ID 1.
Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 602)
For help, click:
http://go.microsoft.com/fwlink?Prod...02&LinkId=20476
BUTTONS:
OK
--
Why will this not work? I look at the system tables in the DB on the 2005
server before detaching and the sysindexes table does not exist. There is
only one single table in the system tables and that is sysdiagrams.
What is the point of having a compatibility level if they are not
compatible?
Thanks for any help anyone can provide,
Conan KellyConan,
The SQL2005 database physical format is not compatible with SQL 2000.
You will need to generate scripts to create the database and all the objects
in it. Right click on your 2005 database and:
Script Database as
Create to
Then again:
Tasks
Generate Scripts...
Once you have created the database and necessary objects
Tasks
Export Data ...
Be sure that you set scripting options to SQL Server 2000. In SP2 (at
least) you can set the scripting to be in SQL Server 2000 mode.
RLF
"Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
> Hello all,
> This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
> SSMS, on the SQL 2005 server, I change the compatibility level for the DB
> to SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files
> over to the SQL 2000 server and try to reatach the DB on that server. I
> keep getting the following error:
> TITLE: Microsoft SQL Server Management Studio
> --
> Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...er&LinkId=20476
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> Could not find row in sysindexes for database ID 8, object ID 1, index ID
> 1. Run DBCC CHECKTABLE on sysindexes.
> Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
> (Microsoft SQL Server, Error: 602)
> For help, click:
> http://go.microsoft.com/fwlink?Prod...02&LinkId=20476
> --
> BUTTONS:
> OK
> --
> Why will this not work? I look at the system tables in the DB on the 2005
> server before detaching and the sysindexes table does not exist. There is
> only one single table in the system tables and that is sysdiagrams.
> What is the point of having a compatibility level if they are not
> compatible?
> Thanks for any help anyone can provide,
> Conan Kelly
>|||Russell,
Thank you for the feed back.
So even if you have the "Compatibility Level" in the DB's properties set to
SQL Server 2000 (80), one can't "detach-copy files-attach" from 2005 to
2000? What's the point of Compatibility Level then?
Thanks again for all of your help,
Conan
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:OzEWJcJpHHA.1776@.TK2MSFTNGP05.phx.gbl...
> Conan,
> The SQL2005 database physical format is not compatible with SQL 2000.
> You will need to generate scripts to create the database and all the
> objects in it. Right click on your 2005 database and:
> Script Database as
> Create to
> Then again:
> Tasks
> Generate Scripts...
> Once you have created the database and necessary objects
> Tasks
> Export Data ...
> Be sure that you set scripting options to SQL Server 2000. In SP2 (at
> least) you can set the scripting to be in SQL Server 2000 mode.
> RLF
> "Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
> news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
>|||https://blogs.msdn.com/sqlserversto...lity-level.aspx
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
news:_L18i.88375$p47.25092@.bgtnsc04-news.ops.worldnet.att.net...
> Russell,
> Thank you for the feed back.
> So even if you have the "Compatibility Level" in the DB's properties set
> to SQL Server 2000 (80), one can't "detach-copy files-attach" from 2005 to
> 2000? What's the point of Compatibility Level then?
> Thanks again for all of your help,
> Conan
>
>
>
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:OzEWJcJpHHA.1776@.TK2MSFTNGP05.phx.gbl...
>

Moving a DB from SQL 2005 to SQL 2000

Hello all,
This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
SSMS, on the SQL 2005 server, I change the compatibility level for the DB to
SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files over to
the SQL 2000 server and try to reatach the DB on that server. I keep
getting the following error:
TITLE: Microsoft SQL Server Management Studio
--
Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
--
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
Could not find row in sysindexes for database ID 8, object ID 1, index ID 1.
Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 602)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
--
BUTTONS:
OK
--
Why will this not work? I look at the system tables in the DB on the 2005
server before detaching and the sysindexes table does not exist. There is
only one single table in the system tables and that is sysdiagrams.
What is the point of having a compatibility level if they are not
compatible?
Thanks for any help anyone can provide,
Conan KellyConan,
The SQL2005 database physical format is not compatible with SQL 2000.
You will need to generate scripts to create the database and all the objects
in it. Right click on your 2005 database and:
Script Database as
Create to
Then again:
Tasks
Generate Scripts...
Once you have created the database and necessary objects
Tasks
Export Data ...
Be sure that you set scripting options to SQL Server 2000. In SP2 (at
least) you can set the scripting to be in SQL Server 2000 mode.
RLF
"Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
> Hello all,
> This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
> SSMS, on the SQL 2005 server, I change the compatibility level for the DB
> to SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files
> over to the SQL 2000 server and try to reatach the DB on that server. I
> keep getting the following error:
> TITLE: Microsoft SQL Server Management Studio
> --
> Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> Could not find row in sysindexes for database ID 8, object ID 1, index ID
> 1. Run DBCC CHECKTABLE on sysindexes.
> Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
> (Microsoft SQL Server, Error: 602)
> For help, click:
> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
> --
> BUTTONS:
> OK
> --
> Why will this not work? I look at the system tables in the DB on the 2005
> server before detaching and the sysindexes table does not exist. There is
> only one single table in the system tables and that is sysdiagrams.
> What is the point of having a compatibility level if they are not
> compatible?
> Thanks for any help anyone can provide,
> Conan Kelly
>|||Russell,
Thank you for the feed back.
So even if you have the "Compatibility Level" in the DB's properties set to
SQL Server 2000 (80), one can't "detach-copy files-attach" from 2005 to
2000? What's the point of Compatibility Level then?
Thanks again for all of your help,
Conan
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:OzEWJcJpHHA.1776@.TK2MSFTNGP05.phx.gbl...
> Conan,
> The SQL2005 database physical format is not compatible with SQL 2000.
> You will need to generate scripts to create the database and all the
> objects in it. Right click on your 2005 database and:
> Script Database as
> Create to
> Then again:
> Tasks
> Generate Scripts...
> Once you have created the database and necessary objects
> Tasks
> Export Data ...
> Be sure that you set scripting options to SQL Server 2000. In SP2 (at
> least) you can set the scripting to be in SQL Server 2000 mode.
> RLF
> "Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
> news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
>> Hello all,
>> This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
>> SSMS, on the SQL 2005 server, I change the compatibility level for the DB
>> to SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files
>> over to the SQL 2000 server and try to reatach the DB on that server. I
>> keep getting the following error:
>> TITLE: Microsoft SQL Server Management Studio
>> --
>> Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
>> For help, click:
>> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
>> --
>> ADDITIONAL INFORMATION:
>> An exception occurred while executing a Transact-SQL statement or batch.
>> (Microsoft.SqlServer.ConnectionInfo)
>> --
>> Could not find row in sysindexes for database ID 8, object ID 1, index ID
>> 1. Run DBCC CHECKTABLE on sysindexes.
>> Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
>> (Microsoft SQL Server, Error: 602)
>> For help, click:
>> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
>> --
>> BUTTONS:
>> OK
>> --
>> Why will this not work? I look at the system tables in the DB on the
>> 2005 server before detaching and the sysindexes table does not exist.
>> There is only one single table in the system tables and that is
>> sysdiagrams.
>> What is the point of having a compatibility level if they are not
>> compatible?
>> Thanks for any help anyone can provide,
>> Conan Kelly
>|||https://blogs.msdn.com/sqlserverstorageengine/archive/2007/04/26/what-s-the-difference-between-database-version-and-database-compatibility-level.aspx
--
Tony Rogerson, SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson
[Ramblings from the field from a SQL consultant]
http://sqlserverfaq.com
[UK SQL User Community]
"Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
news:_L18i.88375$p47.25092@.bgtnsc04-news.ops.worldnet.att.net...
> Russell,
> Thank you for the feed back.
> So even if you have the "Compatibility Level" in the DB's properties set
> to SQL Server 2000 (80), one can't "detach-copy files-attach" from 2005 to
> 2000? What's the point of Compatibility Level then?
> Thanks again for all of your help,
> Conan
>
>
>
> "Russell Fields" <russellfields@.nomail.com> wrote in message
> news:OzEWJcJpHHA.1776@.TK2MSFTNGP05.phx.gbl...
>> Conan,
>> The SQL2005 database physical format is not compatible with SQL 2000.
>> You will need to generate scripts to create the database and all the
>> objects in it. Right click on your 2005 database and:
>> Script Database as
>> Create to
>> Then again:
>> Tasks
>> Generate Scripts...
>> Once you have created the database and necessary objects
>> Tasks
>> Export Data ...
>> Be sure that you set scripting options to SQL Server 2000. In SP2 (at
>> least) you can set the scripting to be in SQL Server 2000 mode.
>> RLF
>> "Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
>> news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
>> Hello all,
>> This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
>> SSMS, on the SQL 2005 server, I change the compatibility level for the
>> DB to SQL Server 2000(80). Then I detach the DB from SQL 2005, copy
>> files over to the SQL 2000 server and try to reatach the DB on that
>> server. I keep getting the following error:
>> TITLE: Microsoft SQL Server Management Studio
>> --
>> Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
>> For help, click:
>> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
>> --
>> ADDITIONAL INFORMATION:
>> An exception occurred while executing a Transact-SQL statement or batch.
>> (Microsoft.SqlServer.ConnectionInfo)
>> --
>> Could not find row in sysindexes for database ID 8, object ID 1, index
>> ID 1. Run DBCC CHECKTABLE on sysindexes.
>> Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
>> (Microsoft SQL Server, Error: 602)
>> For help, click:
>> http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=602&LinkId=20476
>> --
>> BUTTONS:
>> OK
>> --
>> Why will this not work? I look at the system tables in the DB on the
>> 2005 server before detaching and the sysindexes table does not exist.
>> There is only one single table in the system tables and that is
>> sysdiagrams.
>> What is the point of having a compatibility level if they are not
>> compatible?
>> Thanks for any help anyone can provide,
>> Conan Kelly
>>
>

Moving a DB from SQL 2005 to SQL 2000

Hello all,
This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
SSMS, on the SQL 2005 server, I change the compatibility level for the DB to
SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files over to
the SQL 2000 server and try to reatach the DB on that server. I keep
getting the following error:
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Attach+database+Server&LinkId=20476[/url]
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
Could not find row in sysindexes for database ID 8, object ID 1, index ID 1.
Run DBCC CHECKTABLE on sysindexes.
Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
(Microsoft SQL Server, Error: 602)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=602&LinkId=20476[/url]
BUTTONS:
OK
Why will this not work? I look at the system tables in the DB on the 2005
server before detaching and the sysindexes table does not exist. There is
only one single table in the system tables and that is sysdiagrams.
What is the point of having a compatibility level if they are not
compatible?
Thanks for any help anyone can provide,
Conan Kelly
Conan,
The SQL2005 database physical format is not compatible with SQL 2000.
You will need to generate scripts to create the database and all the objects
in it. Right click on your 2005 database and:
Script Database as
Create to
Then again:
Tasks
Generate Scripts...
Once you have created the database and necessary objects
Tasks
Export Data ...
Be sure that you set scripting options to SQL Server 2000. In SP2 (at
least) you can set the scripting to be in SQL Server 2000 mode.
RLF
"Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
> Hello all,
> This anoying me!!! I'm trying to copy one of our DB's to SQL 2000. In
> SSMS, on the SQL 2005 server, I change the compatibility level for the DB
> to SQL Server 2000(80). Then I detach the DB from SQL 2005, copy files
> over to the SQL 2000 server and try to reatach the DB on that server. I
> keep getting the following error:
> TITLE: Microsoft SQL Server Management Studio
> --
> Attach database failed for Server 'MPS-DC01'. (Microsoft.SqlServer.Smo)
> For help, click:
> [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Attach+database+Server&LinkId=20476[/url]
> --
> ADDITIONAL INFORMATION:
> An exception occurred while executing a Transact-SQL statement or batch.
> (Microsoft.SqlServer.ConnectionInfo)
> --
> Could not find row in sysindexes for database ID 8, object ID 1, index ID
> 1. Run DBCC CHECKTABLE on sysindexes.
> Could not open new database 'xxxxxxxxxxxx'. CREATE DATABASE is aborted.
> (Microsoft SQL Server, Error: 602)
> For help, click:
> [url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLS erver&EvtID=602&LinkId=20476[/url]
> --
> BUTTONS:
> OK
> --
> Why will this not work? I look at the system tables in the DB on the 2005
> server before detaching and the sysindexes table does not exist. There is
> only one single table in the system tables and that is sysdiagrams.
> What is the point of having a compatibility level if they are not
> compatible?
> Thanks for any help anyone can provide,
> Conan Kelly
>
|||Russell,
Thank you for the feed back.
So even if you have the "Compatibility Level" in the DB's properties set to
SQL Server 2000 (80), one can't "detach-copy files-attach" from 2005 to
2000? What's the point of Compatibility Level then?
Thanks again for all of your help,
Conan
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:OzEWJcJpHHA.1776@.TK2MSFTNGP05.phx.gbl...
> Conan,
> The SQL2005 database physical format is not compatible with SQL 2000.
> You will need to generate scripts to create the database and all the
> objects in it. Right click on your 2005 database and:
> Script Database as
> Create to
> Then again:
> Tasks
> Generate Scripts...
> Once you have created the database and necessary objects
> Tasks
> Export Data ...
> Be sure that you set scripting options to SQL Server 2000. In SP2 (at
> least) you can set the scripting to be in SQL Server 2000 mode.
> RLF
> "Conan Kelly" <CTBarbarinNOSPAM@.msnNOSPAM.comNOSPAM> wrote in message
> news:ms%7i.87779$p47.73245@.bgtnsc04-news.ops.worldnet.att.net...
>
sql

Friday, March 23, 2012

Moving a big database

What is the best way to move a 15gb database. Copy the
files from 1 server to the other (the network connection
is pretty quick) or to backup then restore using a DAT
tape?Probably sp_detach_db and sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"mat" <anonymous@.discussions.microsoft.com> wrote in message
news:11c3001c410c4$f7b18fe0$a301280a@.phx
.gbl...
> What is the best way to move a 15gb database. Copy the
> files from 1 server to the other (the network connection
> is pretty quick) or to backup then restore using a DAT
> tape?|||Hi,
I too agree Tibers comments. Because the backup of 15 GB database will take
20 Minutes and then Restore will take another 30 minutes. But if you go with
Tibers comment it will just take only copy time from source to destination.
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:OcXNXZMEEHA.2424@.TK2MSFTNGP09.phx.gbl...
> Probably sp_detach_db and sp_attach_db.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "mat" <anonymous@.discussions.microsoft.com> wrote in message
> news:11c3001c410c4$f7b18fe0$a301280a@.phx
.gbl...
>|||And if you need to do this 'move' on a regular basis you should really check
out SQL Lite Speed which will compress the backup as it's happening. This
will save a LOT of space, but more importantly will make the file copy a lot
faster since the file is a lot smaller...
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:eA7XnzMEEHA.1128@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I too agree Tibers comments. Because the backup of 15 GB database will
take
> 20 Minutes and then Restore will take another 30 minutes. But if you go
with
> Tibers comment it will just take only copy time from source to
destination.
> Thanks
> Hari
> MCDBA
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
in
> message news:OcXNXZMEEHA.2424@.TK2MSFTNGP09.phx.gbl...
>

Moving .ldf to new drive, doesn't work gives "Cannot associate files with different datab

I am trying to move a log file to a non-RAID drive. I have detached
the database and made a copy of the .ldf file. I have taken this copy
of the .ldf file and placed it where I want it to be. I would like to
keep the .mdf file where it is located on the RAID drive, but for some
reason I can only reattach if the .ldf file is in the same location as
the .mdf file.
I have then run:
USE MASTER
GO
EXEC sp_attach_db @.dbname = N'Corporate',
@.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
@.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
And it returns:
Server: Msg 5173, Level 16, State 2, Line 1
Cannot associate files with different databases.
Is this possible?The procedure you described should work fine. But I suspect your .ldf file is
not really from that database.
Linchi
"caperneus@.gmail.com" wrote:
> I am trying to move a log file to a non-RAID drive. I have detached
> the database and made a copy of the .ldf file. I have taken this copy
> of the .ldf file and placed it where I want it to be. I would like to
> keep the .mdf file where it is located on the RAID drive, but for some
> reason I can only reattach if the .ldf file is in the same location as
> the .mdf file.
> I have then run:
> USE MASTER
> GO
> EXEC sp_attach_db @.dbname = N'Corporate',
> @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
> @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
> And it returns:
> Server: Msg 5173, Level 16, State 2, Line 1
> Cannot associate files with different databases.
> Is this possible?
>|||On Jun 14, 2:44 pm, Linchi Shea <LinchiS...@.discussions.microsoft.com>
wrote:
> The procedure you described should work fine. But I suspect your .ldf file is
> not really from that database.
> Linchi
> "capern...@.gmail.com" wrote:
> > I am trying to move a log file to a non-RAID drive. I have detached
> > the database and made a copy of the .ldf file. I have taken this copy
> > of the .ldf file and placed it where I want it to be. I would like to
> > keep the .mdf file where it is located on the RAID drive, but for some
> > reason I can only reattach if the .ldf file is in the same location as
> > the .mdf file.
> > I have then run:
> > USE MASTER
> > GO
> > EXEC sp_attach_db @.dbname = N'Corporate',
> > @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
> > @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
> > And it returns:
> > Server: Msg 5173, Level 16, State 2, Line 1
> > Cannot associate files with different databases.
> > Is this possible?
It is really from that database. I can attach it back with no problems
if the files are in the same directory.|||Instead of detached and attached try backup and restore ...
BACKUP DATABASE Corporate
TO DISK = 'E:\backup_corporate.bak'
WITH INIT
Drop the database, and delete the mdf and ldf file (or just back it up)
Then the Restore:
RESTORE DATABASE Corporate
FROM DISK = 'E:\backup_corporate.bak'
WITH RECOVERY,
MOVE '[datafilelogicalname]' TO 'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
MOVE '[loglogicalname]' TO 'E:\Web\Corporate\Corporate_Log.ldf'
Hope that works.
Lucas
<caperneus@.gmail.com> wrote in message
news:1181852163.020692.243720@.a26g2000pre.googlegroups.com...
> On Jun 14, 2:44 pm, Linchi Shea <LinchiS...@.discussions.microsoft.com>
> wrote:
>> The procedure you described should work fine. But I suspect your .ldf
>> file is
>> not really from that database.
>> Linchi
>> "capern...@.gmail.com" wrote:
>> > I am trying to move a log file to a non-RAID drive. I have detached
>> > the database and made a copy of the .ldf file. I have taken this copy
>> > of the .ldf file and placed it where I want it to be. I would like to
>> > keep the .mdf file where it is located on the RAID drive, but for some
>> > reason I can only reattach if the .ldf file is in the same location as
>> > the .mdf file.
>> > I have then run:
>> > USE MASTER
>> > GO
>> > EXEC sp_attach_db @.dbname = N'Corporate',
>> > @.filename1 = N'F:\Web\MSSQL$WEB\Data\Corporate_Data.mdf',
>> > @.filename2 = N'E:\Web\Corporate\Corporate_Log.ldf'
>> > And it returns:
>> > Server: Msg 5173, Level 16, State 2, Line 1
>> > Cannot associate files with different databases.
>> > Is this possible?
> It is really from that database. I can attach it back with no problems
> if the files are in the same directory.
>

Wednesday, March 21, 2012

Move/Copy Table(s) Between Databases

I need to learn how to move or copy a couple of tables from one database to another. The tables are defined but contain no data.Quick and easy an INSERT INTO statement but avoid SELECT INTO. Run a search for both in the BOL(books online). Hope this helps.|||Thanks Caddre but I've learned I can use the 'Export Data' DTS Wizard which is fast and easy.

move/copy database objects from SQL Server Express to SQL Server Standard?

Can anyone refer me to good 'recipes' or sources of information on this
topic??

I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.

Thank you, TomHi Tom

If the objects are on source code control you may just want to check out the
scripts and run them through SQLCMD.

If you want the whole database then you can either use backup/restore or
sp_detach_db/sp_attach_db, failing that you could use the import/export
wizard, If SQLExpress is does not allow external connections then you will
need to push it (export) from the SQLExpress machine.

Check out http://support.microsoft.com/kb/314546
John

"tlyczko" <tlyczko@.gmail.comwrote in message
news:1157561832.911996.148780@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Can anyone refer me to good 'recipes' or sources of information on this
topic??
>
I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.
>
Thank you, Tom
>

|||I should have said SS 2005 Developer, not Express, I am installing SS
2005 Dev to my workstation here.

But everything you said should work, I just have to learn how!!!!!!!!

I will read the KB article, I suppose I could learn SSIS for just
tables or queries etc., or even just re-create the queries on the SS
dev box.

Thanks a lot for answering!!

:) tom

John Bell wrote:

Quote:

Originally Posted by

Hi Tom
>
If the objects are on source code control you may just want to check out the
scripts and run them through SQLCMD.
>
If you want the whole database then you can either use backup/restore or
sp_detach_db/sp_attach_db, failing that you could use the import/export
wizard, If SQLExpress is does not allow external connections then you will
need to push it (export) from the SQLExpress machine.
>
Check out http://support.microsoft.com/kb/314546
>
John
>
>
"tlyczko" <tlyczko@.gmail.comwrote in message
news:1157561832.911996.148780@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

Can anyone refer me to good 'recipes' or sources of information on this
topic??

I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.

Thank you, Tom

|||tlyczko wrote:

Quote:

Originally Posted by

I should have said SS 2005 Developer, not Express, I am installing SS
2005 Dev to my workstation here.


I found this link, I can't remember where:

http://blogs.msdn.com/euanga/archiv.../18/668916.aspx
HTH tom

move/copy database items from SS 2005 Express to SS 2005 Standard?

Can anyone refer me to good 'recipes' or sources of information on this
topic'
I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.
Thank you, TomYou can:
1. Using SSMS, script out the code to re-create the table, views, queries,
etc.
2. Using SSIS, Transfer the entire database, schema and/or data
3. Pull your script files from source control, thereby making sure that
nothing is moved to the production server except items that 'should' be
moved to production. (You are using source control, aren't you?)
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"tlyczko" <tlyczko@.gmail.com> wrote in message
news:1157562224.879951.99990@.e3g2000cwe.googlegroups.com...
> Can anyone refer me to good 'recipes' or sources of information on this
> topic'
> I have Visual Studio Tools for Office, which installs SS 2005 Express
> locally to my XP box, and I want to develop in SS 2005, then copy the
> tables or queries or reports etc. to a SS 2005 Standard server.
> Thank you, Tom
>|||I don't know anything yet about source control...do you mean Visual
SourceSafe'
I tried looking around a few months ago for decent documentation,
how-to, etc. about VSS 2005, and I didn't find anything, it was not
terribly intuitive either...
I don't always need to transfer the entire database either, I might
only have to transfer a query, for example.
Or I might have to refresh the tables in my dev workstation from the
main server...
Thank you,
Tom
Arnie Rowland wrote:[vbcol=seagreen]
> You can:
> 1. Using SSMS, script out the code to re-create the table, views, queries,
> etc.
> 2. Using SSIS, Transfer the entire database, schema and/or data
> 3. Pull your script files from source control, thereby making sure that
> nothing is moved to the production server except items that 'should' be
> moved to production. (You are using source control, aren't you?)
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "tlyczko" <tlyczko@.gmail.com> wrote in message
> news:1157562224.879951.99990@.e3g2000cwe.googlegroups.com...|||Visual SourceSafe is but one of many source control products, albeit one
that is included with Visual Studio.
You might find part 4 of this tutorial useful for an introductory view of
Sourcesafe.
http://msdn2.microsoft.com/en-us/library/ms167593.aspx
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"tlyczko" <tlyczko@.gmail.com> wrote in message
news:1157567635.523378.239270@.p79g2000cwp.googlegroups.com...
>I don't know anything yet about source control...do you mean Visual
> SourceSafe'
> I tried looking around a few months ago for decent documentation,
> how-to, etc. about VSS 2005, and I didn't find anything, it was not
> terribly intuitive either...
> I don't always need to transfer the entire database either, I might
> only have to transfer a query, for example.
> Or I might have to refresh the tables in my dev workstation from the
> main server...
> Thank you,
> Tom
> Arnie Rowland wrote:
>|||Visual SourceSafe didn't come with our Visual Studio...
Thank you for sending the link, I think I remember that Perforce makes
a single-user version that I could use...I'll check their website.
Thank you, Tom

> Most good judgment comes from experience.
> Most experience comes from bad judgment.
Agreed.
Thank you, Tom

move/copy database items from SS 2005 Express to SS 2005 Standard?

Can anyone refer me to good 'recipes' or sources of information on this
topic'
I have Visual Studio Tools for Office, which installs SS 2005 Express
locally to my XP box, and I want to develop in SS 2005, then copy the
tables or queries or reports etc. to a SS 2005 Standard server.
Thank you, TomYou can:
1. Using SSMS, script out the code to re-create the table, views, queries,
etc.
2. Using SSIS, Transfer the entire database, schema and/or data
3. Pull your script files from source control, thereby making sure that
nothing is moved to the production server except items that 'should' be
moved to production. (You are using source control, aren't you?)
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"tlyczko" <tlyczko@.gmail.com> wrote in message
news:1157562224.879951.99990@.e3g2000cwe.googlegroups.com...
> Can anyone refer me to good 'recipes' or sources of information on this
> topic'
> I have Visual Studio Tools for Office, which installs SS 2005 Express
> locally to my XP box, and I want to develop in SS 2005, then copy the
> tables or queries or reports etc. to a SS 2005 Standard server.
> Thank you, Tom
>|||I don't know anything yet about source control...do you mean Visual
SourceSafe'
I tried looking around a few months ago for decent documentation,
how-to, etc. about VSS 2005, and I didn't find anything, it was not
terribly intuitive either...
I don't always need to transfer the entire database either, I might
only have to transfer a query, for example.
Or I might have to refresh the tables in my dev workstation from the
main server...
Thank you,
Tom
Arnie Rowland wrote:
> You can:
> 1. Using SSMS, script out the code to re-create the table, views, queries,
> etc.
> 2. Using SSIS, Transfer the entire database, schema and/or data
> 3. Pull your script files from source control, thereby making sure that
> nothing is moved to the production server except items that 'should' be
> moved to production. (You are using source control, aren't you?)
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "tlyczko" <tlyczko@.gmail.com> wrote in message
> news:1157562224.879951.99990@.e3g2000cwe.googlegroups.com...
> > Can anyone refer me to good 'recipes' or sources of information on this
> > topic'
> >
> > I have Visual Studio Tools for Office, which installs SS 2005 Express
> > locally to my XP box, and I want to develop in SS 2005, then copy the
> > tables or queries or reports etc. to a SS 2005 Standard server.
> >
> > Thank you, Tom
> >|||Visual SourceSafe is but one of many source control products, albeit one
that is included with Visual Studio.
You might find part 4 of this tutorial useful for an introductory view of
Sourcesafe.
http://msdn2.microsoft.com/en-us/library/ms167593.aspx
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"tlyczko" <tlyczko@.gmail.com> wrote in message
news:1157567635.523378.239270@.p79g2000cwp.googlegroups.com...
>I don't know anything yet about source control...do you mean Visual
> SourceSafe'
> I tried looking around a few months ago for decent documentation,
> how-to, etc. about VSS 2005, and I didn't find anything, it was not
> terribly intuitive either...
> I don't always need to transfer the entire database either, I might
> only have to transfer a query, for example.
> Or I might have to refresh the tables in my dev workstation from the
> main server...
> Thank you,
> Tom
> Arnie Rowland wrote:
>> You can:
>> 1. Using SSMS, script out the code to re-create the table, views,
>> queries,
>> etc.
>> 2. Using SSIS, Transfer the entire database, schema and/or data
>> 3. Pull your script files from source control, thereby making sure that
>> nothing is moved to the production server except items that 'should' be
>> moved to production. (You are using source control, aren't you?)
>> --
>> Arnie Rowland, Ph.D.
>> Westwood Consulting, Inc
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>>
>> "tlyczko" <tlyczko@.gmail.com> wrote in message
>> news:1157562224.879951.99990@.e3g2000cwe.googlegroups.com...
>> > Can anyone refer me to good 'recipes' or sources of information on this
>> > topic'
>> >
>> > I have Visual Studio Tools for Office, which installs SS 2005 Express
>> > locally to my XP box, and I want to develop in SS 2005, then copy the
>> > tables or queries or reports etc. to a SS 2005 Standard server.
>> >
>> > Thank you, Tom
>> >
>|||Visual SourceSafe didn't come with our Visual Studio...
Thank you for sending the link, I think I remember that Perforce makes
a single-user version that I could use...I'll check their website.
Thank you, Tom
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
Agreed.
Thank you, Tom

Move/copy Data base failed from sql 2000 to sql 2005

When I try to copy or move a DB from a sql server 2000 to a sql srvr 2005 using sql 2005 "copy database wizard", I get an error in the SQL Server Agent Job execution.

The two databases are on different PC, and same problem occurs if I try to copy/move a DB from sql 2005 to an other sql 2005 server.

Wizard does not fail if the copy is done on the same machine.

Following is the log generated:


- Add log for package (Success)

- Add task for transferring database objects (Success)

- Create package (Success)

- Start SQL Server Agent Job (Success)

- Execute SQL Server Agent Job (Error)
Messages
* The job failed. Check the event log on the destination server for details. (Copy Database Wizard)

Any Idea to help?

thanks

The easiest way to move a database from SQL Server 2000 to SQL Server 2005 is to detach the database files from SQL Server 2000 and attach them to your SQL Server 2005 instance. To do that:

1) In SQL Server 2000, make a complete backup of your database (better safe than sorry!)

2) Detach the database from SQL Server 2000. You can use SQL Server Management Studio 2005 to do this if you like. Start SSMS, connect to your SQL Server 2000 server, expand the databases folder, right click on your database and select "Tasks > Detach" from the context menu.

3) Copy all the .mdf, .ldf, and .ndf files for your database to a location accessible to your SQL Server 2005 instance. You can use Windows Explorer to do this.

4) Attach the copied files to your SQL Server 2005 instance. You can do this SSMS as well. Connect to your SQL Server 2005 instance, right click on the databases folder and select "Attach" in the context menu. In the Attach Database dialog, you just need to add the .mdf file - the dialog will find the other files if you have copied all of them to the same directory - and click OK.

You can also move your database by restoring a full backup of the SQL Server 2000 database on the SQL Server 2005 server.

Once your database has been attached (or restored), make sure it has a valid owner. If the SQL Server 2000 database was owned by a SQL Authentication login, the new server won't know about the owner on the old server. You can change the database owner to a login the SQL Server 2005 server knows about using the database properties dialog in SSMS - just right click on the new database and select properties. The owner is defined on the "Files" page of the dialog.

Hope this helps,
Steve

sql

Move/copy Data base failed from sql 2000 to sql 2005

When I try to copy or move a DB from a sql server 2000 to a sql srvr 2005 using sql 2005 "copy database wizard", I get an error in the SQL Server Agent Job execution.

The two databases are on different PC, and same problem occurs if I try to copy/move a DB from sql 2005 to an other sql 2005 server.

Wizard does not fail if the copy is done on the same machine.

Following is the log generated:


- Add log for package (Success)

- Add task for transferring database objects (Success)

- Create package (Success)

- Start SQL Server Agent Job (Success)

- Execute SQL Server Agent Job (Error)
Messages
* The job failed. Check the event log on the destination server for details. (Copy Database Wizard)

Any Idea to help?

thanks

The easiest way to move a database from SQL Server 2000 to SQL Server 2005 is to detach the database files from SQL Server 2000 and attach them to your SQL Server 2005 instance. To do that:

1) In SQL Server 2000, make a complete backup of your database (better safe than sorry!)

2) Detach the database from SQL Server 2000. You can use SQL Server Management Studio 2005 to do this if you like. Start SSMS, connect to your SQL Server 2000 server, expand the databases folder, right click on your database and select "Tasks > Detach" from the context menu.

3) Copy all the .mdf, .ldf, and .ndf files for your database to a location accessible to your SQL Server 2005 instance. You can use Windows Explorer to do this.

4) Attach the copied files to your SQL Server 2005 instance. You can do this SSMS as well. Connect to your SQL Server 2005 instance, right click on the databases folder and select "Attach" in the context menu. In the Attach Database dialog, you just need to add the .mdf file - the dialog will find the other files if you have copied all of them to the same directory - and click OK.

You can also move your database by restoring a full backup of the SQL Server 2000 database on the SQL Server 2005 server.

Once your database has been attached (or restored), make sure it has a valid owner. If the SQL Server 2000 database was owned by a SQL Authentication login, the new server won't know about the owner on the old server. You can change the database owner to a login the SQL Server 2005 server knows about using the database properties dialog in SSMS - just right click on the new database and select properties. The owner is defined on the "Files" page of the dialog.

Hope this helps,
Steve

Monday, March 12, 2012

Move replicated database to a new server

I have the intention to move SQLserver (used with dynamic merge replication,
also distributor) from an old server to a new one. Can I copy all the files
to the new server without reconfiguration?
If the server has the same netbios name then restoring master, msdb,
distribution and the published database is a possibility. Have a look in BOL
for the topic "Strategies for Backing Up and Restoring Merge Replication".
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .

Friday, March 9, 2012

Move job to different server

Thanks in advance!
I have several jobs (most scripted in activeX) that I need to move to a different server. Is there an easy way to "copy and paste" them from one server to the other? (SQL7 to SQL2k)Not to copy and paste, however you can create a DTS package to transfer the jobs to another server.

Go to Enterprise manager
Data Transformation Services
Local Package
Local Package
New Package
Under the Task choose 15 - Transfer jobs tasks.

And that should do it.

Lystra|||Or you can script the job, modify the script and run it on the new server with osql, or from QA|||If you right click on the job in question, select All tasks and select "Script Job" (in SQL7) or "Generate SQL Script" (in SQL2k) you can create an SQL script which can be run on the new server via Query analyser. If you want all the jobs to be transferred then right click on jobs and do the same.|||Brett, how do you script a job. Can you please explain.

Thanks

Lystra|||If you right click on the job in question, select All tasks and select "Script Job" (in SQL7) or "Generate SQL Script" (in SQL2k) you can create an SQL script which can be run on the new server via Query analyser. If you want all the jobs to be transferred then right click on jobs and do the same.

Is that good enough?|||I've never tried it from 7.0 to SQL-2000, but can't you just use the File | Save-As menu item?

-PatP|||I've never tried it from 7.0 to SQL-2000, but can't you just use the File | Save-As menu item?

-PatP

?????????????????? ???????|||I created the activeX in note pad first. Then I choose New Job >> Steps >> New>> selected ActiveX and copied and pasted the script. Most of the jobs have more than one step that is why I was hoping to "Copy and Paste" the entire jobs. I have a total of 24 to move to a different server.
Again thanks for the help,
Lee