I have a subreport inside of a report that I want to copy and paste in another part of the report (two identical subreports in the same report).
What is the easiest way to accomplish this?
Thanks,
MichaelSave the subreport as a report in its own right.
Showing posts with label identical. Show all posts
Showing posts with label identical. Show all posts
Thursday, March 22, 2012
copying stored procedures?
Hi all, is there a way I can simply copy the stored procedures in one DB, and "paste" them over into another DB that is identical? Thanks!You can script out any database object (right click and select Generate SQL from the menu), or you can import/export data and objects between databases (right click on the database and select import/export data in the menu).|||If the tables and views (and other objects) referenced in the stored procedure are same in both the database, then you can simply copy the Stored procedure and paste it in the other DB and use it.
You can view the stroed procdure in the Enterprise Manager by just double clicking on the procudure name or you can view the stored procedure in Query Analyser by using the stored procure sp_help <your sp name>
You can view the stroed procdure in the Enterprise Manager by just double clicking on the procudure name or you can view the stored procedure in Query Analyser by using the stored procure sp_help <your sp name>
Sunday, March 11, 2012
Copying databases to other servers (Backup and Restore - Detach/Attach)
I want to copy a database from one server to another so that they are
identical and I have a few questions. Also I am running the 'Simple
Recovery Model' and therefore my transaction log is minimal.
BACKUP AND RESTORE: If I perform a backup and restore will user access
rights be backed up? What if the user doesn't exist on the new server?
Should I create it manually? Lastly, in the simple recovery model do
I need to backup the transaction log?
MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
implications of stopping SQL server and manually copying the data and
log file? I could then attach it to the new server' Would this work?
DATACHING AND REATTACHING: I could detach the database, copy it to the
new server and then attach it to the original and new servers? Would
this work?
EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
tables, but this procedure would take the longest.All your questions are answered in the following Knowledge Base article:
314546 - HOW TO Move Databases Between Computers That Are Running SQL
Server:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
--
Jacco Schalkwijk
SQL Server MVP
<war_wheelan@.yahoo.com> wrote in message
news:1114097392.448483.201600@.f14g2000cwb.googlegroups.com...
>I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||Hi,
Using all the below approches you can copy the database to second server.
But the 3rd approch may fail ( MANUALLY COPY THE *.MDF AND *.LDF FILES) if
you have not detached the files. So it is always recomended to detach the
file and copy to destination.
If the first server is production you could use BACK DATABASE, Copy the
Backup file to second server and Restore it (RESTORE DATABASE). All the Login
user chains can be created/established using the the system stored proc
sp_change_users_login
(See books online for usage and various parameters).
If the system is not production then you can detach the database , copy the
MDF and LDF to second server , Attach the database and use system stored proc
sp_change_users_login to syncronize the logins and users.
Third approach (Export and import) may not be a solution if you have miore
tables and data. This is really time consuming.
Thanks
Hari
SQL Server MVP
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>
identical and I have a few questions. Also I am running the 'Simple
Recovery Model' and therefore my transaction log is minimal.
BACKUP AND RESTORE: If I perform a backup and restore will user access
rights be backed up? What if the user doesn't exist on the new server?
Should I create it manually? Lastly, in the simple recovery model do
I need to backup the transaction log?
MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
implications of stopping SQL server and manually copying the data and
log file? I could then attach it to the new server' Would this work?
DATACHING AND REATTACHING: I could detach the database, copy it to the
new server and then attach it to the original and new servers? Would
this work?
EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
tables, but this procedure would take the longest.All your questions are answered in the following Knowledge Base article:
314546 - HOW TO Move Databases Between Computers That Are Running SQL
Server:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314546
--
Jacco Schalkwijk
SQL Server MVP
<war_wheelan@.yahoo.com> wrote in message
news:1114097392.448483.201600@.f14g2000cwb.googlegroups.com...
>I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||Hi,
Using all the below approches you can copy the database to second server.
But the 3rd approch may fail ( MANUALLY COPY THE *.MDF AND *.LDF FILES) if
you have not detached the files. So it is always recomended to detach the
file and copy to destination.
If the first server is production you could use BACK DATABASE, Copy the
Backup file to second server and Restore it (RESTORE DATABASE). All the Login
user chains can be created/established using the the system stored proc
sp_change_users_login
(See books online for usage and various parameters).
If the system is not production then you can detach the database , copy the
MDF and LDF to second server , Attach the database and use system stored proc
sp_change_users_login to syncronize the logins and users.
Third approach (Export and import) may not be a solution if you have miore
tables and data. This is really time consuming.
Thanks
Hari
SQL Server MVP
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>|||HOW TO: Move Databases Between Computers That Are Running SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;314546
AMB
"war_wheelan@.yahoo.com" wrote:
> I want to copy a database from one server to another so that they are
> identical and I have a few questions. Also I am running the 'Simple
> Recovery Model' and therefore my transaction log is minimal.
> BACKUP AND RESTORE: If I perform a backup and restore will user access
> rights be backed up? What if the user doesn't exist on the new server?
> Should I create it manually? Lastly, in the simple recovery model do
> I need to backup the transaction log?
> MANUALLY COPY THE *.MDF AND *.LDF FILES: What would be the
> implications of stopping SQL server and manually copying the data and
> log file? I could then attach it to the new server' Would this work?
> DATACHING AND REATTACHING: I could detach the database, copy it to the
> new server and then attach it to the original and new servers? Would
> this work?
> EXPORTING DB TO NEW SERVER: I could do an export of the db 500+
> tables, but this procedure would take the longest.
>
Subscribe to:
Posts (Atom)