Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts

Thursday, March 29, 2012

correct way to backup?

hi,
to backup my sql server 2000 databases, I right click on the database name
(from enterprise mgr),select the backup database option, choose 'database
complete' , and then add a filename as the destination. I backup to a files
on the harddisk and then backs up those files to a tape.
Is this a good backup process? I mean, the way I am doing it, will it backup
the complete database, the users on that database, etc? And will I have
problems while restoring? By restoring, I mean I will create a new database
(empty) by the same name in a different machine and then restore it from the
backup file.Will the users in that database also get restored?
Your suggestions are very much appreciated.
thanks!!HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/defaul...kb;en-us;314546
AMB
"rtn" wrote:

> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a file
s
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it back
up
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new databas
e
> (empty) by the same name in a different machine and then restore it from t
he
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!|||This is a good start. You need to automate the process somehow. The
database maintenance wizard offers some help or you can write scripts and
use the SQL agent to schedule them. The most important thing is to test
your recovery process. Restore the databases somewhere. See what you get.
Document the process and any extra recovery steps you figure out. You don't
want to be figuring this out under the time crunch of a down system.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a
> files
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it
> backup
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new
> database
> (empty) by the same name in a different machine and then restore it from
> the
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!|||thanks for your reply.
I tried a test recovery. All goes well, expect the fact that users that are
present in the original database does not get restored. I think everything
except the users get restored.
any suggestions on this would be greatly appreciated.
thanks!
"Geoff N. Hiten" wrote:

> This is a good start. You need to automate the process somehow. The
> database maintenance wizard offers some help or you can write scripts and
> use the SQL agent to schedule them. The most important thing is to test
> your recovery process. Restore the databases somewhere. See what you get
.
> Document the process and any extra recovery steps you figure out. You don
't
> want to be figuring this out under the time crunch of a down system.
> Geoff N. Hiten
> Microsoft SQL Server MVP
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
>
>|||Look up sp_change_users_login in BOL to relink users and logins. The users
still exist, it is just the logins they link to are not on the restore
server. That is part of what I meant by documenting the entire recovery
process. What changes do you need to make to the server and the environment
to replace a failed server? That is what you have to document. Restoring a
database is a very small part of the entire recovery process.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...[vbcol=seagreen]
> thanks for your reply.
> I tried a test recovery. All goes well, expect the fact that users that
> are
> present in the original database does not get restored. I think everything
> except the users get restored.
> any suggestions on this would be greatly appreciated.
> thanks!
> "Geoff N. Hiten" wrote:
>|||thanks for the help again. As you said, sp_change_users_login did the job of
linking the SQL users and the logins. I documented the procedure.
two more quick questions.
1. this stored procedure doesn't work with windows users. In addition to sql
users, my databases also have a few windows users. How can I go about
restoring these windows users and their permissions?
2. also, this stored procedure doesn't work for dbo etc. So what can i do
about restoring dbo, etc
thanks again, you have been a major help.
"Geoff N. Hiten" wrote:

> Look up sp_change_users_login in BOL to relink users and logins. The user
s
> still exist, it is just the logins they link to are not on the restore
> server. That is part of what I meant by documenting the entire recovery
> process. What changes do you need to make to the server and the environme
nt
> to replace a failed server? That is what you have to document. Restoring
a
> database is a very small part of the entire recovery process.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...
>
>

correct way to backup?

hi,
to backup my sql server 2000 databases, I right click on the database name
(from enterprise mgr),select the backup database option, choose 'database
complete' , and then add a filename as the destination. I backup to a files
on the harddisk and then backs up those files to a tape.
Is this a good backup process? I mean, the way I am doing it, will it backup
the complete database, the users on that database, etc? And will I have
problems while restoring? By restoring, I mean I will create a new database
(empty) by the same name in a different machine and then restore it from the
backup file.Will the users in that database also get restored?
Your suggestions are very much appreciated.
thanks!!HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"rtn" wrote:
> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a files
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it backup
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new database
> (empty) by the same name in a different machine and then restore it from the
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!|||This is a good start. You need to automate the process somehow. The
database maintenance wizard offers some help or you can write scripts and
use the SQL agent to schedule them. The most important thing is to test
your recovery process. Restore the databases somewhere. See what you get.
Document the process and any extra recovery steps you figure out. You don't
want to be figuring this out under the time crunch of a down system.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a
> files
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it
> backup
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new
> database
> (empty) by the same name in a different machine and then restore it from
> the
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!|||thanks for your reply.
I tried a test recovery. All goes well, expect the fact that users that are
present in the original database does not get restored. I think everything
except the users get restored.
any suggestions on this would be greatly appreciated.
thanks!
"Geoff N. Hiten" wrote:
> This is a good start. You need to automate the process somehow. The
> database maintenance wizard offers some help or you can write scripts and
> use the SQL agent to schedule them. The most important thing is to test
> your recovery process. Restore the databases somewhere. See what you get.
> Document the process and any extra recovery steps you figure out. You don't
> want to be figuring this out under the time crunch of a down system.
> Geoff N. Hiten
> Microsoft SQL Server MVP
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
> > hi,
> >
> > to backup my sql server 2000 databases, I right click on the database name
> > (from enterprise mgr),select the backup database option, choose 'database
> > complete' , and then add a filename as the destination. I backup to a
> > files
> > on the harddisk and then backs up those files to a tape.
> >
> > Is this a good backup process? I mean, the way I am doing it, will it
> > backup
> > the complete database, the users on that database, etc? And will I have
> > problems while restoring? By restoring, I mean I will create a new
> > database
> > (empty) by the same name in a different machine and then restore it from
> > the
> > backup file.Will the users in that database also get restored?
> >
> > Your suggestions are very much appreciated.
> >
> > thanks!!
>
>|||Look up sp_change_users_login in BOL to relink users and logins. The users
still exist, it is just the logins they link to are not on the restore
server. That is part of what I meant by documenting the entire recovery
process. What changes do you need to make to the server and the environment
to replace a failed server? That is what you have to document. Restoring a
database is a very small part of the entire recovery process.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...
> thanks for your reply.
> I tried a test recovery. All goes well, expect the fact that users that
> are
> present in the original database does not get restored. I think everything
> except the users get restored.
> any suggestions on this would be greatly appreciated.
> thanks!
> "Geoff N. Hiten" wrote:
>> This is a good start. You need to automate the process somehow. The
>> database maintenance wizard offers some help or you can write scripts and
>> use the SQL agent to schedule them. The most important thing is to test
>> your recovery process. Restore the databases somewhere. See what you
>> get.
>> Document the process and any extra recovery steps you figure out. You
>> don't
>> want to be figuring this out under the time crunch of a down system.
>> Geoff N. Hiten
>> Microsoft SQL Server MVP
>> "rtn" <rtn@.discussions.microsoft.com> wrote in message
>> news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
>> > hi,
>> >
>> > to backup my sql server 2000 databases, I right click on the database
>> > name
>> > (from enterprise mgr),select the backup database option, choose
>> > 'database
>> > complete' , and then add a filename as the destination. I backup to a
>> > files
>> > on the harddisk and then backs up those files to a tape.
>> >
>> > Is this a good backup process? I mean, the way I am doing it, will it
>> > backup
>> > the complete database, the users on that database, etc? And will I have
>> > problems while restoring? By restoring, I mean I will create a new
>> > database
>> > (empty) by the same name in a different machine and then restore it
>> > from
>> > the
>> > backup file.Will the users in that database also get restored?
>> >
>> > Your suggestions are very much appreciated.
>> >
>> > thanks!!
>>|||thanks for the help again. As you said, sp_change_users_login did the job of
linking the SQL users and the logins. I documented the procedure.
two more quick questions.
1. this stored procedure doesn't work with windows users. In addition to sql
users, my databases also have a few windows users. How can I go about
restoring these windows users and their permissions?
2. also, this stored procedure doesn't work for dbo etc. So what can i do
about restoring dbo, etc
thanks again, you have been a major help.
"Geoff N. Hiten" wrote:
> Look up sp_change_users_login in BOL to relink users and logins. The users
> still exist, it is just the logins they link to are not on the restore
> server. That is part of what I meant by documenting the entire recovery
> process. What changes do you need to make to the server and the environment
> to replace a failed server? That is what you have to document. Restoring a
> database is a very small part of the entire recovery process.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...
> > thanks for your reply.
> >
> > I tried a test recovery. All goes well, expect the fact that users that
> > are
> > present in the original database does not get restored. I think everything
> > except the users get restored.
> >
> > any suggestions on this would be greatly appreciated.
> >
> > thanks!
> >
> > "Geoff N. Hiten" wrote:
> >
> >> This is a good start. You need to automate the process somehow. The
> >> database maintenance wizard offers some help or you can write scripts and
> >> use the SQL agent to schedule them. The most important thing is to test
> >> your recovery process. Restore the databases somewhere. See what you
> >> get.
> >> Document the process and any extra recovery steps you figure out. You
> >> don't
> >> want to be figuring this out under the time crunch of a down system.
> >>
> >> Geoff N. Hiten
> >> Microsoft SQL Server MVP
> >>
> >> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> >> news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
> >> > hi,
> >> >
> >> > to backup my sql server 2000 databases, I right click on the database
> >> > name
> >> > (from enterprise mgr),select the backup database option, choose
> >> > 'database
> >> > complete' , and then add a filename as the destination. I backup to a
> >> > files
> >> > on the harddisk and then backs up those files to a tape.
> >> >
> >> > Is this a good backup process? I mean, the way I am doing it, will it
> >> > backup
> >> > the complete database, the users on that database, etc? And will I have
> >> > problems while restoring? By restoring, I mean I will create a new
> >> > database
> >> > (empty) by the same name in a different machine and then restore it
> >> > from
> >> > the
> >> > backup file.Will the users in that database also get restored?
> >> >
> >> > Your suggestions are very much appreciated.
> >> >
> >> > thanks!!
> >>
> >>
> >>
>
>sql

correct way to backup?

hi,
to backup my sql server 2000 databases, I right click on the database name
(from enterprise mgr),select the backup database option, choose 'database
complete' , and then add a filename as the destination. I backup to a files
on the harddisk and then backs up those files to a tape.
Is this a good backup process? I mean, the way I am doing it, will it backup
the complete database, the users on that database, etc? And will I have
problems while restoring? By restoring, I mean I will create a new database
(empty) by the same name in a different machine and then restore it from the
backup file.Will the users in that database also get restored?
Your suggestions are very much appreciated.
thanks!!
HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default...b;en-us;314546
AMB
"rtn" wrote:

> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a files
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it backup
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new database
> (empty) by the same name in a different machine and then restore it from the
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!
|||This is a good start. You need to automate the process somehow. The
database maintenance wizard offers some help or you can write scripts and
use the SQL agent to schedule them. The most important thing is to test
your recovery process. Restore the databases somewhere. See what you get.
Document the process and any extra recovery steps you figure out. You don't
want to be figuring this out under the time crunch of a down system.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
> hi,
> to backup my sql server 2000 databases, I right click on the database name
> (from enterprise mgr),select the backup database option, choose 'database
> complete' , and then add a filename as the destination. I backup to a
> files
> on the harddisk and then backs up those files to a tape.
> Is this a good backup process? I mean, the way I am doing it, will it
> backup
> the complete database, the users on that database, etc? And will I have
> problems while restoring? By restoring, I mean I will create a new
> database
> (empty) by the same name in a different machine and then restore it from
> the
> backup file.Will the users in that database also get restored?
> Your suggestions are very much appreciated.
> thanks!!
|||thanks for your reply.
I tried a test recovery. All goes well, expect the fact that users that are
present in the original database does not get restored. I think everything
except the users get restored.
any suggestions on this would be greatly appreciated.
thanks!
"Geoff N. Hiten" wrote:

> This is a good start. You need to automate the process somehow. The
> database maintenance wizard offers some help or you can write scripts and
> use the SQL agent to schedule them. The most important thing is to test
> your recovery process. Restore the databases somewhere. See what you get.
> Document the process and any extra recovery steps you figure out. You don't
> want to be figuring this out under the time crunch of a down system.
> Geoff N. Hiten
> Microsoft SQL Server MVP
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:DF6C6D32-9A0C-4866-9918-79EAFF6DEEB1@.microsoft.com...
>
>
|||Look up sp_change_users_login in BOL to relink users and logins. The users
still exist, it is just the logins they link to are not on the restore
server. That is part of what I meant by documenting the entire recovery
process. What changes do you need to make to the server and the environment
to replace a failed server? That is what you have to document. Restoring a
database is a very small part of the entire recovery process.
Geoff N. Hiten
Microsoft SQL Server MVP
"rtn" <rtn@.discussions.microsoft.com> wrote in message
news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...[vbcol=seagreen]
> thanks for your reply.
> I tried a test recovery. All goes well, expect the fact that users that
> are
> present in the original database does not get restored. I think everything
> except the users get restored.
> any suggestions on this would be greatly appreciated.
> thanks!
> "Geoff N. Hiten" wrote:
|||thanks for the help again. As you said, sp_change_users_login did the job of
linking the SQL users and the logins. I documented the procedure.
two more quick questions.
1. this stored procedure doesn't work with windows users. In addition to sql
users, my databases also have a few windows users. How can I go about
restoring these windows users and their permissions?
2. also, this stored procedure doesn't work for dbo etc. So what can i do
about restoring dbo, etc
thanks again, you have been a major help.
"Geoff N. Hiten" wrote:

> Look up sp_change_users_login in BOL to relink users and logins. The users
> still exist, it is just the logins they link to are not on the restore
> server. That is part of what I meant by documenting the entire recovery
> process. What changes do you need to make to the server and the environment
> to replace a failed server? That is what you have to document. Restoring a
> database is a very small part of the entire recovery process.
> Geoff N. Hiten
> Microsoft SQL Server MVP
>
> "rtn" <rtn@.discussions.microsoft.com> wrote in message
> news:AEE9F493-416C-46FD-A410-6E8473C0C10A@.microsoft.com...
>
>

Tuesday, March 27, 2012

Copying/migrating SQL 7 Databases over to SQL 2005

Hi,
I've been trying to work out how to copy 2 small databases from an old
SQL7 server to a new 2005 server. I'll admit straight away that i'm
totally new to the world of SQL, so i'm stuggling a little.
I used the "backup database" function and saved to file on the old
server. I then copied them over to the test server and tried to
"restore" each of them.
It errors for both when I do this. It appears to be because on the
SQL7 server, each database sits on a F: partition, and i have setup
the test server using just a C: drive.
Thanks for reading!
nade
Take a look at WITH MOVE option of RESTORE command in the BOL
"nade" <nadeboy@.gmail.com> wrote in message
news:1172054201.292745.29510@.a75g2000cwd.googlegro ups.com...
> Hi,
> I've been trying to work out how to copy 2 small databases from an old
> SQL7 server to a new 2005 server. I'll admit straight away that i'm
> totally new to the world of SQL, so i'm stuggling a little.
> I used the "backup database" function and saved to file on the old
> server. I then copied them over to the test server and tried to
> "restore" each of them.
> It errors for both when I do this. It appears to be because on the
> SQL7 server, each database sits on a F: partition, and i have setup
> the test server using just a C: drive.
> Thanks for reading!
>

Copying/migrating SQL 7 Databases over to SQL 2005

Hi,
I've been trying to work out how to copy 2 small databases from an old
SQL7 server to a new 2005 server. I'll admit straight away that i'm
totally new to the world of SQL, so i'm stuggling a little.
I used the "backup database" function and saved to file on the old
server. I then copied them over to the test server and tried to
"restore" each of them.
It errors for both when I do this. It appears to be because on the
SQL7 server, each database sits on a F: partition, and i have setup
the test server using just a C: drive.
Thanks for reading!nade
Take a look at WITH MOVE option of RESTORE command in the BOL
"nade" <nadeboy@.gmail.com> wrote in message
news:1172054201.292745.29510@.a75g2000cwd.googlegroups.com...
> Hi,
> I've been trying to work out how to copy 2 small databases from an old
> SQL7 server to a new 2005 server. I'll admit straight away that i'm
> totally new to the world of SQL, so i'm stuggling a little.
> I used the "backup database" function and saved to file on the old
> server. I then copied them over to the test server and tried to
> "restore" each of them.
> It errors for both when I do this. It appears to be because on the
> SQL7 server, each database sits on a F: partition, and i have setup
> the test server using just a C: drive.
> Thanks for reading!
>

Copying/migrating SQL 7 Databases over to SQL 2005

Hi,
I've been trying to work out how to copy 2 small databases from an old
SQL7 server to a new 2005 server. I'll admit straight away that i'm
totally new to the world of SQL, so i'm stuggling a little.
I used the "backup database" function and saved to file on the old
server. I then copied them over to the test server and tried to
"restore" each of them.
It errors for both when I do this. It appears to be because on the
SQL7 server, each database sits on a F: partition, and i have setup
the test server using just a C: drive.
Thanks for reading!nade
Take a look at WITH MOVE option of RESTORE command in the BOL
"nade" <nadeboy@.gmail.com> wrote in message
news:1172054201.292745.29510@.a75g2000cwd.googlegroups.com...
> Hi,
> I've been trying to work out how to copy 2 small databases from an old
> SQL7 server to a new 2005 server. I'll admit straight away that i'm
> totally new to the world of SQL, so i'm stuggling a little.
> I used the "backup database" function and saved to file on the old
> server. I then copied them over to the test server and tried to
> "restore" each of them.
> It errors for both when I do this. It appears to be because on the
> SQL7 server, each database sits on a F: partition, and i have setup
> the test server using just a C: drive.
> Thanks for reading!
>

Copying Views and Stored Procedures

Hello All,
I have two SQL databases which have the exact same tables - just different data. In database A there are only tables. In database B there are tables, stored procedures and views. I need to transfer the stored procedures and views from database B into database A. Is there a way to do this?
Thanks in advanceDTS or Script it. Your pick.|||Thank You.

I was playing around with it and I used a script. Thanks for your reply.|||What about contraints?

Just make sure you do them in the correct order...ie if a sproc references a view...

I guess if you did you'd just get a warning message...and once it was reference it would be resolved...

Anyone experience this?|||Originally posted by Brett Kaiser
What about contraints?

Just make sure you do them in the correct order...ie if a sproc references a view...

I guess if you did you'd just get a warning message...and once it was reference it would be resolved...

Anyone experience this?

I believe no entries would be inserted into sysdepends for the sproc corresponding to the view... which would lead to the view not showing up when you do a sp_depends on the sproc ...

Copying views

I have two databases A & B, I copied all of the tabels and data from A
to B. I can't figure out how to copy the Views and Stored procedures
from A to B. As you can see I'm new at this, can anyone point me in
the right direction? Oh... forgot running SQL 2000.

Thanks[posted and mailed, please reply in news]

Jim Davidson (raccoon@.icubed.com) writes:
> I have two databases A & B, I copied all of the tabels and data from A
> to B. I can't figure out how to copy the Views and Stored procedures
> from A to B. As you can see I'm new at this, can anyone point me in
> the right direction? Oh... forgot running SQL 2000.

If you want to make a complete copy of a database, there are certainly
easier ways to go. The below assumes that you run Query Analyzer:

exec sp_helpdb yourdb
-- Make notice of the values in the name and filename columns. (Cut
-- and paste to query window.)

BACKUP DATABASE yourdb TO DISK = 'C:\temp\yourbackup.bak'
RESTORE DATABASE yourdbcopy FROM DISK = 'C:\temp\yourbackup.bak'
WITH MOVE 'yourdb' TO 'C:\MSSQL\Data\copyofyourdb.mdf',
MOVE 'yourdblog' TO 'C:\MSSQL\Data\copyofyourdb.ldf',
REPLACE
EXEC master..xp_cmdshell 'DEL C:\temp\yourbackup.bak'

In the RESTORE command replace yourdb and yourdblog with the values
from the name column in the sp_helpdb output, and in paths, replace
the directory paths with the value from the filename columns. You
must change the file name.

Note that RESTORE DATABASE creates the database if it does not exist.

You can also do the backup and restore stuff from Enterprise Manager,
but I am more confident with the T-SQL commands, so I cannot describe
those dialogs.

An alternative, is to use sp_detach_db, copy the database files and
then use sp_attach_db on the copy and the original.

As for the original question, the answer is that you should maintain
all your SQL objects under version control and reload from the source
there. You can also use the scripting facilities in Enterprise
Manager. Right-click the database, and select All Tasks and then
Generate SQL Scripts.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

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

Sunday, March 25, 2012

Copying users to new server

I'm new to SQL server and am installing a new server that I will be copying
from a old server to new. I've restored the databases but am trying to cop
y
over the users and security.
Is there a simple way to copy over the users and security to the new server?> I'm new to SQL server and am installing a new server that I will be
copying
> from a old server to new. I've restored the databases but am trying to
copy
> over the users and security.
> Is there a simple way to copy over the users and security to the new
server?
Yes, script them. In EM, right-click on your database, select All Tasks -
Generate SQL Script; on the Options tab, select
Script database users and database roles and
Script object-level permissions.
Generate the script and execute it in your new db.
BTW, I suppose you have the same logins.
Dejan Sarka, SQL Server MVP
Associate Mentor
www.SolidQualityLearning.com|||Dejan
I think although he/she has the same logins moving users to the new server
may cause the problem due to the different SID of the logins.
I'd go with two stored procedures provided by Microsoft to move logins.
"Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@.avtenta.si> wrote in
message news:eeySs4qLFHA.2988@.TK2MSFTNGP14.phx.gbl...
> copying
> copy
> server?
> Yes, script them. In EM, right-click on your database, select All Tasks -
> Generate SQL Script; on the Options tab, select
> Script database users and database roles and
> Script object-level permissions.
> Generate the script and execute it in your new db.
> BTW, I suppose you have the same logins.
> --
> Dejan Sarka, SQL Server MVP
> Associate Mentor
> www.SolidQualityLearning.com
>|||http://support.microsoft.com/defaul...kb;en-us;246133
"kcsheff" wrote:
[vbcol=seagreen]
> I'm new to SQL server and am installing a new server that I will be copyin
g
> from a old server to new. I've restored the databases but am trying to c
opy
> over the users and security.
> Is there a simple way to copy over the users and security to the new server?[/vbco
l]

copying tables from one database to another database

i am using visual web developer 2005 and SQL Express 2005 with VB as the code behind

i have two databases .

i want to copy all the tables with all the contents from one database to another database programatically

how to achieve this ?

please help me

easiest way is to use the detach - attach method or backup and restoresql

Copying tables between two databases

I am trying to copy the chart of accounts from Fabrikam to a newly created
company. I am running SQL 2005 and Dynamics GP 9.0.
I am following the steps from article 866332 in the knowledge base. This
process has the user copying some database tables from one database to
another database.
I perform the steps but when I try to execute the process, I get the following
errors:
Operation stopped...
- Initializing Data Flow Task (Success)
- Initializing Connections (Success)
- Setting SQL Command (Success)
- Setting Source Connection (Success)
- Setting Destination Connection (Success)
- Validating (Error)
Messages
* Error 0xc0202049: Data Flow Task: Failure inserting into the
read-only column "DEX_ROW_ID".
(SQL Server Import and Export Wizard)
* Error 0xc0202045: Data Flow Task: Column metadata validation
failed.
(SQL Server Import and Export Wizard)
* Error 0xc004706b: Data Flow Task: "component "Destination -
GL00100" (139)" failed validation and returned validation status
"VS_ISBROKEN".
(SQL Server Import and Export Wizard)
* Error 0xc004700c: Data Flow Task: One or more component failed
validation.
(SQL Server Import and Export Wizard)
* Error 0xc0024107: Data Flow Task: There were errors during task
validation.
(SQL Server Import and Export Wizard)
- Prepare for Execute (Stopped)
- Pre-execute (Stopped)
- Executing (Success)
- Copying to [FS].[dbo].[GL00100] (Stopped)
- Copying to [FS].[dbo].[GL00102] (Stopped)
- Copying to [FS].[dbo].[GL00103] (Stopped)
- Copying to [FS].[dbo].[GL00104] (Stopped)
- Copying to [FS].[dbo].[GL00105] (Stopped)
- Copying to [FS].[dbo].[GL40200] (Stopped)
- Post-execute (Stopped)
- Cleanup (Stopped)
Any idea what the problem is?
Thanks.
Jerry Flatto
On Mar 24, 2:04 am, Jerry Flatto
<JerryFla...@.discussions.microsoft.com> wrote:
> I am trying to copy the chart of accounts from Fabrikam to a newly created
> company. I am running SQL 2005 and Dynamics GP 9.0.
> I am following the steps from article 866332 in the knowledge base. This
> process has the user copying some database tables from one database to
> another database.
> I perform the steps but when I try to execute the process, I get the following
> errors:
> Operation stopped...
> - Initializing Data Flow Task (Success)
> - Initializing Connections (Success)
> - Setting SQL Command (Success)
> - Setting Source Connection (Success)
> - Setting Destination Connection (Success)
> - Validating (Error)
> Messages
> * Error 0xc0202049: Data Flow Task: Failure inserting into the
> read-only column "DEX_ROW_ID".
> (SQL Server Import and Export Wizard)
> * Error 0xc0202045: Data Flow Task: Column metadata validation
> failed.
> (SQL Server Import and Export Wizard)
> * Error 0xc004706b: Data Flow Task: "component "Destination -
> GL00100" (139)" failed validation and returned validation status
> "VS_ISBROKEN".
> (SQL Server Import and Export Wizard)
> * Error 0xc004700c: Data Flow Task: One or more component failed
> validation.
> (SQL Server Import and Export Wizard)
> * Error 0xc0024107: Data Flow Task: There were errors during task
> validation.
> (SQL Server Import and Export Wizard)
> - Prepare for Execute (Stopped)
> - Pre-execute (Stopped)
> - Executing (Success)
> - Copying to [FS].[dbo].[GL00100] (Stopped)
> - Copying to [FS].[dbo].[GL00102] (Stopped)
> - Copying to [FS].[dbo].[GL00103] (Stopped)
> - Copying to [FS].[dbo].[GL00104] (Stopped)
> - Copying to [FS].[dbo].[GL00105] (Stopped)
> - Copying to [FS].[dbo].[GL40200] (Stopped)
> - Post-execute (Stopped)
> - Cleanup (Stopped)
> Any idea what the problem is?
> Thanks.
> Jerry Flatto
DEX_ROW_ID seems to be timestamp column which can not be imported

Copying tables between two databases

I am trying to copy the chart of accounts from Fabrikam to a newly created
company. I am running SQL 2005 and Dynamics GP 9.0.
I am following the steps from article 866332 in the knowledge base. This
process has the user copying some database tables from one database to
another database.
I perform the steps but when I try to execute the process, I get the followi
ng
errors:
Operation stopped...
- Initializing Data Flow Task (Success)
- Initializing Connections (Success)
- Setting SQL Command (Success)
- Setting Source Connection (Success)
- Setting Destination Connection (Success)
- Validating (Error)
Messages
* Error 0xc0202049: Data Flow Task: Failure inserting into the
read-only column "DEX_ROW_ID".
(SQL Server Import and Export Wizard)
* Error 0xc0202045: Data Flow Task: Column metadata validation
failed.
(SQL Server Import and Export Wizard)
* Error 0xc004706b: Data Flow Task: "component "Destination -
GL00100" (139)" failed validation and returned validation status
"VS_ISBROKEN".
(SQL Server Import and Export Wizard)
* Error 0xc004700c: Data Flow Task: One or more component failed
validation.
(SQL Server Import and Export Wizard)
* Error 0xc0024107: Data Flow Task: There were errors during task
validation.
(SQL Server Import and Export Wizard)
- Prepare for Execute (Stopped)
- Pre-execute (Stopped)
- Executing (Success)
- Copying to [FS].[dbo].[GL00100] (Stopped)
- Copying to [FS].[dbo].[GL00102] (Stopped)
- Copying to [FS].[dbo].[GL00103] (Stopped)
- Copying to [FS].[dbo].[GL00104] (Stopped)
- Copying to [FS].[dbo].[GL00105] (Stopped)
- Copying to [FS].[dbo].[GL40200] (Stopped)
- Post-execute (Stopped)
- Cleanup (Stopped)
Any idea what the problem is?
Thanks.
Jerry FlattoOn Mar 24, 2:04 am, Jerry Flatto
<JerryFla...@.discussions.microsoft.com> wrote:
> I am trying to copy the chart of accounts from Fabrikam to a newly create
d
> company. I am running SQL 2005 and Dynamics GP 9.0.
> I am following the steps from article 866332 in the knowledge base. This
> process has the user copying some database tables from one database to
> another database.
> I perform the steps but when I try to execute the process, I get the follo
wing
> errors:
> Operation stopped...
> - Initializing Data Flow Task (Success)
> - Initializing Connections (Success)
> - Setting SQL Command (Success)
> - Setting Source Connection (Success)
> - Setting Destination Connection (Success)
> - Validating (Error)
> Messages
> * Error 0xc0202049: Data Flow Task: Failure inserting into the
> read-only column "DEX_ROW_ID".
> (SQL Server Import and Export Wizard)
> * Error 0xc0202045: Data Flow Task: Column metadata validation
> failed.
> (SQL Server Import and Export Wizard)
> * Error 0xc004706b: Data Flow Task: "component "Destination -
> GL00100" (139)" failed validation and returned validation status
> "VS_ISBROKEN".
> (SQL Server Import and Export Wizard)
> * Error 0xc004700c: Data Flow Task: One or more component failed
> validation.
> (SQL Server Import and Export Wizard)
> * Error 0xc0024107: Data Flow Task: There were errors during task
> validation.
> (SQL Server Import and Export Wizard)
> - Prepare for Execute (Stopped)
> - Pre-execute (Stopped)
> - Executing (Success)
> - Copying to [FS].[dbo].[GL00100] (Stopped)
> - Copying to [FS].[dbo].[GL00102] (Stopped)
> - Copying to [FS].[dbo].[GL00103] (Stopped)
> - Copying to [FS].[dbo].[GL00104] (Stopped)
> - Copying to [FS].[dbo].[GL00105] (Stopped)
> - Copying to [FS].[dbo].[GL40200] (Stopped)
> - Post-execute (Stopped)
> - Cleanup (Stopped)
> Any idea what the problem is?
> Thanks.
> Jerry Flatto
DEX_ROW_ID seems to be timestamp column which can not be imported

Copying tables between two databases

I am trying to copy the chart of accounts from Fabrikam to a newly created
company. I am running SQL 2005 and Dynamics GP 9.0.
I am following the steps from article 866332 in the knowledge base. This
process has the user copying some database tables from one database to
another database.
I perform the steps but when I try to execute the process, I get the following
errors:
Operation stopped...
- Initializing Data Flow Task (Success)
- Initializing Connections (Success)
- Setting SQL Command (Success)
- Setting Source Connection (Success)
- Setting Destination Connection (Success)
- Validating (Error)
Messages
* Error 0xc0202049: Data Flow Task: Failure inserting into the
read-only column "DEX_ROW_ID".
(SQL Server Import and Export Wizard)
* Error 0xc0202045: Data Flow Task: Column metadata validation
failed.
(SQL Server Import and Export Wizard)
* Error 0xc004706b: Data Flow Task: "component "Destination -
GL00100" (139)" failed validation and returned validation status
"VS_ISBROKEN".
(SQL Server Import and Export Wizard)
* Error 0xc004700c: Data Flow Task: One or more component failed
validation.
(SQL Server Import and Export Wizard)
* Error 0xc0024107: Data Flow Task: There were errors during task
validation.
(SQL Server Import and Export Wizard)
- Prepare for Execute (Stopped)
- Pre-execute (Stopped)
- Executing (Success)
- Copying to [FS].[dbo].[GL00100] (Stopped)
- Copying to [FS].[dbo].[GL00102] (Stopped)
- Copying to [FS].[dbo].[GL00103] (Stopped)
- Copying to [FS].[dbo].[GL00104] (Stopped)
- Copying to [FS].[dbo].[GL00105] (Stopped)
- Copying to [FS].[dbo].[GL40200] (Stopped)
- Post-execute (Stopped)
- Cleanup (Stopped)
Any idea what the problem is?
Thanks.
Jerry FlattoOn Mar 24, 2:04 am, Jerry Flatto
<JerryFla...@.discussions.microsoft.com> wrote:
> I am trying to copy the chart of accounts from Fabrikam to a newly created
> company. I am running SQL 2005 and Dynamics GP 9.0.
> I am following the steps from article 866332 in the knowledge base. This
> process has the user copying some database tables from one database to
> another database.
> I perform the steps but when I try to execute the process, I get the following
> errors:
> Operation stopped...
> - Initializing Data Flow Task (Success)
> - Initializing Connections (Success)
> - Setting SQL Command (Success)
> - Setting Source Connection (Success)
> - Setting Destination Connection (Success)
> - Validating (Error)
> Messages
> * Error 0xc0202049: Data Flow Task: Failure inserting into the
> read-only column "DEX_ROW_ID".
> (SQL Server Import and Export Wizard)
> * Error 0xc0202045: Data Flow Task: Column metadata validation
> failed.
> (SQL Server Import and Export Wizard)
> * Error 0xc004706b: Data Flow Task: "component "Destination -
> GL00100" (139)" failed validation and returned validation status
> "VS_ISBROKEN".
> (SQL Server Import and Export Wizard)
> * Error 0xc004700c: Data Flow Task: One or more component failed
> validation.
> (SQL Server Import and Export Wizard)
> * Error 0xc0024107: Data Flow Task: There were errors during task
> validation.
> (SQL Server Import and Export Wizard)
> - Prepare for Execute (Stopped)
> - Pre-execute (Stopped)
> - Executing (Success)
> - Copying to [FS].[dbo].[GL00100] (Stopped)
> - Copying to [FS].[dbo].[GL00102] (Stopped)
> - Copying to [FS].[dbo].[GL00103] (Stopped)
> - Copying to [FS].[dbo].[GL00104] (Stopped)
> - Copying to [FS].[dbo].[GL00105] (Stopped)
> - Copying to [FS].[dbo].[GL40200] (Stopped)
> - Post-execute (Stopped)
> - Cleanup (Stopped)
> Any idea what the problem is?
> Thanks.
> Jerry Flatto
DEX_ROW_ID seems to be timestamp column which can not be importedsql

Copying tables between database

Hi
I have 2 user created databases in MS SQL Server 2000. Now I want to copy tables from one of this database to the other. The structure, relationships etc of these tables between these 2 databases are very similar. I searched high and low in BOL but could not find any info
Can some one help me in this please ...
Thanks
Harish MohanbabuHarish, you have many different solutions:
- SELECT col_list INTO db2.dbo.newtable FROM db1.dbo.oldtable - check
SELECT statement in Books OnLine
- Use Data Transformation Services (you can do it with the DTS Import/Export
Wizard) - check "DTS Import/Export Wizard" topic
- Create scripts, if you need metadata only, and implement scripts in the
new database - check "How to generate a script (Enterprise Manager)"
- ...
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Harish Mohanbabu" <anonymous@.discussions.microsoft.com> wrote in message
news:CFDD7D65-54E0-436D-8B40-51DBE7CA6E90@.microsoft.com...
> Hi,
> I have 2 user created databases in MS SQL Server 2000. Now I want to copy
tables from one of this database to the other. The structure, relationships
etc of these tables between these 2 databases are very similar. I searched
high and low in BOL but could not find any info.
> Can some one help me in this please ...
> Thanks,
> Harish Mohanbabu|||Hi,
Since you have the schema in both the databases, Probably you need to copy
the data from database to another in same server, then you can use
1. Copy only data
insert into tablename select * from dbname..tablename
2. If we need to replicate all the tables / users / procedures in one
database to another then you can Backup and Restore
Backup database dbname1 to disk='c:\dbname.bak' with init,stats=10
go
Restore database dbname2 from disk='c:\dbname.bak' with move
'logicaldatafilename' to 'newphysicalfile.mdf',
move 'logicallogfilename' to 'newphysicalfile.ldf'
Thanks
Hari
MCDBA
"Harish Mohanbabu" <anonymous@.discussions.microsoft.com> wrote in message
news:CFDD7D65-54E0-436D-8B40-51DBE7CA6E90@.microsoft.com...
> Hi,
> I have 2 user created databases in MS SQL Server 2000. Now I want to copy
tables from one of this database to the other. The structure, relationships
etc of these tables between these 2 databases are very similar. I searched
high and low in BOL but could not find any info.
> Can some one help me in this please ...
> Thanks,
> Harish Mohanbabu|||Hi Dejan/Hari,
Thank you very much for your kind replies. Since the structure of tables between databases were same, I used DTS to copy data between tables.
Cheers,
Harish Mohanbabu

Copying tables between database

Hi,
I have 2 user created databases in MS SQL Server 2000. Now I want to copy t
ables from one of this database to the other. The structure, relationships e
tc of these tables between these 2 databases are very similar. I searched h
igh and low in BOL but coul
d not find any info.
Can some one help me in this please ...
Thanks,
Harish MohanbabuHarish, you have many different solutions:
- SELECT col_list INTO db2.dbo.newtable FROM db1.dbo.oldtable - check
SELECT statement in Books OnLine
- Use Data Transformation Services (you can do it with the DTS Import/Export
Wizard) - check "DTS Import/Export Wizard" topic
- Create scripts, if you need metadata only, and implement scripts in the
new database - check "How to generate a script (Enterprise Manager)"
- ...
Dejan Sarka, SQL Server MVP
Associate Mentor
Solid Quality Learning
More than just Training
www.SolidQualityLearning.com
"Harish Mohanbabu" <anonymous@.discussions.microsoft.com> wrote in message
news:CFDD7D65-54E0-436D-8B40-51DBE7CA6E90@.microsoft.com...
> Hi,
> I have 2 user created databases in MS SQL Server 2000. Now I want to copy
tables from one of this database to the other. The structure, relationships
etc of these tables between these 2 databases are very similar. I searched
high and low in BOL but could not find any info.
> Can some one help me in this please ...
> Thanks,
> Harish Mohanbabu|||Hi,
Since you have the schema in both the databases, Probably you need to copy
the data from database to another in same server, then you can use
1. Copy only data
insert into tablename select * from dbname..tablename
2. If we need to replicate all the tables / users / procedures in one
database to another then you can Backup and Restore
Backup database dbname1 to disk='c:\dbname.bak' with init,stats=10
go
Restore database dbname2 from disk='c:\dbname.bak' with move
'logicaldatafilename' to 'newphysicalfile.mdf',
move 'logicallogfilename' to 'newphysicalfile.ldf'
Thanks
Hari
MCDBA
"Harish Mohanbabu" <anonymous@.discussions.microsoft.com> wrote in message
news:CFDD7D65-54E0-436D-8B40-51DBE7CA6E90@.microsoft.com...
> Hi,
> I have 2 user created databases in MS SQL Server 2000. Now I want to copy
tables from one of this database to the other. The structure, relationships
etc of these tables between these 2 databases are very similar. I searched
high and low in BOL but could not find any info.
> Can some one help me in this please ...
> Thanks,
> Harish Mohanbabu

Thursday, March 22, 2012

Copying tables

I am able to query several different msde databases on my network using
Query Analyzer from my pc. Using SQL Query Analyzer from my pc, I need to
copy a table from a database found on my local msde installation to a
database on another pc's msde installation. I was trying to find the SQL
Query syntax on Books Online but I had no luck. Can you help?
Thanks,
Ademar Nunes
Hi,
See BCP OUT and BCP IN in books online.
Thanks
Hari
SQL Server MVP
"Ademar" <Ademar@.noneofyourbusiness.com> wrote in message
news:uo2iGb6uEHA.1260@.TK2MSFTNGP12.phx.gbl...
>I am able to query several different msde databases on my network using
> Query Analyzer from my pc. Using SQL Query Analyzer from my pc, I need
> to
> copy a table from a database found on my local msde installation to a
> database on another pc's msde installation. I was trying to find the SQL
> Query syntax on Books Online but I had no luck. Can you help?
> --
> Thanks,
> Ademar Nunes
>
|||I did, but I was unable to make it work. I tried again, and I'm still
unable. Can you help?
Thanks,
Ademar Nunes
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:eFagfq8uEHA.568@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Hi,
> See BCP OUT and BCP IN in books online.
>
> --
> Thanks
> Hari
> SQL Server MVP
>
> "Ademar" <Ademar@.noneofyourbusiness.com> wrote in message
> news:uo2iGb6uEHA.1260@.TK2MSFTNGP12.phx.gbl...
SQL
>
sql

copying table from one database to another

I would like to copy a table from one database to another. These two
databases reside in two different servers/instances? Is this possible? If so,
how can I code it in m C++ application? Thanks!You have 2 choices, Database solution or client based solution.
Database: Have your DBA create a linked server connection to server2 on
server1. Now you can execute this statement from server1
INSERT MyDest (column_list) SELECT column_list from
server2.mydb.dbo.MySource where ...
Client based solution:
Setup ADO connection to both servers. Populate a recordset from the source db
Iterate through this recordset and insert records in destination using a
procedure that has your insert logic.
HTH
Arun
"luv2travel" wrote:
> I would like to copy a table from one database to another. These two
> databases reside in two different servers/instances? Is this possible? If so,
> how can I code it in m C++ application? Thanks!

copying stored procedures

Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
OriUse the DTS copy objects function. You can set this up easily via the
wizard. Watch out for the option to copy dependent objects as well, as you
may wind up moving a table along with a SP.
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx
.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori|||Take a look at Data Transformation Services. Right-click Tables, select All
Tasks > Export data, and when you get to the screen that offers three
choices, select "Copy objects and data..."
The wizard is fairly self-explanatory.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx
.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori|||Transfer via DTS?
Script and execute via Query Analyzer or Enterprise Manager?
--=20
Keith
"ori" <anonymous@.discussions.microsoft.com> wrote in message =
news:137b501c44400$ef2e8a70$a401280a@.phx
.gbl...
> Hi,
>=20
> How can I copy many sp's without recreate them by code=20
> between two databases ?
>=20
> Thanks,
>=20
> Ori|||Normal procedure is to generate a script of the required stored procedures,
and run that script on your target database.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx
.gbl...
Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
Ori

copying stored procedures

Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
OriUse the DTS copy objects function. You can set this up easily via the
wizard. Watch out for the option to copy dependent objects as well, as you
may wind up moving a table along with a SP.
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori|||Take a look at Data Transformation Services. Right-click Tables, select All
Tasks > Export data, and when you get to the screen that offers three
choices, select "Copy objects and data..."
The wizard is fairly self-explanatory.
--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori|||Transfer via DTS?
Script and execute via Query Analyzer or Enterprise Manager?
-- Keith
"ori" <anonymous@.discussions.microsoft.com> wrote in message =news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
> > How can I copy many sp's without recreate them by code > between two databases ?
> > Thanks,
> > Ori|||Normal procedure is to generate a script of the required stored procedures,
and run that script on your target database.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
Ori

copying stored procedures

Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
Ori
Use the DTS copy objects function. You can set this up easily via the
wizard. Watch out for the option to copy dependent objects as well, as you
may wind up moving a table along with a SP.
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
www.DallasDBAs.com/forum - new DB forum for Dallas/Ft. Worth area DBAs.
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori
|||Take a look at Data Transformation Services. Right-click Tables, select All
Tasks > Export data, and when you get to the screen that offers three
choices, select "Copy objects and data..."
The wizard is fairly self-explanatory.
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
> How can I copy many sp's without recreate them by code
> between two databases ?
> Thanks,
> Ori
|||Transfer via DTS?
Script and execute via Query Analyzer or Enterprise Manager?
--=20
Keith
"ori" <anonymous@.discussions.microsoft.com> wrote in message =
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
> Hi,
>=20
> How can I copy many sp's without recreate them by code=20
> between two databases ?
>=20
> Thanks,
>=20
> Ori
|||Normal procedure is to generate a script of the required stored procedures,
and run that script on your target database.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm
"ori" <anonymous@.discussions.microsoft.com> wrote in message
news:137b501c44400$ef2e8a70$a401280a@.phx.gbl...
Hi,
How can I copy many sp's without recreate them by code
between two databases ?
Thanks,
Ori