Showing posts with label dear. Show all posts
Showing posts with label dear. Show all posts

Monday, March 26, 2012

Moving a database from one machine to another and the lack of speed

Dear All,

We have a procedure that takes12 minutes to run on the first server but
that same procedure now takes 3 hours to run on the second server using the
same data. Does anyone have any suggestions why this is happening and how
to make the procedure faster on the second server

Thanks in advance.

Jeff Magouirk"Jeff Magouirk" <magouirkj@.njc.org> wrote in message
news:113bhrh7krjtjad@.corp.supernews.com...
> Dear All,
> We have a procedure that takes12 minutes to run on the first server but
> that same procedure now takes 3 hours to run on the second server using
> the same data. Does anyone have any suggestions why this is happening and
> how to make the procedure faster on the second server
> Thanks in advance.
> Jeff Magouirk
>

No idea - the usual advice if you see something like that is to a) update
statistics, and b) use Profiler to identify what's taking so much time. You
can also capture the execution plan in Profiler (or use Query Analyzer,
which is a bit more user-friendly), and compare it against the plan on the
original server.

If that doesn't help, you'll need to give more details about your
environment - are they the same MSSQL version? The same hardware? Do you
have the same database schema (including indexes etc.)? Are the database
files exactly the same size? Are they using the same recovery model? Is the
data the same (or nearly so)? Is everything slow, or only certain
procedures? Etc.

Simon

Monday, March 19, 2012

Move System and User database

Dear All,
Is it possible to move system(master, model, msdb and so on...) and user
database to another sql server by just copying all ldf and mdf files in data
directory while the sql on the source server is down?
Any problem using this method instead of backup and restore?
as I don't want to detach the database from source server.
Thanks for any advices
K
That is never a good idea. Check these out:
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/scri...p?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
> Dear All,
> Is it possible to move system(master, model, msdb and so on...) and user
> database to another sql server by just copying all ldf and mdf files in
> data
> directory while the sql on the source server is down?
> Any problem using this method instead of backup and restore?
> as I don't want to detach the database from source server.
> Thanks for any advices
> K
|||Andrew, Thanks for your reply!
I've already read through these documents.
However, I wonder what will I miss if I move all data including SYSTEM
database to new server.
any problem with that?
besides, will the sa password be moved to the new server if system database
moved? if not where the sa password stored?
Thanks for any advice
"Andrew J. Kelly" wrote:

> That is never a good idea. Check these out:
> 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/scri...p?scriptid=599
> Restoring a .mdf
> http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
> for SQL Server
>
> --
> Andrew J. Kelly SQL MVP
>
> "Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
> news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
>
>
|||There is no problem with moving everything over just don't do a file level
copy of the db's unless you use sp_detach and sp_attach. The sa password is
stored in the master db.
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:C630D625-C889-49D4-B683-C4997CA05A61@.microsoft.com...[vbcol=seagreen]
> Andrew, Thanks for your reply!
> I've already read through these documents.
> However, I wonder what will I miss if I move all data including SYSTEM
> database to new server.
> any problem with that?
> besides, will the sa password be moved to the new server if system
> database
> moved? if not where the sa password stored?
> Thanks for any advice
> "Andrew J. Kelly" wrote:
|||Hi Ken
well there are times when one just has to move their
entire SQL server install to a new box - such as a server
upgrade
the article below may shed some light on the principles
and procedures involved to accomplish what you are trying
to do
http://vyaskn.tripod.com/moving_sql_server.htm
cheers
James

>--Original Message--
>Andrew, Thanks for your reply!
>I've already read through these documents.
>However, I wonder what will I miss if I move all data
including SYSTEM
>database to new server.
>any problem with that?
>besides, will the sa password be moved to the new server
if system database[vbcol=seagreen]
>moved? if not where the sa password stored?
>Thanks for any advice
>"Andrew J. Kelly" wrote:
DB's between Servers[vbcol=seagreen]
SQL Server Databases[vbcol=seagreen]
Using WITH MOVE in a[vbcol=seagreen]
Transfer Logins and[vbcol=seagreen]
Logins & SIDs after a[vbcol=seagreen]
Utility to map logins to[vbcol=seagreen]
Logon and/or Permission[vbcol=seagreen]
Resolve Permission[vbcol=seagreen]
http://www.sqlservercentral.com/scri...ptdetails.asp?
scriptid=599[vbcol=seagreen]
Recovery Articles[vbcol=seagreen]
message[vbcol=seagreen]
58F96DB228F9@.microsoft.com...[vbcol=seagreen]
so on...) and user[vbcol=seagreen]
ldf and mdf files in[vbcol=seagreen]
restore?[vbcol=seagreen]
server.
>.
>

Move System and User database

Dear All,
Is it possible to move system(master, model, msdb and so on...) and user
database to another sql server by just copying all ldf and mdf files in data
directory while the sql on the source server is down?
Any problem using this method instead of backup and restore?
as I don't want to detach the database from source server.
Thanks for any advices
KThat is never a good idea. Check these out:
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
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
> Dear All,
> Is it possible to move system(master, model, msdb and so on...) and user
> database to another sql server by just copying all ldf and mdf files in
> data
> directory while the sql on the source server is down?
> Any problem using this method instead of backup and restore?
> as I don't want to detach the database from source server.
> Thanks for any advices
> K|||Andrew, Thanks for your reply!
I've already read through these documents.
However, I wonder what will I miss if I move all data including SYSTEM
database to new server.
any problem with that?
besides, will the sa password be moved to the new server if system database
moved? if not where the sa password stored?
Thanks for any advice
"Andrew J. Kelly" wrote:

> That is never a good idea. Check these out:
> http://www.support.microsoft.com/?id=314546 Moving DB's between Server
s
> http://www.support.microsoft.com/?id=224071 Moving SQL Server Database
s
> 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 Permissi
on
> 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
>
> --
> Andrew J. Kelly SQL MVP
>
> "Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
> news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
>
>|||There is no problem with moving everything over just don't do a file level
copy of the db's unless you use sp_detach and sp_attach. The sa password is
stored in the master db.
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:C630D625-C889-49D4-B683-C4997CA05A61@.microsoft.com...[vbcol=seagreen]
> Andrew, Thanks for your reply!
> I've already read through these documents.
> However, I wonder what will I miss if I move all data including SYSTEM
> database to new server.
> any problem with that?
> besides, will the sa password be moved to the new server if system
> database
> moved? if not where the sa password stored?
> Thanks for any advice
> "Andrew J. Kelly" wrote:
>|||Hi Ken
well there are times when one just has to move their
entire SQL server install to a new box - such as a server
upgrade
the article below may shed some light on the principles
and procedures involved to accomplish what you are trying
to do
http://vyaskn.tripod.com/moving_sql_server.htm
cheers
James

>--Original Message--
>Andrew, Thanks for your reply!
>I've already read through these documents.
>However, I wonder what will I miss if I move all data
including SYSTEM
>database to new server.
>any problem with that?
>besides, will the sa password be moved to the new server
if system database
>moved? if not where the sa password stored?
>Thanks for any advice
>"Andrew J. Kelly" wrote:
>
DB's between Servers[vbcol=seagreen]
SQL Server Databases[vbcol=seagreen]
Using WITH MOVE in a[vbcol=seagreen]
Transfer Logins and[vbcol=seagreen]
Logins & SIDs after a[vbcol=seagreen]
Utility to map logins to[vbcol=seagreen]
Logon and/or Permission[vbcol=seagreen]
Resolve Permission[vbcol=seagreen]
http://www.sqlservercentral.com/scr...iptdetails.asp?
scriptid=599[vbcol=seagreen]
Recovery Articles[vbcol=seagreen]
message[vbcol=seagreen]
58F96DB228F9@.microsoft.com...[vbcol=seagreen]
so on...) and user[vbcol=seagreen]
ldf and mdf files in[vbcol=seagreen]
restore?[vbcol=seagreen]
server.[vbcol=seagreen]
>.
>

Move System and User database

Dear All,
Is it possible to move system(master, model, msdb and so on...) and user
database to another sql server by just copying all ldf and mdf files in data
directory while the sql on the source server is down?
Any problem using this method instead of backup and restore?
as I don't want to detach the database from source server.
Thanks for any advices
KThat is never a good idea. Check these out:
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
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
> Dear All,
> Is it possible to move system(master, model, msdb and so on...) and user
> database to another sql server by just copying all ldf and mdf files in
> data
> directory while the sql on the source server is down?
> Any problem using this method instead of backup and restore?
> as I don't want to detach the database from source server.
> Thanks for any advices
> K|||Andrew, Thanks for your reply!
I've already read through these documents.
However, I wonder what will I miss if I move all data including SYSTEM
database to new server.
any problem with that?
besides, will the sa password be moved to the new server if system database
moved? if not where the sa password stored?
Thanks for any advice
"Andrew J. Kelly" wrote:
> That is never a good idea. Check these out:
> 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
>
> --
> Andrew J. Kelly SQL MVP
>
> "Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
> news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
> > Dear All,
> >
> > Is it possible to move system(master, model, msdb and so on...) and user
> > database to another sql server by just copying all ldf and mdf files in
> > data
> > directory while the sql on the source server is down?
> >
> > Any problem using this method instead of backup and restore?
> > as I don't want to detach the database from source server.
> >
> > Thanks for any advices
> > K
>
>|||There is no problem with moving everything over just don't do a file level
copy of the db's unless you use sp_detach and sp_attach. The sa password is
stored in the master db.
--
Andrew J. Kelly SQL MVP
"Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
news:C630D625-C889-49D4-B683-C4997CA05A61@.microsoft.com...
> Andrew, Thanks for your reply!
> I've already read through these documents.
> However, I wonder what will I miss if I move all data including SYSTEM
> database to new server.
> any problem with that?
> besides, will the sa password be moved to the new server if system
> database
> moved? if not where the sa password stored?
> Thanks for any advice
> "Andrew J. Kelly" wrote:
>> That is never a good idea. Check these out:
>> 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
>>
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Kenneth" <Kenneth@.discussions.microsoft.com> wrote in message
>> news:D1EB32EB-A2F6-465D-978E-58F96DB228F9@.microsoft.com...
>> > Dear All,
>> >
>> > Is it possible to move system(master, model, msdb and so on...) and
>> > user
>> > database to another sql server by just copying all ldf and mdf files in
>> > data
>> > directory while the sql on the source server is down?
>> >
>> > Any problem using this method instead of backup and restore?
>> > as I don't want to detach the database from source server.
>> >
>> > Thanks for any advices
>> > K
>>|||Hi Ken
well there are times when one just has to move their
entire SQL server install to a new box - such as a server
upgrade
the article below may shed some light on the principles
and procedures involved to accomplish what you are trying
to do
http://vyaskn.tripod.com/moving_sql_server.htm
cheers
James
>--Original Message--
>Andrew, Thanks for your reply!
>I've already read through these documents.
>However, I wonder what will I miss if I move all data
including SYSTEM
>database to new server.
>any problem with that?
>besides, will the sa password be moved to the new server
if system database
>moved? if not where the sa password stored?
>Thanks for any advice
>"Andrew J. Kelly" wrote:
>> That is never a good idea. Check these out:
>> 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
>>
>> --
>> Andrew J. Kelly SQL MVP
>>
>> "Kenneth" <Kenneth@.discussions.microsoft.com> wrote in
message
>> news:D1EB32EB-A2F6-465D-978E-
58F96DB228F9@.microsoft.com...
>> > Dear All,
>> >
>> > Is it possible to move system(master, model, msdb and
so on...) and user
>> > database to another sql server by just copying all
ldf and mdf files in
>> > data
>> > directory while the sql on the source server is down?
>> >
>> > Any problem using this method instead of backup and
restore?
>> > as I don't want to detach the database from source
server.
>> >
>> > Thanks for any advices
>> > K
>>
>.
>

Wednesday, March 7, 2012

Move DTS Package

Dear Sirs,
How can I move a DTS package from one server to another?
Regards,
YahyaHi,
Right click DTS which you want to move and chose Design Package. Click
Package then Save AS and chose server in which you want to save DTS.
Or you can save DTS as Structured Storage File. Then copy it to the
destination server and in EM right click Data Transformation Services and
Open. Choose your file. Click Package then Save AS and chose server in which
you want to save DTS.
"Yahya Saad" wrote:
> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>
>|||Try saving it as a .dts file rather than to SQL Server. Then move the file
and open it from the new server. You may strike some issues with ownership
and mappings if you use any flat files in the package, but they can be
worked around and re-mapped.
"Yahya Saad" <yahyasaad@.hotmail.com> wrote in message
news:uwR78bsCFHA.3528@.TK2MSFTNGP10.phx.gbl...
> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>

Move DTS Package

Dear Sirs,
How can I move a DTS package from one server to another?
Regards,
Yahya
Hi,
Right click DTS which you want to move and chose Design Package. Click
Package then Save AS and chose server in which you want to save DTS.
Or you can save DTS as Structured Storage File. Then copy it to the
destination server and in EM right click Data Transformation Services and
Open. Choose your file. Click Package then Save AS and chose server in which
you want to save DTS.
"Yahya Saad" wrote:

> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>
>
|||Try saving it as a .dts file rather than to SQL Server. Then move the file
and open it from the new server. You may strike some issues with ownership
and mappings if you use any flat files in the package, but they can be
worked around and re-mapped.
"Yahya Saad" <yahyasaad@.hotmail.com> wrote in message
news:uwR78bsCFHA.3528@.TK2MSFTNGP10.phx.gbl...
> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>

Move DTS Package

Dear Sirs,
How can I move a DTS package from one server to another?
Regards,
YahyaHi,
Right click DTS which you want to move and chose Design Package. Click
Package then Save AS and chose server in which you want to save DTS.
Or you can save DTS as Structured Storage File. Then copy it to the
destination server and in EM right click Data Transformation Services and
Open. Choose your file. Click Package then Save AS and chose server in which
you want to save DTS.
"Yahya Saad" wrote:

> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>
>|||Try saving it as a .dts file rather than to SQL Server. Then move the file
and open it from the new server. You may strike some issues with ownership
and mappings if you use any flat files in the package, but they can be
worked around and re-mapped.
"Yahya Saad" <yahyasaad@.hotmail.com> wrote in message
news:uwR78bsCFHA.3528@.TK2MSFTNGP10.phx.gbl...
> Dear Sirs,
> How can I move a DTS package from one server to another?
> Regards,
> Yahya
>