Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts

Thursday, March 22, 2012

Creating tables from other tables

Hi,

I have a table of data and would like to make an exact copy of the table (structure and data).

Are there any ways to do this without having to first run a create statement (that would have been based on the original table being manually scripted) and then select insert for the data. The reason being that this initial table may change and that would mean I would have to go and change my create statements. It would be nice to have a blind command:-

create table A based on table B

etc

Thanks

Rhys

Rhys,

The SELECT INTO command may work for you.

here is an example

CREATE Table B ( i int primary key )

INSERT into B values(1)

INSERT into B values(2)

SELECT * INTO A from B -- this creates table A

Karl Tarbet

|||Thanks Karl, that was exactly what I was looking for.

Thursday, March 8, 2012

Creating RDL Files - Software Requirements

I have a copy of SQL Server Express running, but am not sure how to create
reports. Does this require a full/regular copy of Visual Studio or is there
an 'express' (read:free) solution to create reports.
Thanks,
MatthewThere is another version called SQL Server 2005 Express Edition with
Advanced Services SP1 which comes with everything you need to develop
reports. Note that the data for your reports need to be local (in your SQL
Server Express database is what I believe that means).
Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>I have a copy of SQL Server Express running, but am not sure how to create
> reports. Does this require a full/regular copy of Visual Studio or is
> there
> an 'express' (read:free) solution to create reports.
> Thanks,
> Matthew|||yes, I think. I have that. Here is a select @.@.version to clarify...
Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
Apr 14 2006 01:12:25
Copyright (c) 1988-2005 Microsoft Corporation
Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
Service Pack 1)
I have seen references to Business Intelligence Designer. I have the
virtual directory for reports. I can go out to it and there is an option to
upload RDL files; however, I am not sure what tool is necessary to create RDL
files. I know Visual Studio (for pay ones) can do it, but I don't know if
there is a free version. I don't see anything in the SQL MGMT tool or in the
Start Menu which allow me to create reports. I do see the Report SErver
configuration tool... and it shows it to be setup correctly.
Thanks!
Matthew
"Bruce L-C [MVP]" wrote:
> There is another version called SQL Server 2005 Express Edition with
> Advanced Services SP1 which comes with everything you need to develop
> reports. Note that the data for your reports need to be local (in your SQL
> Server Express database is what I believe that means).
> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
> >I have a copy of SQL Server Express running, but am not sure how to create
> > reports. Does this require a full/regular copy of Visual Studio or is
> > there
> > an 'express' (read:free) solution to create reports.
> > Thanks,
> > Matthew
>
>|||I don't know about the setup but it shouldn't be any difference. You need to
install the Business Intelligence tools. It will install a version of VS to
host the report designer. Run setup and see about a choice to install. Once
installed you should be have something in your program files called SQL
Server Business Intelligence Development Studio.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in message
news:81305E18-ABEF-449E-AA63-76CEF9583387@.microsoft.com...
> yes, I think. I have that. Here is a select @.@.version to clarify...
> Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86)
> Apr 14 2006 01:12:25
> Copyright (c) 1988-2005 Microsoft Corporation
> Express Edition with Advanced Services on Windows NT 5.2 (Build 3790:
> Service Pack 1)
> I have seen references to Business Intelligence Designer. I have the
> virtual directory for reports. I can go out to it and there is an option
> to
> upload RDL files; however, I am not sure what tool is necessary to create
> RDL
> files. I know Visual Studio (for pay ones) can do it, but I don't know if
> there is a free version. I don't see anything in the SQL MGMT tool or in
> the
> Start Menu which allow me to create reports. I do see the Report SErver
> configuration tool... and it shows it to be setup correctly.
> Thanks!
> Matthew
>
> "Bruce L-C [MVP]" wrote:
>> There is another version called SQL Server 2005 Express Edition with
>> Advanced Services SP1 which comes with everything you need to develop
>> reports. Note that the data for your reports need to be local (in your
>> SQL
>> Server Express database is what I believe that means).
>> Download here: http://msdn.microsoft.com/vstudio/express/sql/download/
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "matthew gibson" <matthewgibson@.discussions.microsoft.com> wrote in
>> message
>> news:9D74D31A-EFB3-492F-8D23-C2D9B51CEADD@.microsoft.com...
>> >I have a copy of SQL Server Express running, but am not sure how to
>> >create
>> > reports. Does this require a full/regular copy of Visual Studio or is
>> > there
>> > an 'express' (read:free) solution to create reports.
>> > Thanks,
>> > Matthew
>>

Friday, February 17, 2012

Creating Duplicate Databases Daily

I want to be able to create a duplicate database and update / refresh it daily automatically. This database copy would be used for testing purposes so I don't want it to write back to the original database. Is replication of some kind the answer?For a batch process replication is probably overkill. Use either a DTS package or just restore a nightly backup of your production database to your test environment.|||For a batch process replication is probably overkill. Use either a DTS package or just restore a nightly backup of your production database to your test environment.

Did you skip breakfast as well?

Do a dump and restore|||I should have said that the Test database is on a different server.
I have tried doing a Backup via Enterprise Manager and then moving the backup file to new server, but I cannot seem to pick up the file for a restore as only the local databases are shown in the parameters box.|||Use the "Restore from device" option and then browse to your backup file. Check Books Online for more assistance restoring databases in Enterprise Manager. The big things you need to watch out for are crossed logins and object ownership between the two databases, are their respective list of users and userIDs are likely not identical.

Tuesday, February 14, 2012

Creating database from SQL Server set uP Wizard

can i create a table within the aspnetdb.mdf?

I created a database from SQL server set up wizard, and the

database i make copy exactly what a aspnetdb.mdf(from tables to

stored procedure) has..Can i change or add some files,tbles and

stored procedure to it...

I'll using SQL Express Edition...

can i know what is the best way to implement the database i created

if im going to setup ,manually my database (without set up

wizard)can I copy the tables and stored procedure in aspnetdb.mdf

in my database??

thanks for the answer...

thanks and more power...

Hi,

In my opinion, you can add some fields or stored procedures in the table in ASPNETDB.mdf. However, I suggest you not change any existing fields created by the wizard. Because this will cause unexpected result.

HTH. If this does not answer your question, please feel free to mark the post as Not Answered and reply. Thank you!