Showing posts with label views. Show all posts
Showing posts with label views. Show all posts

Monday, March 19, 2012

Export wizard exports views as tables

Hi

I have a problem using SQL 2005 Export wizard.

I have 2 databases : DB1 and DB2

DB1 has X tables and Y views
DB2 has W tables and Z views

I want to export only few selected views from DB1 to DB2.

In Import and Export wizard, I select these views and execute the export-package. Completed Successfully.

And finally the problem:

All views that i exported from DB1, are not placed in DB2 as views, but as TABLES!

Why?

Waiting for your quick answer,
Martin

This is by design.

It may happen that some of the tables on which the view depends are not imported at all, which can cause the view definition to fail.

Thanks,

Kuntal

Export wizard exports views as tables

Hi

I have a problem using SQL 2005 Export wizard.

I have 2 databases : DB1 and DB2

DB1 has X tables and Y views
DB2 has W tables and Z views

I want to export only few selected views from DB1 to DB2.

In Import and Export wizard, I select these views and execute the export-package. Completed Successfully.

And finally the problem:

All views that i exported from DB1, are not placed in DB2 as views, but as TABLES!

Why?

Waiting for your quick answer,
Martin

This is by design.

It may happen that some of the tables on which the view depends are not imported at all, which can cause the view definition to fail.

Thanks,

Kuntal

Sunday, February 19, 2012

Export the schema and data

How do I export the database schema along with data, SP, Views..etc into a
script file ?Use DTS (for SQL 2000) or SSIS (for SQL 2005)
--
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:u1Z8ZY$qGHA.1368@.TK2MSFTNGP05.phx.gbl...
> How do I export the database schema along with data, SP, Views..etc into a
> script file ?
>|||Is DTS only apply to a single database object?
I want to export the whole database into a single script file.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uRajXfBrGHA.2180@.TK2MSFTNGP05.phx.gbl...
> Use DTS (for SQL 2000) or SSIS (for SQL 2005)
> --
> Arnie Rowland
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
> news:u1Z8ZY$qGHA.1368@.TK2MSFTNGP05.phx.gbl...
>> How do I export the database schema along with data, SP, Views..etc into
>> a script file ?
>|||In Enterprise Manager, [Right Click] on the database, and select [All Tasks]
and then [Generate SQL Script].
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:OPlM5fV4GHA.3452@.TK2MSFTNGP05.phx.gbl...
> Is DTS only apply to a single database object?
> I want to export the whole database into a single script file.
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uRajXfBrGHA.2180@.TK2MSFTNGP05.phx.gbl...
>> Use DTS (for SQL 2000) or SSIS (for SQL 2005)
>> --
>> Arnie Rowland
>> Most good judgment comes from experience.
>> Most experience comes from bad judgment.
>> - Anonymous
>>
>> "Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
>> news:u1Z8ZY$qGHA.1368@.TK2MSFTNGP05.phx.gbl...
>> How do I export the database schema along with data, SP, Views..etc into
>> a script file ?
>>
>|||Arnie Rowland wrote:
> In Enterprise Manager, [Right Click] on the database, and select [All Tasks]
> and then [Generate SQL Script].
>
That won't include the data, however. By far, the easiest way to "get"
the schema AND data together is via a backup/restore. If you really
want a script, i.e. a bunch of INSERT statements, to reproduce a table,
have a look here:
http://www.realsqlguy.com/serendipity/archives/15-Table-For-Two.html
This is a rough script that needs cleaned up a bit, but it's usable as-is.
Tracy McKibben
MCDBA
http://www.realsqlguy.com

Export the schema and data

How do I export the database schema along with data, SP, Views..etc into a
script file ?Use DTS (for SQL 2000) or SSIS (for SQL 2005)
Arnie Rowland
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:u1Z8ZY$qGHA.1368@.TK2MSFTNGP05.phx.gbl...
> How do I export the database schema along with data, SP, Views..etc into a
> script file ?
>|||Is DTS only apply to a single database object?
I want to export the whole database into a single script file.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uRajXfBrGHA.2180@.TK2MSFTNGP05.phx.gbl...
> Use DTS (for SQL 2000) or SSIS (for SQL 2005)
> --
> Arnie Rowland
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
> news:u1Z8ZY$qGHA.1368@.TK2MSFTNGP05.phx.gbl...
>|||In Enterprise Manager, [Right Click] on the database, and select [Al
l Tasks]
and then [Generate SQL Script].
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Alan T" <alanpltseNOSPAM@.yahoo.com.au> wrote in message
news:OPlM5fV4GHA.3452@.TK2MSFTNGP05.phx.gbl...
> Is DTS only apply to a single database object?
> I want to export the whole database into a single script file.
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uRajXfBrGHA.2180@.TK2MSFTNGP05.phx.gbl...
>|||Arnie Rowland wrote:
> In Enterprise Manager, [Right Click] on the database, and select [
All Tasks]
> and then [Generate SQL Script].
>
That won't include the data, however. By far, the easiest way to "get"
the schema AND data together is via a backup/restore. If you really
want a script, i.e. a bunch of INSERT statements, to reproduce a table,
have a look here:
http://www.realsqlguy.com/serendipi...le-For-Two.html
This is a rough script that needs cleaned up a bit, but it's usable as-is.
Tracy McKibben
MCDBA
http://www.realsqlguy.com