Thursday, March 29, 2012
Copy Permissions
I've copied tables and views from one SQL Server to another, but the
permissions for each user/role are not copied.
How come.
Thanks,
B.Bart
--
EXEC databasename..sp_helpuser 'username'
SELECT OBJECT_NAME(id),*
FROM databasename..syspermissions
WHERE grantee=USER_ID('username')
If you use BACKUP/RESTORE command to copy your tables/views so please
search on internet for "sp_help_revlogin" two stored procedures provided by
MS to copy logins beween SQL Servers
"Bart Steur" <solnews@.xs4all.nl> wrote in message
news:OtwLA6myFHA.460@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I've copied tables and views from one SQL Server to another, but the
> permissions for each user/role are not copied.
> How come.
> Thanks,
> B.
>
Copy Permissions
I've copied tables and views from one SQL Server to another, but the
permissions for each user/role are not copied.
How come.
Thanks,
B.
Bart
EXEC databasename..sp_helpuser 'username'
SELECT OBJECT_NAME(id),*
FROM databasename..syspermissions
WHERE grantee=USER_ID('username')
If you use BACKUP/RESTORE command to copy your tables/views so please
search on internet for "sp_help_revlogin" two stored procedures provided by
MS to copy logins beween SQL Servers
"Bart Steur" <solnews@.xs4all.nl> wrote in message
news:OtwLA6myFHA.460@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I've copied tables and views from one SQL Server to another, but the
> permissions for each user/role are not copied.
> How come.
> Thanks,
> B.
>
Copy objects Wizard - deleted data??
views from my dev box to production. It copied the views, but also wiped out
my data in all the tables that the views are built around!!! In
production!!!!
Can someone provide me some insight into why this happened?
Thanks,
ChadChad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> I have not used the copy objects wizard that much. I used it today to
> copy 4 views from my dev box to production. It copied the views, but
> also wiped out my data in all the tables that the views are built
> around!!! In production!!!!
> Can someone provide me some insight into why this happened?
Extremely nasty. I have not used the wizard in question myself, and I
think you understand why after this experience. It's a bit ironic: the
wizards are there to help, but you can only use them, if you know
exactly what they do, and in such case you may not need them.
Anyway my guess is that the wizard saw reason to recreate the underlying
tables as well; possibly because the defintion in production was different
from your dev box.
The correct way to deploy things in production is through change scripts
that are created from information in the version-control system.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
restore everything from their backup and the transaction logs.
Normally, whenever I make DB table changes I save the scripts and put them
in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
changes to prod. But changes to views don't prompt for you to save these
changes as a script.
What specifically do you mean by "the version control system"? (As you can
tell by my question, I know just enough of SQL Server to be dangerous, so
any insight on how to handle version contol is appreciated.)
Thanks,
Chad
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9682EF2F57F5DYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> I have not used the copy objects wizard that much. I used it today to
>> copy 4 views from my dev box to production. It copied the views, but
>> also wiped out my data in all the tables that the views are built
>> around!!! In production!!!!
>>
>> Can someone provide me some insight into why this happened?
> Extremely nasty. I have not used the wizard in question myself, and I
> think you understand why after this experience. It's a bit ironic: the
> wizards are there to help, but you can only use them, if you know
> exactly what they do, and in such case you may not need them.
> Anyway my guess is that the wizard saw reason to recreate the underlying
> tables as well; possibly because the defintion in production was different
> from your dev box.
> The correct way to deploy things in production is through change scripts
> that are created from information in the version-control system.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
> restore everything from their backup and the transaction logs.
> Normally, whenever I make DB table changes I save the scripts and put them
> in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
> changes to prod. But changes to views don't prompt for you to save these
> changes as a script.
> What specifically do you mean by "the version control system"? (As you can
> tell by my question, I know just enough of SQL Server to be dangerous, so
> any insight on how to handle version contol is appreciated.)
"version control system" or "source code control" is nothing specific
to SQL Server, but fundamentals of software engineering. In a version
control system, developers adds their files. Later a file may be
checked out, maybe by the same developer, maybe by someone else. The
person who checked out the file, performs some changes to it, and
then checks back in again, after proper testing.
When it's getting time to make a build for an integration test, someone
who is a "build master", "configuration manager" or similar puts some
label on all the most recent versions of files, to create a baseline.
During tests, bugs may be uncovered and fixed. The fixes can be inserted
into that baseline, or a new baseline be created.
Eventually, the thing is put into production and a baseline is created for
this. Now, development of 2.0 starts. However, there may be need to
fix bugs in production as well. Say that version 12 of file foo.cs
was in the shipment baseline. By the time a critical bug in production
is discovered, the file at version 14 for 2.0 development. But you
check out version 12, and fix that, and check it in as 12.1 - you
have now created a branch.
The exact terminology for these various actions are different from
product to product. The most commonly used version-control system
in the Microsoft world is Visual SourceSafe. It performs branching
different that about any other product. VSS has a lot of short-comings
as a version-control system, but it's easy to start with, and it's OK
for smaller teams.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||For a tool that links the drop/create scripts (for ALL database
objects) in any source control system to your development, test and
production databases have a look at DB Ghost (www.dbghost.com).
The approach is to regard the drop/create scripts as the only true
representation of the desired schema i.e. your 'source database'. Once
you have modifed the drop/create scripts DB Ghost will build a brand
new database from them in an extremely fast manner whilst taking care
of any dependencies. This a) verifies that no syntax or dependency
errors have been introduced and b) gives you a real source database to
use as the basis for a compare and upgrade of your actual target i.e.
the test or production database. DB Ghost does this also and creates a
rock solid delta script of the differences that is guaranteed to work
with no hand coded modifications.
What you end up with is a target database that matches a (labelled) set
of scripts under source control. If this approach is used for all
releases then a full audit trail of who changed what, why and when is
maintained in the source control system so it is easy to do reports
such as 'what changed between release X and release Y' or 'who first
changed sproc Z after release X'.
Relying on comments in sprocs etc. is a recipe for disaster in all but
the most disciplined of IT shops. Let your source control system do
the hard work for you and let DB Ghost handle all the SQL Server code.
It's called the DB Ghost Process and it can bring an amazing level of
quality to your deployments and code control in general.|||Erland,
Thanks for the explanation. I do have experience with source control tools
such as VSS and PVCS, but all have been for file/directory based source,
like VB. How do DB developers apply these principles (check in, check out,
etc.) to SQL Server? This is something I've curious about for a while now.
Thanks,
Chad
"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns96833C7C3BFCYazorman@.127.0.0.1...
> Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
>> Yes, very nasty. Luckily my hosting company (ReadyHosting) was able to
>> restore everything from their backup and the transaction logs.
>>
>> Normally, whenever I make DB table changes I save the scripts and put
>> them
>> in a "To Promote to Prod" directory, then use SQL Analyzer to apply those
>> changes to prod. But changes to views don't prompt for you to save these
>> changes as a script.
>>
>> What specifically do you mean by "the version control system"? (As you
>> can
>> tell by my question, I know just enough of SQL Server to be dangerous, so
>> any insight on how to handle version contol is appreciated.)
> "version control system" or "source code control" is nothing specific
> to SQL Server, but fundamentals of software engineering. In a version
> control system, developers adds their files. Later a file may be
> checked out, maybe by the same developer, maybe by someone else. The
> person who checked out the file, performs some changes to it, and
> then checks back in again, after proper testing.
> When it's getting time to make a build for an integration test, someone
> who is a "build master", "configuration manager" or similar puts some
> label on all the most recent versions of files, to create a baseline.
> During tests, bugs may be uncovered and fixed. The fixes can be inserted
> into that baseline, or a new baseline be created.
> Eventually, the thing is put into production and a baseline is created for
> this. Now, development of 2.0 starts. However, there may be need to
> fix bugs in production as well. Say that version 12 of file foo.cs
> was in the shipment baseline. By the time a critical bug in production
> is discovered, the file at version 14 for 2.0 development. But you
> check out version 12, and fix that, and check it in as 12.1 - you
> have now created a branch.
> The exact terminology for these various actions are different from
> product to product. The most commonly used version-control system
> in the Microsoft world is Visual SourceSafe. It performs branching
> different that about any other product. VSS has a lot of short-comings
> as a version-control system, but it's easy to start with, and it's OK
> for smaller teams.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techin.../2000/books.asp|||Chad Richardson (chad@.NIXSPAM_chadrichardson.com) writes:
> Thanks for the explanation. I do have experience with source control tools
> such as VSS and PVCS, but all have been for file/directory based source,
> like VB. How do DB developers apply these principles (check in, check out,
> etc.) to SQL Server? This is something I've curious about for a while now.
They use - or at least should use - files. I've seen a whole lot of
questions on version control of SQL objects as this should be something
difficult or special. It isn't. Source code is source code, and should be
handled as such.
I guess people are tricked by tools that permit you to store things in the
database directly, point-and-click GUI:n for creating tables etc. But all
of that is really files.
The one gotcha there is if you use a tool like Query Analyzer for editing
your SQL objects, is that you disrupt the normal procedure which is
1) check out 2) edit 3) save 4) compile 5) test 6) back to 2 until it
works 7) check in. With a tool like QA, 3 is taken out of the chain, which
can lead to that what you check is not what you tested.
In our shop, we avoid this problem by using a third-party editor, Textpad.
It has no special features for SQL - but it is a better editor than QA.
From Textpad 3 and 4 is one key-click, as we can activate a command-line
from Textpad. We have our own load tool for quite a few bells and whistles,
but the tool could be command-line OSQL.
The thing people seem to want to do, is to take the SQL objects from
the database, but this is actually really wrong when you think of it.
If you work in VB, would get the input for the version-control system
by disassembling the object modules?
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Sunday, March 25, 2012
copy db sql7 ->2000 newbie question
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
kak37
On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the table
> and view section in sql 2000 but they are only in the view section in sql 7.
> (sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again
sqlsql
copy db sql7 ->2000 newbie question
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on Windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
--
kak37On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the tab
le
> and view section in sql 2000 but they are only in the view section in sql
7.
> (sql 7 running on Windows 2000 server/sql 2000 on windows 2003 server.) wh
y
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again
copy db sql7 ->2000 newbie question
I have a backup copy of a database in sql 7. I am copying it over to sql
2000 and then restoring it. There are 3 views that show up in both the table
and view section in sql 2000 but they are only in the view section in sql 7.
(sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
is that happening?
Thanks for any help with this. much appreciated!
--
kak37On Jun 13, 10:12 am, kak37 <k...@.discussions.microsoft.com> wrote:
> Hi,
> I have a backup copy of a database in sql 7. I am copying it over to sql
> 2000 and then restoring it. There are 3 views that show up in both the table
> and view section in sql 2000 but they are only in the view section in sql 7.
> (sql 7 running on windows 2000 server/sql 2000 on windows 2003 server.) why
> is that happening?
> Thanks for any help with this. much appreciated!
> --
> kak37
Try refresh at databse level (EM) and check again
Copy DB from 2005 to 2000
views) from SQL 2005 to SQL 2000?
Thank you for your help!You could try the instructions in this thread:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=842225&SiteID=1
Look for a posting titled: "How to Downgrade a Database from SQL Server 2005
to SQL Server 2000"
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:BE2F5E3E-BAA3-49EA-B6A7-1BB69AE581D2@.microsoft.com...
> Is there a ligitimate way to copy database (ALL objects, not just tables
> and
> views) from SQL 2005 to SQL 2000?
> Thank you for your help!|||Leon Shargorodsky wrote:
> Is there a ligitimate way to copy database (ALL objects, not just tables and
> views) from SQL 2005 to SQL 2000?
> Thank you for your help!
You can't directly "downgrade" a database from SQL2005 to SQL2000. I
think your only option is to script it all out and the run these scripts
on your SQL2000 database.
Regards
Steen Schlüter Persson
Database Administrator / System Administrator|||DTS and, possibly, BCP.
On Wed, 1 Nov 2006 14:28:02 -0800, Leon Shargorodsky
<LeonShargorodsky@.discussions.microsoft.com> wrote:
>Is there a ligitimate way to copy database (ALL objects, not just tables and
>views) from SQL 2005 to SQL 2000?
>Thank you for your help!|||bradsbulkmail@.comcast.net wrote:
> DTS and, possibly, BCP.
> On Wed, 1 Nov 2006 14:28:02 -0800, Leon Shargorodsky
> <LeonShargorodsky@.discussions.microsoft.com> wrote:
> >Is there a ligitimate way to copy database (ALL objects, not just tables and
> >views) from SQL 2005 to SQL 2000?
> >
> >Thank you for your help!
Try SSIS, BCP or Replication
Regards
Amish Shah|||You can export your database to SQL 2000 with data . SQL 2005 support this.
All tasks--> export data
"Leon Shargorodsky" <LeonShargorodsky@.discussions.microsoft.com> wrote in
message news:BE2F5E3E-BAA3-49EA-B6A7-1BB69AE581D2@.microsoft.com...
> Is there a ligitimate way to copy database (ALL objects, not just tables
> and
> views) from SQL 2005 to SQL 2000?
> Thank you for your help!|||Many people seem to mention using SSIS, but when I tried it using the
'Transfer Database task', it wouldn't let me downgrade: 'The source
connection ... must specify a SQL server with a version less than or
equal to the destination connection ... '.
Using SQL Server 2005 Replication works, though it's a bit overkill for
a one-off task.
amish wrote:
> bradsbulkmail@.comcast.net wrote:
> > DTS and, possibly, BCP.
> >
> > On Wed, 1 Nov 2006 14:28:02 -0800, Leon Shargorodsky
> > <LeonShargorodsky@.discussions.microsoft.com> wrote:
> >
> > >Is there a ligitimate way to copy database (ALL objects, not just tables and
> > >views) from SQL 2005 to SQL 2000?
> > >
> > >Thank you for your help!
> Try SSIS, BCP or Replication
> Regards
> Amish Shah|||No, you can't 'Transfer database'. But you can script out the tables, views,
stored procedures, and the data
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"decates" <decates@.gmail.com> wrote in message
news:1164387119.010205.146340@.m7g2000cwm.googlegroups.com...
> Many people seem to mention using SSIS, but when I tried it using the
> 'Transfer Database task', it wouldn't let me downgrade: 'The source
> connection ... must specify a SQL server with a version less than or
> equal to the destination connection ... '.
> Using SQL Server 2005 Replication works, though it's a bit overkill for
> a one-off task.
> amish wrote:
>> bradsbulkmail@.comcast.net wrote:
>> > DTS and, possibly, BCP.
>> >
>> > On Wed, 1 Nov 2006 14:28:02 -0800, Leon Shargorodsky
>> > <LeonShargorodsky@.discussions.microsoft.com> wrote:
>> >
>> > >Is there a ligitimate way to copy database (ALL objects, not just
>> > >tables and
>> > >views) from SQL 2005 to SQL 2000?
>> > >
>> > >Thank you for your help!
>> Try SSIS, BCP or Replication
>> Regards
>> Amish Shah
>
Tuesday, March 20, 2012
Copy database to same server but with a different name
What is the best way to do this?
P.S. I have SQL Server 2000 Enterprise Edition.You can use DTS to copy the database, or you can use a backup file from the production database and restore it to the test database. to use DTS, right click on the database, select Export, then when given the chance, Export Objects. When selecting a destination database, select New and you will be able to create the new database.|||douglas.reilly,
Your DTS suggestion worked perfectly! Thanks :)
Monday, March 19, 2012
Copy database from SQL 2k to 2005?
I'm able to use SQL 2005's VB management page to import the tables and views from a database in SQL 2000 on another server, but how do I get all of the data like stored procedures, etc...?
you were better off backing up the database from sql 2000 (right click db, all tasks > backup database), then restoring in from device on 2005, that would have kept all your data|||
if you want the entire dbs data you can perform backup and restore in sql 2005........for certain objects you can script them and execute the script in sql 2k5.......
Sunday, March 11, 2012
copy database easiest way!
copy of it on another server. Just wondering an easy way to do this? I have
Enterprise manager, SQL query analyzer as well.
Paul G
Software engineer.
I prefer backup and restore.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> Hi I have a database with tables, views, stored procedures and want to put a
> copy of it on another server. Just wondering an easy way to do this? I have
> Enterprise manager, SQL query analyzer as well.
> --
> Paul G
> Software engineer.
|||ok can I do this from Enterprise manager on the source machine?
thanks.
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> I prefer backup and restore.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>
|||Do the backup on the source machine. Copy the backup file to the target machine. Then do the restore
on that (which you can do remotely in EM , connected to the target machine..).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...[vbcol=seagreen]
> ok can I do this from Enterprise manager on the source machine?
> thanks.
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
|||Hi thanks for the additional information. Just had a question on the copy, I
found the back and restore as part of the tools of EM. I could not find the
copy, can you copy the dbase just like a standard file from explorer?
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> Do the backup on the source machine. Copy the backup file to the target machine. Then do the restore
> on that (which you can do remotely in EM , connected to the target machine..).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>
|||Only if you detach it from the SQL Server or stop the SQL Server service
first...detach/attach is preferred
look up sp_detach_db in Books Online
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
|||Yes, a regular file copy operation (explorer)...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the copy, I
> found the back and restore as part of the tools of EM. I could not find the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
|||Hi Paul,
After the backup, Just copy the .BAK file to destination server. After that
restore the database in destination server using
Enterprise Manager. Otherwise use the RESTORE DATABASE from Query analyzer.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
|||Here's a link that might help you:
http://support.microsoft.com/default...b;en-us;314546
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the
copy, I
> found the back and restore as part of the tools of EM. I could not find
the[vbcol=seagreen]
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
machine. Then do the restore[vbcol=seagreen]
machine..).[vbcol=seagreen]
to put a[vbcol=seagreen]
this? I have[vbcol=seagreen]
|||Hi,
In this approach the source database will be unavailable until you attach
the database back. This approach is not recommended in
a production server.
Thanks
Hari
SQL Server MVP
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23jtPRLOfFHA.1248@.TK2MSFTNGP12.phx.gbl...
> Only if you detach it from the SQL Server or stop the SQL Server service
> first...detach/attach is preferred
> look up sp_detach_db in Books Online
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
>
copy database easiest way!
copy of it on another server. Just wondering an easy way to do this? I hav
e
Enterprise manager, SQL query analyzer as well.
--
Paul G
Software engineer.I prefer backup and restore.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> Hi I have a database with tables, views, stored procedures and want to put
a
> copy of it on another server. Just wondering an easy way to do this? I h
ave
> Enterprise manager, SQL query analyzer as well.
> --
> Paul G
> Software engineer.|||ok can I do this from Enterprise manager on the source machine?
thanks.
--
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> I prefer backup and restore.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>|||Do the backup on the source machine. Copy the backup file to the target mach
ine. Then do the restore
on that (which you can do remotely in EM , connected to the target machine..
).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...[vbcol=seagreen]
> ok can I do this from Enterprise manager on the source machine?
> thanks.
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>|||Hi thanks for the additional information. Just had a question on the copy,
I
found the back and restore as part of the tools of EM. I could not find the
copy, can you copy the dbase just like a standard file from explorer?
--
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> Do the backup on the source machine. Copy the backup file to the target ma
chine. Then do the restore
> on that (which you can do remotely in EM , connected to the target machine
.).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>|||Only if you detach it from the SQL Server or stop the SQL Server service
first...detach/attach is preferred
look up sp_detach_db in Books Online
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>|||Yes, a regular file copy operation (explorer)...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the copy
, I
> found the back and restore as part of the tools of EM. I could not find t
he
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>|||Hi Paul,
After the backup, Just copy the .BAK file to destination server. After that
restore the database in destination server using
Enterprise Manager. Otherwise use the RESTORE DATABASE from Query analyzer.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...[vbcol=seagreen]
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>|||Here's a link that might help you:
http://support.microsoft.com/defaul...kb;en-us;314546
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the
copy, I
> found the back and restore as part of the tools of EM. I could not find
the[vbcol=seagreen]
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>
machine. Then do the restore[vbcol=seagreen]
machine..).[vbcol=seagreen]
to put a[vbcol=seagreen]
this? I have[vbcol=seagreen]|||Hi,
In this approach the source database will be unavailable until you attach
the database back. This approach is not recommended in
a production server.
Thanks
Hari
SQL Server MVP
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23jtPRLOfFHA.1248@.TK2MSFTNGP12.phx.gbl...
> Only if you detach it from the SQL Server or stop the SQL Server service
> first...detach/attach is preferred
> look up sp_detach_db in Books Online
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
>
copy database easiest way!
copy of it on another server. Just wondering an easy way to do this? I have
Enterprise manager, SQL query analyzer as well.
--
Paul G
Software engineer.I prefer backup and restore.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> Hi I have a database with tables, views, stored procedures and want to put a
> copy of it on another server. Just wondering an easy way to do this? I have
> Enterprise manager, SQL query analyzer as well.
> --
> Paul G
> Software engineer.|||ok can I do this from Enterprise manager on the source machine?
thanks.
--
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> I prefer backup and restore.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> > Hi I have a database with tables, views, stored procedures and want to put a
> > copy of it on another server. Just wondering an easy way to do this? I have
> > Enterprise manager, SQL query analyzer as well.
> > --
> > Paul G
> > Software engineer.
>|||Do the backup on the source machine. Copy the backup file to the target machine. Then do the restore
on that (which you can do remotely in EM , connected to the target machine..).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> ok can I do this from Enterprise manager on the source machine?
> thanks.
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>> I prefer backup and restore.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>> > Hi I have a database with tables, views, stored procedures and want to put a
>> > copy of it on another server. Just wondering an easy way to do this? I have
>> > Enterprise manager, SQL query analyzer as well.
>> > --
>> > Paul G
>> > Software engineer.
>>|||Hi thanks for the additional information. Just had a question on the copy, I
found the back and restore as part of the tools of EM. I could not find the
copy, can you copy the dbase just like a standard file from explorer?
--
Paul G
Software engineer.
"Tibor Karaszi" wrote:
> Do the backup on the source machine. Copy the backup file to the target machine. Then do the restore
> on that (which you can do remotely in EM , connected to the target machine..).
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> > ok can I do this from Enterprise manager on the source machine?
> > thanks.
> > --
> > Paul G
> > Software engineer.
> >
> >
> > "Tibor Karaszi" wrote:
> >
> >> I prefer backup and restore.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>
> >>
> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> >> > Hi I have a database with tables, views, stored procedures and want to put a
> >> > copy of it on another server. Just wondering an easy way to do this? I have
> >> > Enterprise manager, SQL query analyzer as well.
> >> > --
> >> > Paul G
> >> > Software engineer.
> >>
> >>
>|||Only if you detach it from the SQL Server or stop the SQL Server service
first...detach/attach is preferred
look up sp_detach_db in Books Online
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
www.experts-exchange.com - experts compete for points to answer your
questions
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>> Do the backup on the source machine. Copy the backup file to the target
>> machine. Then do the restore
>> on that (which you can do remotely in EM , connected to the target
>> machine..).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>> > ok can I do this from Enterprise manager on the source machine?
>> > thanks.
>> > --
>> > Paul G
>> > Software engineer.
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> I prefer backup and restore.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >> Blog: http://solidqualitylearning.com/blogs/tibor/
>> >>
>> >>
>> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>> >> > Hi I have a database with tables, views, stored procedures and want
>> >> > to put a
>> >> > copy of it on another server. Just wondering an easy way to do
>> >> > this? I have
>> >> > Enterprise manager, SQL query analyzer as well.
>> >> > --
>> >> > Paul G
>> >> > Software engineer.
>> >>
>> >>
>>|||Yes, a regular file copy operation (explorer)...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the copy, I
> found the back and restore as part of the tools of EM. I could not find the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>> Do the backup on the source machine. Copy the backup file to the target machine. Then do the
>> restore
>> on that (which you can do remotely in EM , connected to the target machine..).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>> > ok can I do this from Enterprise manager on the source machine?
>> > thanks.
>> > --
>> > Paul G
>> > Software engineer.
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> I prefer backup and restore.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >> Blog: http://solidqualitylearning.com/blogs/tibor/
>> >>
>> >>
>> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>> >> > Hi I have a database with tables, views, stored procedures and want to put a
>> >> > copy of it on another server. Just wondering an easy way to do this? I have
>> >> > Enterprise manager, SQL query analyzer as well.
>> >> > --
>> >> > Paul G
>> >> > Software engineer.
>> >>
>> >>
>>|||Hi Paul,
After the backup, Just copy the .BAK file to destination server. After that
restore the database in destination server using
Enterprise Manager. Otherwise use the RESTORE DATABASE from Query analyzer.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the
> copy, I
> found the back and restore as part of the tools of EM. I could not find
> the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
>> Do the backup on the source machine. Copy the backup file to the target
>> machine. Then do the restore
>> on that (which you can do remotely in EM , connected to the target
>> machine..).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>> > ok can I do this from Enterprise manager on the source machine?
>> > thanks.
>> > --
>> > Paul G
>> > Software engineer.
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> I prefer backup and restore.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >> Blog: http://solidqualitylearning.com/blogs/tibor/
>> >>
>> >>
>> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>> >> > Hi I have a database with tables, views, stored procedures and want
>> >> > to put a
>> >> > copy of it on another server. Just wondering an easy way to do
>> >> > this? I have
>> >> > Enterprise manager, SQL query analyzer as well.
>> >> > --
>> >> > Paul G
>> >> > Software engineer.
>> >>
>> >>
>>|||Here's a link that might help you:
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
"Paul" <Paul@.discussions.microsoft.com> wrote in message
news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> Hi thanks for the additional information. Just had a question on the
copy, I
> found the back and restore as part of the tools of EM. I could not find
the
> copy, can you copy the dbase just like a standard file from explorer?
> --
> Paul G
> Software engineer.
>
> "Tibor Karaszi" wrote:
> > Do the backup on the source machine. Copy the backup file to the target
machine. Then do the restore
> > on that (which you can do remotely in EM , connected to the target
machine..).
> >
> > --
> > Tibor Karaszi, SQL Server MVP
> > http://www.karaszi.com/sqlserver/default.asp
> > http://www.solidqualitylearning.com/
> > Blog: http://solidqualitylearning.com/blogs/tibor/
> >
> >
> > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> > > ok can I do this from Enterprise manager on the source machine?
> > > thanks.
> > > --
> > > Paul G
> > > Software engineer.
> > >
> > >
> > > "Tibor Karaszi" wrote:
> > >
> > >> I prefer backup and restore.
> > >>
> > >> --
> > >> Tibor Karaszi, SQL Server MVP
> > >> http://www.karaszi.com/sqlserver/default.asp
> > >> http://www.solidqualitylearning.com/
> > >> Blog: http://solidqualitylearning.com/blogs/tibor/
> > >>
> > >>
> > >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> > >> > Hi I have a database with tables, views, stored procedures and want
to put a
> > >> > copy of it on another server. Just wondering an easy way to do
this? I have
> > >> > Enterprise manager, SQL query analyzer as well.
> > >> > --
> > >> > Paul G
> > >> > Software engineer.
> > >>
> > >>
> >
> >|||Hi,
In this approach the source database will be unavailable until you attach
the database back. This approach is not recommended in
a production server.
Thanks
Hari
SQL Server MVP
"Kevin3NF" <KHill@.NopeIDontNeedNoSPAM3NF-inc.com> wrote in message
news:%23jtPRLOfFHA.1248@.TK2MSFTNGP12.phx.gbl...
> Only if you detach it from the SQL Server or stop the SQL Server service
> first...detach/attach is preferred
> look up sp_detach_db in Books Online
> --
> Kevin Hill
> President
> 3NF Consulting
> www.3nf-inc.com/NewsGroups.htm
> www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
> www.experts-exchange.com - experts compete for points to answer your
> questions
>
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
>> Hi thanks for the additional information. Just had a question on the
>> copy, I
>> found the back and restore as part of the tools of EM. I could not find
>> the
>> copy, can you copy the dbase just like a standard file from explorer?
>> --
>> Paul G
>> Software engineer.
>>
>> "Tibor Karaszi" wrote:
>> Do the backup on the source machine. Copy the backup file to the target
>> machine. Then do the restore
>> on that (which you can do remotely in EM , connected to the target
>> machine..).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>> > ok can I do this from Enterprise manager on the source machine?
>> > thanks.
>> > --
>> > Paul G
>> > Software engineer.
>> >
>> >
>> > "Tibor Karaszi" wrote:
>> >
>> >> I prefer backup and restore.
>> >>
>> >> --
>> >> Tibor Karaszi, SQL Server MVP
>> >> http://www.karaszi.com/sqlserver/default.asp
>> >> http://www.solidqualitylearning.com/
>> >> Blog: http://solidqualitylearning.com/blogs/tibor/
>> >>
>> >>
>> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>> >> > Hi I have a database with tables, views, stored procedures and want
>> >> > to put a
>> >> > copy of it on another server. Just wondering an easy way to do
>> >> > this? I have
>> >> > Enterprise manager, SQL query analyzer as well.
>> >> > --
>> >> > Paul G
>> >> > Software engineer.
>> >>
>> >>
>>
>|||Hi thanks for all the replies. I created a sample database and then backed
it up. I then detatched it but could not find it to re-attatch it. I tried
to re-attatch the backup but it said this is not a correct file format. Also
when I actually copy it over do I use the database wizard?
--
Paul G
Software engineer.
"Ron Hinds" wrote:
> Here's a link that might help you:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> > Hi thanks for the additional information. Just had a question on the
> copy, I
> > found the back and restore as part of the tools of EM. I could not find
> the
> > copy, can you copy the dbase just like a standard file from explorer?
> > --
> > Paul G
> > Software engineer.
> >
> >
> > "Tibor Karaszi" wrote:
> >
> > > Do the backup on the source machine. Copy the backup file to the target
> machine. Then do the restore
> > > on that (which you can do remotely in EM , connected to the target
> machine..).
> > >
> > > --
> > > Tibor Karaszi, SQL Server MVP
> > > http://www.karaszi.com/sqlserver/default.asp
> > > http://www.solidqualitylearning.com/
> > > Blog: http://solidqualitylearning.com/blogs/tibor/
> > >
> > >
> > > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > > news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> > > > ok can I do this from Enterprise manager on the source machine?
> > > > thanks.
> > > > --
> > > > Paul G
> > > > Software engineer.
> > > >
> > > >
> > > > "Tibor Karaszi" wrote:
> > > >
> > > >> I prefer backup and restore.
> > > >>
> > > >> --
> > > >> Tibor Karaszi, SQL Server MVP
> > > >> http://www.karaszi.com/sqlserver/default.asp
> > > >> http://www.solidqualitylearning.com/
> > > >> Blog: http://solidqualitylearning.com/blogs/tibor/
> > > >>
> > > >>
> > > >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > > >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> > > >> > Hi I have a database with tables, views, stored procedures and want
> to put a
> > > >> > copy of it on another server. Just wondering an easy way to do
> this? I have
> > > >> > Enterprise manager, SQL query analyzer as well.
> > > >> > --
> > > >> > Paul G
> > > >> > Software engineer.
> > > >>
> > > >>
> > >
> > >
>
>|||I ended up creating an empty database at the desintation machine and then
using export data wizard from the source dbase (EM). Seemed to work ok.
--
Paul G
Software engineer.
"Paul" wrote:
> Hi thanks for all the replies. I created a sample database and then backed
> it up. I then detatched it but could not find it to re-attatch it. I tried
> to re-attatch the backup but it said this is not a correct file format. Also
> when I actually copy it over do I use the database wizard?
> --
> Paul G
> Software engineer.
>
> "Ron Hinds" wrote:
> > Here's a link that might help you:
> >
> > http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
> >
> > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> > > Hi thanks for the additional information. Just had a question on the
> > copy, I
> > > found the back and restore as part of the tools of EM. I could not find
> > the
> > > copy, can you copy the dbase just like a standard file from explorer?
> > > --
> > > Paul G
> > > Software engineer.
> > >
> > >
> > > "Tibor Karaszi" wrote:
> > >
> > > > Do the backup on the source machine. Copy the backup file to the target
> > machine. Then do the restore
> > > > on that (which you can do remotely in EM , connected to the target
> > machine..).
> > > >
> > > > --
> > > > Tibor Karaszi, SQL Server MVP
> > > > http://www.karaszi.com/sqlserver/default.asp
> > > > http://www.solidqualitylearning.com/
> > > > Blog: http://solidqualitylearning.com/blogs/tibor/
> > > >
> > > >
> > > > "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > > > news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> > > > > ok can I do this from Enterprise manager on the source machine?
> > > > > thanks.
> > > > > --
> > > > > Paul G
> > > > > Software engineer.
> > > > >
> > > > >
> > > > > "Tibor Karaszi" wrote:
> > > > >
> > > > >> I prefer backup and restore.
> > > > >>
> > > > >> --
> > > > >> Tibor Karaszi, SQL Server MVP
> > > > >> http://www.karaszi.com/sqlserver/default.asp
> > > > >> http://www.solidqualitylearning.com/
> > > > >> Blog: http://solidqualitylearning.com/blogs/tibor/
> > > > >>
> > > > >>
> > > > >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> > > > >> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> > > > >> > Hi I have a database with tables, views, stored procedures and want
> > to put a
> > > > >> > copy of it on another server. Just wondering an easy way to do
> > this? I have
> > > > >> > Enterprise manager, SQL query analyzer as well.
> > > > >> > --
> > > > >> > Paul G
> > > > >> > Software engineer.
> > > > >>
> > > > >>
> > > >
> > > >
> >
> >
> >|||It seems like you've mixed things up....
When you backup the database, you get a file with the extention .BAK
(..actually it can have what ever extension you give it, but .BAK it the
"standard"). This .BAK file is just a normal file that you can copy as any
other file. If you copy this file to a location on your destination server,
you can restore this file on the destination server, and then you'll have an
exact copy of your database.
When you use sp_detach_db/sp_attach_db it's the actual files belonging to
the database you are working with (Database and logfiles). If you run
sp_detach_db, you'll have to copy the .mdf and .ldf file from the source
server to the destination server. When you've copied the files, you'll have
to run sp_attach_db BOTH on the source server (to get the database attach
again) and on the destination server (to get the database created).
Both the BACKUP/RESTORE and sp_detach_db/sp_attach_db syntaxes can be found
in Books On Line.
Regards
Steen
Paul wrote:
> I ended up creating an empty database at the desintation machine and
> then using export data wizard from the source dbase (EM). Seemed to
> work ok.
>> Hi thanks for all the replies. I created a sample database and then
>> backed it up. I then detatched it but could not find it to
>> re-attatch it. I tried to re-attatch the backup but it said this is
>> not a correct file format. Also when I actually copy it over do I
>> use the database wizard?
>> --
>> Paul G
>> Software engineer.
>>
>> "Ron Hinds" wrote:
>> Here's a link that might help you:
>> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
>> Hi thanks for the additional information. Just had a question on
>> the copy, I found the back and restore as part of the tools of EM.
>> I could not find the copy, can you copy the dbase just like a
>> standard file from explorer? --
>> Paul G
>> Software engineer.
>>
>> "Tibor Karaszi" wrote:
>> Do the backup on the source machine. Copy the backup file to the
>> target machine. Then do the restore on that (which you can do
>> remotely in EM , connected to the target machine..).
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
>> ok can I do this from Enterprise manager on the source machine?
>> thanks.
>> --
>> Paul G
>> Software engineer.
>>
>> "Tibor Karaszi" wrote:
>>> I prefer backup and restore.
>>>
>>> --
>>> Tibor Karaszi, SQL Server MVP
>>> http://www.karaszi.com/sqlserver/default.asp
>>> http://www.solidqualitylearning.com/
>>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>>
>>>
>>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
>>> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
>>> Hi I have a database with tables, views, stored procedures and
>>> want to put a copy of it on another server. Just wondering an
>>> easy way to do this? I have Enterprise manager, SQL query
>>> analyzer as well. --
>>> Paul G
>>> Software engineer.|||thanks for the additional information.--
Paul G
Software engineer.
"Steen Persson (DK)" wrote:
> It seems like you've mixed things up....
> When you backup the database, you get a file with the extention .BAK
> (..actually it can have what ever extension you give it, but .BAK it the
> "standard"). This .BAK file is just a normal file that you can copy as any
> other file. If you copy this file to a location on your destination server,
> you can restore this file on the destination server, and then you'll have an
> exact copy of your database.
> When you use sp_detach_db/sp_attach_db it's the actual files belonging to
> the database you are working with (Database and logfiles). If you run
> sp_detach_db, you'll have to copy the .mdf and .ldf file from the source
> server to the destination server. When you've copied the files, you'll have
> to run sp_attach_db BOTH on the source server (to get the database attach
> again) and on the destination server (to get the database created).
> Both the BACKUP/RESTORE and sp_detach_db/sp_attach_db syntaxes can be found
> in Books On Line.
> Regards
> Steen
> Paul wrote:
> > I ended up creating an empty database at the desintation machine and
> > then using export data wizard from the source dbase (EM). Seemed to
> > work ok.
> >
> >> Hi thanks for all the replies. I created a sample database and then
> >> backed it up. I then detatched it but could not find it to
> >> re-attatch it. I tried to re-attatch the backup but it said this is
> >> not a correct file format. Also when I actually copy it over do I
> >> use the database wizard?
> >>
> >> --
> >> Paul G
> >> Software engineer.
> >>
> >>
> >> "Ron Hinds" wrote:
> >>
> >> Here's a link that might help you:
> >>
> >> http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
> >>
> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> >> news:72B3B21C-D957-4226-AA06-110D04620F41@.microsoft.com...
> >> Hi thanks for the additional information. Just had a question on
> >> the copy, I found the back and restore as part of the tools of EM.
> >> I could not find the copy, can you copy the dbase just like a
> >> standard file from explorer? --
> >> Paul G
> >> Software engineer.
> >>
> >>
> >> "Tibor Karaszi" wrote:
> >>
> >> Do the backup on the source machine. Copy the backup file to the
> >> target machine. Then do the restore on that (which you can do
> >> remotely in EM , connected to the target machine..).
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>
> >>
> >> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> >> news:518F6560-9DF4-4BC9-8C06-670309756C98@.microsoft.com...
> >> ok can I do this from Enterprise manager on the source machine?
> >> thanks.
> >> --
> >> Paul G
> >> Software engineer.
> >>
> >>
> >> "Tibor Karaszi" wrote:
> >>
> >>> I prefer backup and restore.
> >>>
> >>> --
> >>> Tibor Karaszi, SQL Server MVP
> >>> http://www.karaszi.com/sqlserver/default.asp
> >>> http://www.solidqualitylearning.com/
> >>> Blog: http://solidqualitylearning.com/blogs/tibor/
> >>>
> >>>
> >>> "Paul" <Paul@.discussions.microsoft.com> wrote in message
> >>> news:88EC11CC-6E28-4CE0-91DF-2B38E96D19B4@.microsoft.com...
> >>> Hi I have a database with tables, views, stored procedures and
> >>> want to put a copy of it on another server. Just wondering an
> >>> easy way to do this? I have Enterprise manager, SQL query
> >>> analyzer as well. --
> >>> Paul G
> >>> Software engineer.
>
>
Copy database compability
Hi,
In sql 2000 was possible to copy entire database objects from one db to another. This includes tables, pk, indexes, views, sp, functions, logins and so on.
This is very usefull because at the same time it creates a full log with entire database scripting, it can be used to track changes in databases.
In sql 2005, I can't find a solution like this.
Someone have an idea to this?
Hi
Even in SQL2005 you can copy whole database with complete schema intact using SSIS (Transfer database task).
Thanx
Wednesday, March 7, 2012
Copy a view
Hi
At home i have sqlserver and at work we have sqlserver
At home i have make some views i also would like to use
on the server at work
To day i try to use import from my server to the server at work
but when i import my views the views become a table on the server at work
Is there a way to copy/import the views on from my server at home to the server at work
On my work can i connect to my server at home, so this is not the problem.
Or shall i make new views on the server at work?
Alvin
You could script the views to files (at home) and then take the scripted views to work, open them and execute and the views will get created on your work Server
In Server Management Studio, right click the view you want to script and choose
Script View >> as CREATE >> to File...
The file created will have an extension of .sql but it is a text file...
OR
If you can connect to your server from work, you can do the above, but change >> to File TO >> to New Query Editor Window and then you can cut/paste the script into your work server and execute to create the view...
|||
Thanks
Alvin
Sunday, February 12, 2012
Converting SP to SQL Server 2005
200 stored procedures and 30 views.
I would like to convert this SQL Server 2000 database to a SQL Server 2005
database.
Have are the differences that I will have converting this database with
triggers, indexes, stored procedures, and views.
Thank You,You can run the SQL 2005 upgrade advisor against your database to identify
items you need to address before/after the conversion. In any case, it's a
good idea to test before upgrading production databases.
Hope this helps.
Dan Guzman
SQL Server MVP
"Joe K." <Joe K.@.discussions.microsoft.com> wrote in message
news:CDB6A87F-2BA7-4292-A7E8-3EA987E52006@.microsoft.com...
> I have a SQL Server 2000 database that is approximately 100 GB in size
> with
> 200 stored procedures and 30 views.
> I would like to convert this SQL Server 2000 database to a SQL Server 2005
> database.
> Have are the differences that I will have converting this database with
> triggers, indexes, stored procedures, and views.
> Thank You,
Friday, February 10, 2012
Converting MSDE 7 to SQL2000?
I am trying to upgrade a program that used MSDE 7 but now
migrating to SQL2000. I performed a tables & Views import
from one server to another however the program returns
errors when trying to intall its upgrade:
SQL Error Message from
CBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE:
42S01 Native error: 2714 Message: There is already an
object named 'vMDSMap' in the database.
It looks like it has changed the format of the db during
the import. Has anyone successfully migrated from MSDE 7
to SQL2000?
Thanks
The simplest way I'd use is:
1. On the MSDE1.0 (SQL Server7, not MSDE 7) computer, detach the said
database.
2. Copy the *.mdf and *.ldf files to the SQL Server2000 computer.
3. Attach the files to SQL 2000.
"Andreas" <a_kaestel@.connexus.net.au> wrote in message
news:035901c4fa2a$7b9b9220$a501280a@.phx.gbl...
> Hi All,
> I am trying to upgrade a program that used MSDE 7 but now
> migrating to SQL2000. I performed a tables & Views import
> from one server to another however the program returns
> errors when trying to intall its upgrade:
> SQL Error Message from
> CBESDBInstaller::ExecuteSql.executeDirect: SQLSTATE:
> 42S01 Native error: 2714 Message: There is already an
> object named 'vMDSMap' in the database.
> It looks like it has changed the format of the db during
> the import. Has anyone successfully migrated from MSDE 7
> to SQL2000?
> Thanks