Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts

Wednesday, March 28, 2012

Moving a SQL2K publisher to a SQL 2005 instance.

Hi,

I have to move a SQL2K instance (publisher) to a SQL 2005 instance and i prefer not to re-snapshot all the databases being replicated due to the large size of the databases. As i understand all i need to do is

1. Ensure all published databases are in readonly mode.

2. Stop the replication (by either dropping subscriptions, publication or stopping replication agents).

3. Move the databases to the SQL 2005 instance.

4. Configure a SQL 2005 instance for the distributor (for a SQL 2005 publisher, the distribution database must be a SQL 2005 instance).

5. Setup replication to the SQL2K subscriber but not "initialise" each subscription with a snapshot of the publication data and schema.

Are these the only issues i need to consider?
Any comments greatly appreciated.
Thanks,
Priyanga
Is this merge replication or Transactional.
If it is merge, snapshot will need to be generated no matter how you plan to move to SQL Server 2005.
If it is Transactional, I will need to check/verify.|||Sorry, i forgot to mention.

Its for transactional replication.

Cheers,
Priyanga
|||In SQL Server 2005 Books Online, please take a look at topic:

"Initializing a Transactional Subscription Without a Snapshot".

|||Thanks Greg. This is what i have been looking for.

Cheers,
Priyanga
|||

Hi Greg,

I have encountered a problem implementing this solution....

Not initialising the subscription upon its creation at the subscriber enables me to not have to re-snapshot the publication but this does not create the system procedures on the subscribed database which SQL 2005 needs to support replication.

For example, with a SQL 2000 replication topology, it executes [dbo].[sp_MSins_Customers] to do an insert to the Customer table at the subscriber but SQL 2005 executes [dbo].[sp_MSins_dboCustomers] which it cannot find unless you reinitialise from a snapshot. We do not want to do this as we’ll need to snapshot about 100GB of data.

Assistance on this matter is greatly appreciated.

Cheers,
Priyanga

|||

You may need to create these procs at the subscriber manually, if you havent have them on th subscribers.

|||Hi Mahesh,

There could be some issues if i create these procedures manually on the subscriber. For example, since the naming of the procedures differ is it possible that the logic of these procedures also differ.

Why doesn't the process of creating a subscription at the subscriber re-create the new procedures which SQL 2005 needs for replication?

I think this should be flagged as a bug as there is no mention that it can't be done in BOL in 2005.

Cheers,
Priyanga|||Hi Priyanga,

You can specify @.sync_type to 'replication support only' when sp_addsubscription is called. It will create appropriate replication system procedure at subscriber.

BOL has detailed instruction to help you do that. Look at topic "How to: Initialize a Subscription Manually (SQL Server Management Studio)" or "How to: Initialize a Subscription Manually (Replication Transact-SQL Programming)", depending you prefer to use UI or procedure.

Please let me know if it works for you.

Peng|||

Priyanga Karunathilake wrote:

I have encountered a problem implementing this solution....


Oops, looks like you already tried with sync_type as either 'replication support only' or 'initialize with backup'. Replication should create system procs on the subscriber database for both case. Have you run logreader and distribution agent after create subscription? Is it a push or pull subscription?|||

Hi Peng,

The log reader and distribution agents are both running after I setup the subscription. It is a pull subscription.

When I try to set up this scenario where I do a pull subscription without initializing the subscription, the new SQL 2005 distribution stored procedures don’t get created on the subscriber. All I see are sp_MSxxx_tablename type stored procedures which is from the SQL 2000 replication and hense I get the error cannot find sp_MSxxx_dbotablename procedure. Note the dbo in the SQL 2005 procedures.

When I do a push subscription without initializing, it successfully creates the SQL 2005 distribution stored procedures on the subscriber. Also, when I do a pull subscription WITH initialize it creates the SQL 2005 distribution stored procedures on the subscriber.

Cheers,

Priyanga

|||Hi Priyanga,

Pull subscription should also creates the system procs on subscriber DB. The name of the procs depends on parameters @.ins_cmd/@.upd_cmd/@.del_cmd when article is created (i.e. sp_addarticle). The default is sp_MSxxx_dbotablename for SQL 2005. How do you create the replication? Through UI and script? You can query sysarticles on publication DB to get the CALL format you are using.

Another piece of information that might be useful is the @.schema_option of the article.

For the subscriber, is it SQL 2000 or 2005?

-Peng

|||Hi Peng,

I am creating the replication using UI.

The subscriber is a SQL 2000 instance. I scripted out the commands during the pull subscription creation.

What i don't understand is why the distribution procedures don't get created for a pull subscription when the subscription is not initialised. They get created for all other scenarios. I'am beginning to think this is a bug in SQL 2005.

Thanks for you assistance.

Priyanga

--BEGIN: Script to be run at Publisher 'INSPIRON\SQL01'--

use [NorthwindPK]

exec sp_addsubscription @.publication = N'NorthwindPK_SQL2005', @.subscriber = N'INSPIRON\SQL02', @.destination_db = N'NorthwindPK', @.sync_type = N'replication support only', @.subscription_type = N'pull', @.update_mode = N'read only'

GO

--END: Script to be run at Publisher 'INSPIRON\SQL01'--

--BEGIN: Script to be run at Subscriber 'INSPIRON\SQL02'--

use [NorthwindPK]

exec sp_addpullsubscription @.publisher = N'INSPIRON\SQL01', @.publication = N'NorthwindPK_SQL2005', @.publisher_db = N'NorthwindPK', @.independent_agent = N'True', @.subscription_type = N'pull', @.description = N'', @.update_mode = N'read only', @.immediate_sync = 1

exec sp_addpullsubscription_agent @.publisher = N'INSPIRON\SQL01', @.publisher_db = N'NorthwindPK', @.publication = N'NorthwindPK_SQL2005', @.subscriber_security_mode = 1, @.subscriber_login = N'', @.subscriber_password = null, @.distributor = N'INSPIRON\SQL01', @.distributor_security_mode = 1, @.distributor_login = N'', @.distributor_password = null, @.enabled_for_syncmgr = N'False', @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0, @.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0, @.active_end_time_of_day = 235959, @.active_start_date = 20051014, @.active_end_date = 99991231, @.alt_snapshot_folder = N'', @.working_directory = N'', @.use_ftp = N'False', @.offloadagent = N'False', @.offloadserver = N'', @.publication_type = 0

GO

--END: Script to be run at Subscriber 'INSPIRON\SQL02'--

|||

Priyanga,

Since the distribution agent on your pull subscriber is effectively SQL2000 binary from way back, it doesn't really understand the commands posted to MSrepl_commands for creating the custom procedures as provided by the 'replication support only' @.sync_type since this is a SQL2005 feature. I can understand your disappointment, but we can't really "fix" this by changing anything in SQL2005.

-Raymond

|||Hi Raymond.

I guess i have to do a full initialise of the subscription when we move to SQL 2005 for our publisher and distributor.....

Do you know whether significant performance enhancements have been made to the speed of initialising a subscription from snaphot?
Taking into consideration that i will be going from a SQL 2005 Publisher and Distributor on separate servers to SQL 2000 subscriber, and have to initialise 150GB of data, would you have an approximate time it might take? The only environemnt stats i can give you is that we have a gigabit network connection, publisher and distributor are 64bit with 16GB memory, all servers connected to SAN and that it would be performed during a scheduled downtime?

Cheers,
Priyanga

Moving a SQL2K publisher to a SQL 2005 instance.

Hi,

I have to move a SQL2K instance (publisher) to a SQL 2005 instance and i prefer not to re-snapshot all the databases being replicated due to the large size of the databases. As i understand all i need to do is

1. Ensure all published databases are in readonly mode.

2. Stop the replication (by either dropping subscriptions, publication or stopping replication agents).

3. Move the databases to the SQL 2005 instance.

4. Configure a SQL 2005 instance for the distributor (for a SQL 2005 publisher, the distribution database must be a SQL 2005 instance).

5. Setup replication to the SQL2K subscriber but not "initialise" each subscription with a snapshot of the publication data and schema.

Are these the only issues i need to consider?
Any comments greatly appreciated.
Thanks,
Priyanga
Is this merge replication or Transactional.
If it is merge, snapshot will need to be generated no matter how you plan to move to SQL Server 2005.
If it is Transactional, I will need to check/verify.|||Sorry, i forgot to mention.

Its for transactional replication.

Cheers,
Priyanga
|||In SQL Server 2005 Books Online, please take a look at topic:

"Initializing a Transactional Subscription Without a Snapshot".

|||Thanks Greg. This is what i have been looking for.

Cheers,
Priyanga
|||

Hi Greg,

I have encountered a problem implementing this solution....

Not initialising the subscription upon its creation at the subscriber enables me to not have to re-snapshot the publication but this does not create the system procedures on the subscribed database which SQL 2005 needs to support replication.

For example, with a SQL 2000 replication topology, it executes [dbo].[sp_MSins_Customers] to do an insert to the Customer table at the subscriber but SQL 2005 executes [dbo].[sp_MSins_dboCustomers] which it cannot find unless you reinitialise from a snapshot. We do not want to do this as we’ll need to snapshot about 100GB of data.

Assistance on this matter is greatly appreciated.

Cheers,
Priyanga

|||

You may need to create these procs at the subscriber manually, if you havent have them on th subscribers.

|||Hi Mahesh,

There could be some issues if i create these procedures manually on the subscriber. For example, since the naming of the procedures differ is it possible that the logic of these procedures also differ.

Why doesn't the process of creating a subscription at the subscriber re-create the new procedures which SQL 2005 needs for replication?

I think this should be flagged as a bug as there is no mention that it can't be done in BOL in 2005.

Cheers,
Priyanga|||Hi Priyanga,

You can specify @.sync_type to 'replication support only' when sp_addsubscription is called. It will create appropriate replication system procedure at subscriber.

BOL has detailed instruction to help you do that. Look at topic "How to: Initialize a Subscription Manually (SQL Server Management Studio)" or "How to: Initialize a Subscription Manually (Replication Transact-SQL Programming)", depending you prefer to use UI or procedure.

Please let me know if it works for you.

Peng|||

Priyanga Karunathilake wrote:

I have encountered a problem implementing this solution....


Oops, looks like you already tried with sync_type as either 'replication support only' or 'initialize with backup'. Replication should create system procs on the subscriber database for both case. Have you run logreader and distribution agent after create subscription? Is it a push or pull subscription?|||

Hi Peng,

The log reader and distribution agents are both running after I setup the subscription. It is a pull subscription.

When I try to set up this scenario where I do a pull subscription without initializing the subscription, the new SQL 2005 distribution stored procedures don’t get created on the subscriber. All I see are sp_MSxxx_tablename type stored procedures which is from the SQL 2000 replication and hense I get the error cannot find sp_MSxxx_dbotablename procedure. Note the dbo in the SQL 2005 procedures.

When I do a push subscription without initializing, it successfully creates the SQL 2005 distribution stored procedures on the subscriber. Also, when I do a pull subscription WITH initialize it creates the SQL 2005 distribution stored procedures on the subscriber.

Cheers,

Priyanga

|||Hi Priyanga,

Pull subscription should also creates the system procs on subscriber DB. The name of the procs depends on parameters @.ins_cmd/@.upd_cmd/@.del_cmd when article is created (i.e. sp_addarticle). The default is sp_MSxxx_dbotablename for SQL 2005. How do you create the replication? Through UI and script? You can query sysarticles on publication DB to get the CALL format you are using.

Another piece of information that might be useful is the @.schema_option of the article.

For the subscriber, is it SQL 2000 or 2005?

-Peng

|||Hi Peng,

I am creating the replication using UI.

The subscriber is a SQL 2000 instance. I scripted out the commands during the pull subscription creation.

What i don't understand is why the distribution procedures don't get created for a pull subscription when the subscription is not initialised. They get created for all other scenarios. I'am beginning to think this is a bug in SQL 2005.

Thanks for you assistance.

Priyanga

--BEGIN: Script to be run at Publisher 'INSPIRON\SQL01'--

use [NorthwindPK]

exec sp_addsubscription @.publication = N'NorthwindPK_SQL2005', @.subscriber = N'INSPIRON\SQL02', @.destination_db = N'NorthwindPK', @.sync_type = N'replication support only', @.subscription_type = N'pull', @.update_mode = N'read only'

GO

--END: Script to be run at Publisher 'INSPIRON\SQL01'--

--BEGIN: Script to be run at Subscriber 'INSPIRON\SQL02'--

use [NorthwindPK]

exec sp_addpullsubscription @.publisher = N'INSPIRON\SQL01', @.publication = N'NorthwindPK_SQL2005', @.publisher_db = N'NorthwindPK', @.independent_agent = N'True', @.subscription_type = N'pull', @.description = N'', @.update_mode = N'read only', @.immediate_sync = 1

exec sp_addpullsubscription_agent @.publisher = N'INSPIRON\SQL01', @.publisher_db = N'NorthwindPK', @.publication = N'NorthwindPK_SQL2005', @.subscriber_security_mode = 1, @.subscriber_login = N'', @.subscriber_password = null, @.distributor = N'INSPIRON\SQL01', @.distributor_security_mode = 1, @.distributor_login = N'', @.distributor_password = null, @.enabled_for_syncmgr = N'False', @.frequency_type = 64, @.frequency_interval = 0, @.frequency_relative_interval = 0, @.frequency_recurrence_factor = 0, @.frequency_subday = 0, @.frequency_subday_interval = 0, @.active_start_time_of_day = 0, @.active_end_time_of_day = 235959, @.active_start_date = 20051014, @.active_end_date = 99991231, @.alt_snapshot_folder = N'', @.working_directory = N'', @.use_ftp = N'False', @.offloadagent = N'False', @.offloadserver = N'', @.publication_type = 0

GO

--END: Script to be run at Subscriber 'INSPIRON\SQL02'--

|||

Priyanga,

Since the distribution agent on your pull subscriber is effectively SQL2000 binary from way back, it doesn't really understand the commands posted to MSrepl_commands for creating the custom procedures as provided by the 'replication support only' @.sync_type since this is a SQL2005 feature. I can understand your disappointment, but we can't really "fix" this by changing anything in SQL2005.

-Raymond

|||Hi Raymond.

I guess i have to do a full initialise of the subscription when we move to SQL 2005 for our publisher and distributor.....

Do you know whether significant performance enhancements have been made to the speed of initialising a subscription from snaphot?
Taking into consideration that i will be going from a SQL 2005 Publisher and Distributor on separate servers to SQL 2000 subscriber, and have to initialise 150GB of data, would you have an approximate time it might take? The only environemnt stats i can give you is that we have a gigabit network connection, publisher and distributor are 64bit with 16GB memory, all servers connected to SAN and that it would be performed during a scheduled downtime?

Cheers,
Priyanga

Monday, March 26, 2012

Moving a database from 2005 Express to Enterprise

If I detach a database from an instance of SQL Server 2005 Express and attach it to an instance of SQL Server 2005 Enterprise, will the database be essentially identical to one initially created under 2005 Enterprise, or will some Express edition limitation follow the database from the original instance to the new one?

Thanks,
Peter Nyberg

The on-disk structures will be identical, so you should have no problems. Only thing to keep in mind would be the possible features available in enterprise not available for use in express (for example, if you make use of indexed views, enterprise's optimizer will automatically consider them whereas express's won't)...but, given that you're moving from express, you are probably not making use of things like that anyhow.

HTH

Moving a database between two SQL Server with different patch levels

Hi,

I need to move a database from an instance running SQL Server 2000 SP3
to another running SQL Server 2000 SP2. Can I just use backup/restore
or detach/reattach and let SQL server take care of any downgrading (if
any).

Many thanks

GiovanniHi

I doubt if you can downgrade like this, and you may get spurious results. A
safer option may be to use the transfer wizard.

John

"Giovanni" <giovanni.clayden@.lstrillium.com> wrote in message
news:366e1de1.0410260757.7e48c961@.posting.google.c om...
> Hi,
> I need to move a database from an instance running SQL Server 2000 SP3
> to another running SQL Server 2000 SP2. Can I just use backup/restore
> or detach/reattach and let SQL server take care of any downgrading (if
> any).
> Many thanks
>
> Giovanni|||Giovanni (giovanni.clayden@.lstrillium.com) writes:
> I need to move a database from an instance running SQL Server 2000 SP3
> to another running SQL Server 2000 SP2. Can I just use backup/restore
> or detach/reattach and let SQL server take care of any downgrading (if
> any).

No. You will have to rebuild the database from scripts and bulk data in
or out. Or use the Transfer Wizard that John mentioned.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns958EEC2E2A9B3Yazorman@.127.0.0.1...
> Giovanni (giovanni.clayden@.lstrillium.com) writes:
> > I need to move a database from an instance running SQL Server 2000 SP3
> > to another running SQL Server 2000 SP2. Can I just use backup/restore
> > or detach/reattach and let SQL server take care of any downgrading (if
> > any).
> No. You will have to rebuild the database from scripts and bulk data in
> or out. Or use the Transfer Wizard that John mentioned.

You positive? Generally SP's only modify system databases. This is one of
those cases I'd suggest "try it, expect it to fail, but you may get lucky."

> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Greg D. Moore (Strider) (mooregr_deleteth1s@.greenms.com) writes:
> You positive? Generally SP's only modify system databases. This is one
> of those cases I'd suggest "try it, expect it to fail, but you may get
> lucky."

And they you later run into problems, and then you find out that is not
supported. Better safe than sorry, as they say.

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

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

Wednesday, March 21, 2012

move/upgrade MSDE to SQL 2000

Need some help with moving/upgrading 3 MSDE databases (stored locally on 3 different servers) to a single SQL 2000 server (new instance). Can this be done? If so, how??

Thanks for any responsesStop the MSSQL service. Find the MDF and LDF files (C:\Program Files\Microsoft SQL Server\MSSQL\Data\ ) and copy them to the SQL Server. Then attach the databases on the destination. Watch not to overlay any MDF/LDF files on the destination server.sql

Monday, March 19, 2012

Move SQL2005 from Default Instance to Named Instance

I have a server with sql server 2005 installed as the default instance -- I have a piece of software that needs SQL2000 to be the default instance. Is there a way other than install new sql2005 named instance and move databases to rename my SQL2005 instance from <machinename> to <machinename>\sql05 for example?

Bryan

SQL Server 2005 instance name cannot be changed after installation. You need to install second names instance side by side, old the databases and uninstall the default instance. Then you can install SQL 2000 default instance.

|||Not unexpected and not unreasonable that this cannot be done. Just hoping I could be a little lazier

Move SQL2005 from Default Instance to Named Instance

I have a server with sql server 2005 installed as the default instance -- I have a piece of software that needs SQL2000 to be the default instance. Is there a way other than install new sql2005 named instance and move databases to rename my SQL2005 instance from <machinename> to <machinename>\sql05 for example?

Bryan

SQL Server 2005 instance name cannot be changed after installation. You need to install second names instance side by side, old the databases and uninstall the default instance. Then you can install SQL 2000 default instance.

|||Not unexpected and not unreasonable that this cannot be done. Just hoping I could be a little lazier

Move SQL Server Virtual Server Instance to new Server

What is the Best Practices way and quickest way to move a SQL Server 2000
Virtual Server database to a new server.
This a production server with numerous users and the server can be down for
only several hours. The server has Windows 2000 Advanced Server with SQL
Server 2000 (Active/Active) Cluster with two nodes and a 400GB database.
We purchased a new HP server.
We would like to install Windows 2003 Server and SQL Server 2000 Virtual
Server on this cluster server.
We would like the new server to have the same server name, IP Addresses, and
database instance name as the old system.
How can we complete this task with minimum down time and with Microsoft Best
Practices.
Thanks,
It's not really practical to have 2 servers in the same domain with the same
IP & name (in fact it's not possible). I had a similar situation recently
where I wanted to replace our production cluster with a new production
cluster and I wanted to keep all the config the same and I figured out that
the best way to do it was to use DNS to point at the SQL server that was to
be the production box.
What I did was I kept SQL01 (our production SQL instance) up & running as
normal while I built up SQL02. Different IP & name but I needed it to
co-exist in our domain while the DBs were transferred from one to the other.
I had a DNS alias (CNAME record) called SQLProduction that initially pointed
at SQL01. Leading up to our regular weekly outage period I'd copied full DB
backups over to SQL02 and restored them (WITH NORECOVERY) and then during
the outage period we put SQL01 into single user mode (so nobody could
connect to change data) and did transaction log backups of all the DB
(substantially smaller than the full DB backups). I then copied those tlog
backups over to SQL02, restored them (WITH RECOVERY) and changed the
SQLProduction DNS alias to point at SQL02.
This added a level of abstraction to the client/server model we use, which
has been very useful (the users don't need to know what server the
production server really is, all they know is they get to it by connecting
to SQLProduction). We can switch the DNS alias to whichever box we like
and, assuming the DBs are synched, nobody every knows the difference (we set
the DNS TTL very small, like 5 minutes, before the change so it gets out to
the client machines almost immediately). We did this for all our major
servers (SQLProduction, SQLStaging, SQLDevelopment). We now have a few
production servers (all running on different clusters) but the users have no
idea which servers actually host the DBs (as that detail shouldn't matter to
them).
The only ugly thing about this is that leading up to the change we had to
make sure all the client apps (and we had thousands running on a couple
thousand computers) we're connecting to the DNS aliases rather than the
actual server names so that when we turned off SQL01 they wouldn't still be
trying to connect to it.
It was slightly more complicated for us because we were using named
instances, which don't translate very well with DNS (ie. DNS can't cater for
them at all). What I did to solve that was use the MDAC aliases to say
"SQLProduction" is a TCP connecting to a box called SQLProduction (ie. the
DNS alias) and it should use port 1434 or 1435 or 1436 or whichever. The
MDAC aliases are just registry values so I got the appropriate aliases
together into a reg file and we used SMS to push them out to every client
desktop (and we updated our 100 or so servers manually with the reg file).
This works well with a disaster recovery scenario too - we just set up our
DR SQL servers (say SQL03) to listen on the same port as the production
instance. Then in a disaster (which we had in August this
year...<sigh>...dumb SAN engineers!) we simply change the DNS alias for
SQLProduction to point to SQL03. After that, every new connecting to
SQLProduction goes off to SQL03 on port 1434 (or whichever one we use for
our "production" box). We keep the production & DR servers synchronised
with log shipping and it works a treat - we can be up and running on our DR
server (with no changes to any middle-tier or client app) in about 1 hour;
all we have to do is log shipping role changes for all the DBs (which takes
a little while because we have about 150 of the dam things, but I wrote a
SQL batch to perform the role changes, so we just kick it off and 30-45
minutes later everyone is pointing at our DR server and nobody is the wiser
(except for the 1 hour outage)).
Anyway, sorry about my verbal diarrhoea. HTH.
Cheers,
Mike
"Joe K." <JoeK@.discussions.microsoft.com> wrote in message
news:019A8672-58C8-4A98-9A12-5C7D762F8C27@.microsoft.com...
> What is the Best Practices way and quickest way to move a SQL Server 2000
> Virtual Server database to a new server.
> This a production server with numerous users and the server can be down
> for
> only several hours. The server has Windows 2000 Advanced Server with SQL
> Server 2000 (Active/Active) Cluster with two nodes and a 400GB database.
> We purchased a new HP server.
> We would like to install Windows 2003 Server and SQL Server 2000 Virtual
> Server on this cluster server.
> We would like the new server to have the same server name, IP Addresses,
> and
> database instance name as the old system.
> How can we complete this task with minimum down time and with Microsoft
> Best
> Practices.
> Thanks,

Monday, March 12, 2012

Move reports created by Report Builder

I have created a number of reports using Report Builder, and I would
like to move them to a new report server 2005 instance (I have
redeployed the underlying model to the new report server) and
associated model. Any easy way to do this?
Thanks,
Paul.Reporting Services Scripter v2
http://www.sqldbatips.com/showarticle.asp?ID=62
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Paul" <prayner@.matrixbancorp.com> wrote in message
news:1134682199.968299.138840@.o13g2000cwo.googlegroups.com...
>I have created a number of reports using Report Builder, and I would
> like to move them to a new report server 2005 instance (I have
> redeployed the underlying model to the new report server) and
> associated model. Any easy way to do this?
> Thanks,
> Paul.
>|||Thanks very much Jasper! Much appreciated.
Paul.

Wednesday, March 7, 2012

Move entire SQL Server instance

I have tried searching all over and have not been able to find what I need, but this is what I have pieced together.

Background:
I need to move an entire instance of SQL Server 2000 SP3 running on Windows Server 2000 to a new physical server running SQL Server 2000 SP4 running on Windows Server 2003. I guess my biggest question is how do I move system databases (master,msdb,tempdb,model), I don't particularly like the idea of using sp_detach/sp_attach on system databases?

This is what I had in mind.
-Install SP4 on the source server
-Backup source to tape
-Restore from tape to destination server (restore system dbs as re_master,re_msdb)
-Shut SQL services down on destination server.
-Replace the system dbs .mdf and .ldf with the re_master & re_msdb .mdf and .ldf
-Restart SQL services
-Restore User databases from tape.

Ultimately, I'm asking can you change the undlying .mdf & .ldf files for system databases?

Also, are there any issues going from Windows Server 2000 to Windows Server 2003?

Thanks in advance.gee, why would you want to move temp? most people would not need to move model either.

I would...

1. backup your source user databases.
2. restore them to the new server.
3. migrate what you need from master and msdb and you can do some of this with DTS I believe and you can have EM script some other things. It really depends on your needs.|||You can also backup and restore the msdb database, if you have large numbers of jobs and/or DTS packages (shudder) to move. You will have to go in and update the sysjobs table, so the SQL Agent on the new machine does not think it is hosting jobs from a master job server, though. There is no good way to go through jobs and DTS packages for all the hard-coded server names, though.|||I've migrated lots of instances (from non-clustered to clustered, from old h/w to new) and have never attempted to restore a backup of master, model or msdb.

- Most of master gets updated when databases are restored/attached.
- Jobs can be scripted (keep new db names the same as old)
- DTS packages can be backed up using a script (and moved using a variation of the same script)

I'm always leery of restoring master, model or msdb because you might get some ugliness in there as well.

Just my $.02.

Regards,

hmscott|||something else that has worked in the past ...
1. Build out your new server.
2. Stop sql server on both old and new servers.
3. Rename the master mdf and ldf on the new server
4. Copy the master mdf and ldf from the old server to the new server in the location specified for the new server
5. Fire up the new server.
6. Modify sysservers for the new server name (unless you will be using the same server name).
7. Use microsoft methods for moving temp and restoring msdb
8. Detach and reattach the user database files, or backup and restore the user database file, whichever you prefer.|||I'd take hmscott's advice:
- Install the new instance
- restore all user databases
- Script everything else you need from the old instance

Because:
- Master: only contains the logins needed, just script them. If you use the same sid's in the script you don't even have to use sp_change_users_login (when you only have Windows Authentication you don't even have to do that)
- Model: most people don't do anything special with model and leave it standard. If you have customized stuff in there do a compare and script it.
- msdb: script (jobs, DTS, etc)! If you really want to, this is the only one I'd restore (prepare for some problems though).
- tempdb: don't touch it, it's useless to try. Each restart will empty tempdb so there's nothing in there to re-use. If there is, you're doing something wrong.|||Thanks for all the insight, in case you couldn't tell this is my first migration and I'm just trying to make sure I don't miss anything. I'll let you know what I did and how it turned out.|||Am I understanding this correctly, that I don't have to install SP4 on the source server if I take Lexiflex & hmscott's advice?|||that's correct|||Am I understanding this correctly, that I don't have to install SP4 on the source server if I take Lexiflex & hmscott's advice?
Why wouldn't you want to install SP4?

Btw: if the old server has logshipping, replication or linked servers don't forget to script or rebuild them too. They're also in master...|||I probably will install SP4 on the source. I was just wondering because the source server is going to get wiped out and have a clean install of Windows Server 2003 and new installation of SQL anyways.

No logshipping, replication or linked servers to worry about.|||Sorry, I read your post too quickly. You said source-server not target :o

You do not need to install SP4 on the source.

Move DBs from One Instance to Another

SQL Server 2000
Windows Server 2003 SP1
We have 54 databases on this SQL Server and plan to move them all,
maintaining permissions and everything.
What is the best way to do this?
Thanks,
JimHere is a post from Andrew Kelly:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>|||IMHO, easiest if you can have them offline is detach/copy/attach
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>|||You should also backup a master database and restore it to the
destination server. This way you should keep your logins in the
destination server.|||> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
Be cautious that @.@.version matches exactly on the two instances.|||Hi,
Ensure that you have the same SQL Server service pack level in both old as
well as new server. If both SP are same you can restore the Master db from
source
to new server.
Thanks
Hari
<sajberek@.gmail.com> wrote in message
news:1164839740.220233.125570@.n67g2000cwd.googlegroups.com...
> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
>|||Thanks for your input, everyone! I will be looking into all of this.
--Jim
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>

Move DBs from One Instance to Another

SQL Server 2000
Windows Server 2003 SP1
We have 54 databases on this SQL Server and plan to move them all,
maintaining permissions and everything.
What is the best way to do this?
Thanks,
Jim
Here is a post from Andrew Kelly:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>
|||IMHO, easiest if you can have them offline is detach/copy/attach
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>
|||You should also backup a master database and restore it to the
destination server. This way you should keep your logins in the
destination server.
|||> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
Be cautious that @.@.version matches exactly on the two instances.
|||Hi,
Ensure that you have the same SQL Server service pack level in both old as
well as new server. If both SP are same you can restore the Master db from
source
to new server.
Thanks
Hari
<sajberek@.gmail.com> wrote in message
news:1164839740.220233.125570@.n67g2000cwd.googlegr oups.com...
> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
>
|||Thanks for your input, everyone! I will be looking into all of this.
--Jim
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>

Move DBs from One Instance to Another

SQL Server 2000
Windows Server 2003 SP1
We have 54 databases on this SQL Server and plan to move them all,
maintaining permissions and everything.
What is the best way to do this?
Thanks,
JimHere is a post from Andrew Kelly:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>|||IMHO, easiest if you can have them offline is detach/copy/attach
--
Kevin Hill
3NF Consulting
http://www.3nf-inc.com/NewsGroups.htm
Real-world stuff I run across with SQL Server:
http://kevin3nf.blogspot.com
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>|||You should also backup a master database and restore it to the
destination server. This way you should keep your logins in the
destination server.|||> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
Be cautious that @.@.version matches exactly on the two instances.|||Hi,
Ensure that you have the same SQL Server service pack level in both old as
well as new server. If both SP are same you can restore the Master db from
source
to new server.
Thanks
Hari
<sajberek@.gmail.com> wrote in message
news:1164839740.220233.125570@.n67g2000cwd.googlegroups.com...
> You should also backup a master database and restore it to the
> destination server. This way you should keep your logins in the
> destination server.
>|||Thanks for your input, everyone! I will be looking into all of this.
--Jim
"Jim" <please.reply@.group> wrote in message
news:uYbmH6$EHHA.536@.TK2MSFTNGP02.phx.gbl...
> SQL Server 2000
> Windows Server 2003 SP1
> We have 54 databases on this SQL Server and plan to move them all,
> maintaining permissions and everything.
> What is the best way to do this?
> Thanks,
> Jim
>

Saturday, February 25, 2012

move database from 1 instance to another

Hi,
One of my colleague has a SQL server 2k5 on C:\Program files\...
i have basically installed all instances and program files of SQL server
2k5 on D: drive.
I've recreate his instance on D: drive and he gave me all files MDF,
LDF... of his instance (quick and dirty backup :-( )
when i stop the instance process and copy all his files on my D: drive
into the right instance folder, my instance process does not restart and
i got the following error into log events :
The description for Event ID ( 17204 ) in Source ( MSSQL$MAGICEYE )
cannot be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: FCB::Open failed, C:\Program Files\Microsoft SQL
Server\MSSQL.2\MSSQL\DATA\mssqlsystemresource.mdf, 1, 3(The system
cannot find the path specified.).
so this is clear that the instance path is stored into database files.
how can i do to make this instance files (dirty back) work on my D:
drive instance ?
thanks a lot,
A.Did you restore his master, model, msdb perhaps? If so, do not do this.
Just restore his user databses. There will be issues with logins, however.
You will need to recreate them and sync the login/database user information
if you care about that.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"Alain R." <noemail@.nospam.com> wrote in message
news:%23RlvthdNIHA.3400@.TK2MSFTNGP03.phx.gbl...
> Hi,
> One of my colleague has a SQL server 2k5 on C:\Program files\...
> i have basically installed all instances and program files of SQL server
> 2k5 on D: drive.
> I've recreate his instance on D: drive and he gave me all files MDF,
> LDF... of his instance (quick and dirty backup :-( )
> when i stop the instance process and copy all his files on my D: drive
> into the right instance folder, my instance process does not restart and i
> got the following error into log events :
> The description for Event ID ( 17204 ) in Source ( MSSQL$MAGICEYE ) cannot
> be found. The local computer may not have the necessary registry
> information or message DLL files to display messages from a remote
> computer. You may be able to use the /AUXSOURCE= flag to retrieve this
> description; see Help and Support for details. The following information
> is part of the event: FCB::Open failed, C:\Program Files\Microsoft SQL
> Server\MSSQL.2\MSSQL\DATA\mssqlsystemresource.mdf, 1, 3(The system cannot
> find the path specified.).
> so this is clear that the instance path is stored into database files.
> how can i do to make this instance files (dirty back) work on my D: drive
> instance ?
> thanks a lot,
> A.|||I already only restored his DB file, but after my instance service was
not able to restart :-(
so any other suggestion ?
TheSQLGuru wrote:
> Did you restore his master, model, msdb perhaps? If so, do not do this.
> Just restore his user databses. There will be issues with logins, however.
> You will need to recreate them and sync the login/database user information
> if you care about that.
>|||The files for master db is pointed to in the registry. Resource db need to be in the same folder.
All the other databases are pointed to from master. Problem is that if you fix registry path for
master and make sure resource db is in same folder, then SQL Server will get a bit further, but when
it tires to open model, it won't find the files and won't start (can't live without tempdb and can't
create tempdb without model). There's a section in BOL 2005 on how to move system databases and also
KB 224071 can be useful.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Alain R." <noemail@.nospam.com> wrote in message news:uGUuU%23dNIHA.1188@.TK2MSFTNGP04.phx.gbl...
>I already only restored his DB file, but after my instance service was not able to restart :-(
> so any other suggestion ?
> TheSQLGuru wrote:
>> Did you restore his master, model, msdb perhaps? If so, do not do this. Just restore his user
>> databses. There will be issues with logins, however. You will need to recreate them and sync the
>> login/database user information if you care about that.

move database from 1 instance to another

Hi,
One of my colleague has a SQL server 2k5 on C:\Program files\...
i have basically installed all instances and program files of SQL server
2k5 on D: drive.
I've recreate his instance on D: drive and he gave me all files MDF,
LDF... of his instance (quick and dirty backup :-( )
when i stop the instance process and copy all his files on my D: drive
into the right instance folder, my instance process does not restart and
i got the following error into log events :
The description for Event ID ( 17204 ) in Source ( MSSQL$MAGICEYE )
cannot be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: FCB::Open failed, C:\Program Files\Microsoft SQL
Server\MSSQL.2\MSSQL\DATA\mssqlsystemresource.mdf, 1, 3(The system
cannot find the path specified.).
so this is clear that the instance path is stored into database files.
how can i do to make this instance files (dirty back) work on my D:
drive instance ?
thanks a lot,
A.Did you restore his master, model, msdb perhaps? If so, do not do this.
Just restore his user databses. There will be issues with logins, however.
You will need to recreate them and sync the login/database user information
if you care about that.
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"Alain R." <noemail@.nospam.com> wrote in message
news:%23RlvthdNIHA.3400@.TK2MSFTNGP03.phx.gbl...
> Hi,
> One of my colleague has a SQL server 2k5 on C:\Program files\...
> i have basically installed all instances and program files of SQL server
> 2k5 on D: drive.
> I've recreate his instance on D: drive and he gave me all files MDF,
> LDF... of his instance (quick and dirty backup :-( )
> when i stop the instance process and copy all his files on my D: drive
> into the right instance folder, my instance process does not restart and i
> got the following error into log events :
> The description for Event ID ( 17204 ) in Source ( MSSQL$MAGICEYE ) cannot
> be found. The local computer may not have the necessary registry
> information or message DLL files to display messages from a remote
> computer. You may be able to use the /AUXSOURCE= flag to retrieve this
> description; see Help and Support for details. The following information
> is part of the event: FCB::Open failed, C:\Program Files\Microsoft SQL
> Server\MSSQL.2\MSSQL\DATA\mssqlsystemresource.mdf, 1, 3(The system cannot
> find the path specified.).
> so this is clear that the instance path is stored into database files.
> how can i do to make this instance files (dirty back) work on my D: drive
> instance ?
> thanks a lot,
> A.|||I already only restored his DB file, but after my instance service was
not able to restart :-(
so any other suggestion ?
TheSQLGuru wrote:
> Did you restore his master, model, msdb perhaps? If so, do not do this.
> Just restore his user databses. There will be issues with logins, however
.
> You will need to recreate them and sync the login/database user informatio
n
> if you care about that.
>|||The files for master db is pointed to in the registry. Resource db need to b
e in the same folder.
All the other databases are pointed to from master. Problem is that if you f
ix registry path for
master and make sure resource db is in same folder, then SQL Server will get
a bit further, but when
it tires to open model, it won't find the files and won't start (can't live
without tempdb and can't
create tempdb without model). There's a section in BOL 2005 on how to move s
ystem databases and also
KB 224071 can be useful.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Alain R." <noemail@.nospam.com> wrote in message news:uGUuU%23dNIHA.1188@.TK2MSFTNGP04.phx.gb
l...[vbcol=seagreen]
>I already only restored his DB file, but after my instance service was not
able to restart :-(
> so any other suggestion ?
> TheSQLGuru wrote:

Monday, February 20, 2012

Moving instance of Sql server to different location

Is it possible to move an instance sql server from one drive to another, i.e
.
C: to D: without changing connection properties referenced in DTS packages,
etc.?
T.I.A.This should help:
http://support.microsoft.com/kb/224071
-oj
"LNN" <LNN@.discussions.microsoft.com> wrote in message
news:BE7ADDBD-6113-4BB2-9695-DEB61FC00A91@.microsoft.com...
> Is it possible to move an instance sql server from one drive to another,
> i.e.
> C: to D: without changing connection properties referenced in DTS
> packages,
> etc.?
> T.I.A.|||Hi
If you are moving a database then the connection properties will not change
if you following the instructions in the link posted by oj. If you are
rebuilding a new server and want to rename that server (to be the original
server's name) then you will also need
http://msdn.microsoft.com/library/d...nstall_5r8f.asp
John
"LNN" wrote:

> Is it possible to move an instance sql server from one drive to another, i
.e.
> C: to D: without changing connection properties referenced in DTS packages
,
> etc.?
> T.I.A.