Hello!
Was wondering how I can create a copy of one database? FYI I'm not
interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there? Is it
smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars 10 1933
Yes. Create a script and deploy it.
--
-oj
RAC v2.2 & QALite! http://www.rac4sql.net
"Lars Grøtteland" <lars@nospam> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... Hello!
Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there? Is
it smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars
Lars
Right click on the database then All tasks then Generate SQL Script.
Save it as .sql (or whatever) file and you can run it from QA or later if
you need from the file.
"Lars Grøtteland" <lars@nospam> wrote in message
news:#B**************@TK2MSFTNGP11.phx.gbl... Hello!
Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there? Is
it smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars
Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've read of
this database once - that if I create one SP inside this, this should be
copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl... Yes. Create a script and deploy it.
-- -oj RAC v2.2 & QALite! http://www.rac4sql.net "Lars Grøtteland" <lars@nospam> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hello!
Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there? Is it smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars
Yes, stuff from model are copied to a new database. But this seems to be a
real awkward way of doing it. Just generate the scrip and have your
application loop the script file and for each "GO" it encounters in the file
is executes what you have built in the buffer so far.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=d...blic.sqlserver
"Lars Grøtteland" <lars@nospam> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've read
of this database once - that if I create one SP inside this, this should be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... Yes. Create a script and deploy it.
-- -oj RAC v2.2 & QALite! http://www.rac4sql.net "Lars Grøtteland" <lars@nospam> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hello!
Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there?
Is it smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars
If you want to do it from inside you application, use SQL-DMO. You can copy
the complete database without using a script with the Database.Transfer
method, or you can generate a script with the Database.Script method. Both
method have a rather long list of parameters, which is a bit too much to
mention here, but whihc you can find in Books Online. The parameters
basically allow you all the options you have when copying a database or
generating a script from Enterprise Manager.
--
Jacco Schalkwijk
SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've read
of this database once - that if I create one SP inside this, this should be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... Yes. Create a script and deploy it.
-- -oj RAC v2.2 & QALite! http://www.rac4sql.net "Lars Grøtteland" <lars@nospam> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... Hello!
Was wondering how I can create a copy of one database? FYI I'm not interrested in the data, just the fields and triggers, and so on.
Which way is the easiest? Do I create a script and run it from there?
Is it smart to have it inside a SP?
Any idea would be greatly appreciated.
I'm programming SQL 2k and VC7.0
--
- Lars
Then I have another trick for you!
I have "GOTO" inside the script. What should I do then?
--
- Lars
"Tibor Karaszi" <ti****************************************@corner stone.se>
wrote in message news:OM**************@TK2MSFTNGP10.phx.gbl... Yes, stuff from model are copied to a new database. But this seems to be a real awkward way of doing it. Just generate the scrip and have your application loop the script file and for each "GO" it encounters in the
file is executes what you have built in the buffer so far.
-- Tibor Karaszi, SQL Server MVP Archive at: http://groups.google.com/groups?oi=d...blic.sqlserver
"Lars Grøtteland" <lars@nospam> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've
read of this database once - that if I create one SP inside this, this should
be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... Yes. Create a script and deploy it.
-- -oj RAC v2.2 & QALite! http://www.rac4sql.net "Lars Grøtteland" <lars@nospam> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... > Hello! > > Was wondering how I can create a copy of one database? FYI I'm not > interrested in the data, just the fields and triggers, and so on. > > Which way is the easiest? Do I create a script and run it from
there? Is it > smart to have it inside a SP? > > Any idea would be greatly appreciated. > > I'm programming SQL 2k and VC7.0 > > -- > > > - Lars > > >
No problem. Just check that the first character after GO (i.e., the third
character as GO must be first two characters on the line) is either blank,
tab or CR or NL (new line).
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=d...blic.sqlserver
"Lars Grøtteland" <lars@nospam> wrote in message
news:uy**************@tk2msftngp13.phx.gbl... Then I have another trick for you!
I have "GOTO" inside the script. What should I do then?
--
- Lars
"Tibor Karaszi"
<ti****************************************@corner stone.se> wrote in message news:OM**************@TK2MSFTNGP10.phx.gbl... Yes, stuff from model are copied to a new database. But this seems to be
a real awkward way of doing it. Just generate the scrip and have your application loop the script file and for each "GO" it encounters in the file is executes what you have built in the buffer so far.
-- Tibor Karaszi, SQL Server MVP Archive at:
http://groups.google.com/groups?oi=d...blic.sqlserver
"Lars Grøtteland" <lars@nospam> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've
read of this database once - that if I create one SP inside this, this should be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... > Yes. Create a script and deploy it. > > -- > -oj > RAC v2.2 & QALite! > http://www.rac4sql.net > > > > "Lars Grøtteland" <lars@nospam> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... > > Hello! > > > > Was wondering how I can create a copy of one database? FYI I'm not > > interrested in the data, just the fields and triggers, and so on. > > > > Which way is the easiest? Do I create a script and run it from
there? Is > it > > smart to have it inside a SP? > > > > Any idea would be greatly appreciated. > > > > I'm programming SQL 2k and VC7.0 > > > > -- > > > > > > - Lars > > > > > > > >
What's the syntax - or where can I find it in SQL-DMO bol
--
- Lars
"Jacco Schalkwijk" <NO**********@eurostop.co.uk> wrote in message
news:uv**************@tk2msftngp13.phx.gbl... If you want to do it from inside you application, use SQL-DMO. You can
copy the complete database without using a script with the Database.Transfer method, or you can generate a script with the Database.Script method. Both method have a rather long list of parameters, which is a bit too much to mention here, but whihc you can find in Books Online. The parameters basically allow you all the options you have when copying a database or generating a script from Enterprise Manager.
-- Jacco Schalkwijk SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've
read of this database once - that if I create one SP inside this, this should
be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... Yes. Create a script and deploy it.
-- -oj RAC v2.2 & QALite! http://www.rac4sql.net "Lars Grøtteland" <lars@nospam> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl... > Hello! > > Was wondering how I can create a copy of one database? FYI I'm not > interrested in the data, just the fields and triggers, and so on. > > Which way is the easiest? Do I create a script and run it from
there? Is it > smart to have it inside a SP? > > Any idea would be greatly appreciated. > > I'm programming SQL 2k and VC7.0 > > -- > > > - Lars > > >
In the Books Online index:
objects-SQL-DMO, Database
methods-SQL-DMO, Transfer
objects-SQL-DMO, Transfer
objects-SQL-DMO, Transfer2
I couldn't find any examples in C++, but here is one in VB: http://sqldev.net/download/sqldmo/80...rEvent.cls.txt
--
Jacco Schalkwijk
SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message
news:uR*************@TK2MSFTNGP10.phx.gbl... What's the syntax - or where can I find it in SQL-DMO bol
--
- Lars
"Jacco Schalkwijk" <NO**********@eurostop.co.uk> wrote in message news:uv**************@tk2msftngp13.phx.gbl... If you want to do it from inside you application, use SQL-DMO. You can copy the complete database without using a script with the Database.Transfer method, or you can generate a script with the Database.Script method.
Both method have a rather long list of parameters, which is a bit too much to mention here, but whihc you can find in Books Online. The parameters basically allow you all the options you have when copying a database or generating a script from Enterprise Manager.
-- Jacco Schalkwijk SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... Yes I know I can do this in QA, but how to do it in my application?
Was thinking of making a SP, inside the model database. I think I've read of this database once - that if I create one SP inside this, this should be copied to the new database that's been created. Is this a solution?
--
- Lars
"oj" <no**********@home.com> wrote in message news:uy**************@TK2MSFTNGP09.phx.gbl... > Yes. Create a script and deploy it. > > -- > -oj > RAC v2.2 & QALite! > http://www.rac4sql.net > > > > "Lars Grøtteland" <lars@nospam> wrote in message > news:%2****************@TK2MSFTNGP11.phx.gbl... > > Hello! > > > > Was wondering how I can create a copy of one database? FYI I'm not > > interrested in the data, just the fields and triggers, and so on. > > > > Which way is the easiest? Do I create a script and run it from
there? Is > it > > smart to have it inside a SP? > > > > Any idea would be greatly appreciated. > > > > I'm programming SQL 2k and VC7.0 > > > > -- > > > > > > - Lars > > > > > > > >
THanks!
--
- Lars
"Jacco Schalkwijk" <NO**********@eurostop.co.uk> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl... In the Books Online index: objects-SQL-DMO, Database methods-SQL-DMO, Transfer objects-SQL-DMO, Transfer objects-SQL-DMO, Transfer2
I couldn't find any examples in C++, but here is one in VB: http://sqldev.net/download/sqldmo/80...rEvent.cls.txt
-- Jacco Schalkwijk SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message news:uR*************@TK2MSFTNGP10.phx.gbl... What's the syntax - or where can I find it in SQL-DMO bol
--
- Lars
"Jacco Schalkwijk" <NO**********@eurostop.co.uk> wrote in message news:uv**************@tk2msftngp13.phx.gbl... If you want to do it from inside you application, use SQL-DMO. You can copy the complete database without using a script with the
Database.Transfer method, or you can generate a script with the Database.Script method. Both method have a rather long list of parameters, which is a bit too much
to mention here, but whihc you can find in Books Online. The parameters basically allow you all the options you have when copying a database
or generating a script from Enterprise Manager.
-- Jacco Schalkwijk SQL Server MVP
"Lars Grøtteland" <lars@nospam> wrote in message news:%2***************@TK2MSFTNGP11.phx.gbl... > Yes I know I can do this in QA, but how to do it in my application? > > Was thinking of making a SP, inside the model database. I think I've read of > this database once - that if I create one SP inside this, this
should be > copied to the new database that's been created. Is this a solution? > > -- > > > - Lars > > > "oj" <no**********@home.com> wrote in message > news:uy**************@TK2MSFTNGP09.phx.gbl... > > Yes. Create a script and deploy it. > > > > -- > > -oj > > RAC v2.2 & QALite! > > http://www.rac4sql.net > > > > > > > > "Lars Grøtteland" <lars@nospam> wrote in message > > news:%2****************@TK2MSFTNGP11.phx.gbl... > > > Hello! > > > > > > Was wondering how I can create a copy of one database? FYI I'm
not > > > interrested in the data, just the fields and triggers, and so
on. > > > > > > Which way is the easiest? Do I create a script and run it from there? Is > > it > > > smart to have it inside a SP? > > > > > > Any idea would be greatly appreciated. > > > > > > I'm programming SQL 2k and VC7.0 > > > > > > -- > > > > > > > > > - Lars > > > > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Antonio Lopez Arredondo |
last post by:
hi all !!!
I need to copy a folder and its subfolders to another location; which class
should I use ?
could only find the System.IO.Directory.MOVE but don't know how to COPY.
thanks in...
|
by: Serdge Kooleman |
last post by:
hi
i have Access 2000 database. All id is guid, so it is always unique.
several users add data into own copy of this database. then they send .mdb
files to me (by e-mail).
how to copy the...
|
by: Digital Fart |
last post by:
howto make a connection to database available in my classes.
What is the best practice when i want to write classes
that need a connection to the database?
Do i make a conn variable in my...
|
by: Dan Sikorsky |
last post by:
How can I install the Portal starter kit to a different Solution/Project
name, having a different SQL Server database name? I'd like to start a new
solution using the Portal starter kit as a...
|
by: Rainer Queck |
last post by:
Hi NG,
I am looking for a good way to dynamically generate a bunch of TabPages.
I have a list of more or less identical object. For each of these objects I
need a user interface. My thought...
|
by: Ian Boyd |
last post by:
Every time during development we had to make table changes, we use Control
Center. Most of the time, Control Center fails. If you try to "undo all", it
doesn't, and you end up losing your identity...
|
by: max |
last post by:
Hello,
I am a newbye, and I'm trying to write a simple application.
I have five tables with three columns; all tables are identical; I need to
change some data in the first table and let VB...
|
by: =?Utf-8?B?QVRT?= |
last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g.
Please help,
I'm trying to write an ASP page to use ADO to run a long query against an
Oracle 10g database, to create tables,...
|
by: glubber |
last post by:
I have a cronned perl script that runs on a different server.
when I try to restore it to the server below things dont copy across correctly.
the target server is described below.
debian 4.0...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |