Showing posts with label creation. Show all posts
Showing posts with label creation. Show all posts

Friday, March 30, 2012

Scripting creation of server alias

Does anyone know if there's a way to script creation of a server alias,
as you can do using the Client Network Utility?
allancady@.yahoo.com wrote:
> Does anyone know if there's a way to script creation of a server
> alias, as you can do using the Client Network Utility?
Do you mean from a T-SQL script? The utility just writes to the
registration database. Sniff the regdb while you perform adding a new
alias and see where it goes. Then you can use any programming tool or
just a .reg file to add the new data to everyones PC. From a domain this
is easy.
You can sniff the regdb using free tools from www.sysinternals.com
David Gugick
Imceda Software
www.imceda.com

Scripting creation of server alias

Does anyone know if there's a way to script creation of a server alias,
as you can do using the Client Network Utility?allancady@.yahoo.com wrote:
> Does anyone know if there's a way to script creation of a server
> alias, as you can do using the Client Network Utility?
Do you mean from a T-SQL script? The utility just writes to the
registration database. Sniff the regdb while you perform adding a new
alias and see where it goes. Then you can use any programming tool or
just a .reg file to add the new data to everyones PC. From a domain this
is easy.
You can sniff the regdb using free tools from www.sysinternals.com
David Gugick
Imceda Software
www.imceda.com

Scripting changes to the data source view

I need to script out creation of some new cubes and dimension to an SSAS server while leaving the rest of the OLAP database unchanged. Handling the cubes and dimensions themselves seems pretty straight forward, using the scripting tools in SQL Management Studio. However, I'm uncertain about scripting the changes to the data source view (for the fact and dimension tables for the new cubes and dimensions).

In SQL Management Studio, only the entire DSV is scriptable - I don't see a way to script out changes to just some of the tables. I could, in theory, manually edit out the parts of the DSV that aren't related to my new entities, but it's not clear from the XMLA Alter command documentation whether that would work. But my reading, the command would replace the entire Major Object, which is the entire DSV in this case. Am I reading that right?

The only other option I can think of is to programmatically add the new entities to the DSV through explicit code - doable, but a royal pain, and I'd rather avoid it if possible.

Am I understanding things correctly? Is there some other option I'm not aware of?

You are right, the XMLA alter command would replace the entire DSV, so if you only scripted out changed objects that is all you would end up with.

You could programmatically add new entities to the DSV through code, but if you trace the resulting interaction with SSAS you will find that it is still doing an XMLA Alter and sending throught the definition for the entire DSV. But atleast if you programmatically add a table to the DSV, AMO will handle the scripting of the rest of the DSV for you.

|||Thanks for the confirmation, Darren. Fortunately, I came up with a slightly simpler way to do it than manually creating all of the new DSV entities in code. I'm loading up the full cube deployment script, plucking out the new DSV items, and copying them into the existing DSV. In the end, it's not too painful. Works well for new cubes and dimensions as well.
|||Glad you have found a solution. I am just curious as to what you mean by "copying them into the existing DSV" are you doing an XML or text "diff" between your new DSV and the existing one?|||By that I meant using AMO to get the DSV on the existing database instance. Basically I'm getting the existing DSV schema (using AMO), parsing out the new DSV schema from the XML/A deployment script for the modified database, and merging the new elements into the existing DSV.

I haven't gotten as fancy as an automated diff process (yet). Currently I'm just manually keeping track of what the new items are. Hopefully I'll be automate that more soon.
|||

I thought you must have been doing something like this. It does seem like a lot of manual work. I'm not sure if you really need to go to all that effort. If you basically pass SSAS an alter script with the entire DSV from the deployment script it *should* be able to figure things out. (assuming that your development project is just an updated version of the project that was originally deployed to your server)

Would I be correct in assuming that the situation you are facing is that you have made mulitple changes to your solution, but you only want to deploy some of them - hence the need to manually script things out? I have been working with a friend on a project to build an add-in to BIDS (www.codeplex.com/bidshelper) to enhance BIDS and one feature we were thinking about was the option to deploy just a single object from a project. I have a sub set of this working where I can deploy just the Calculation Script from a cube. If you are interested I don't think it would be too hard for us to add some basic "deploy single object" functionality that would handle other object types.

|||>assuming that your development project is just an updated version of
>the project that was originally deployed to your server

And that's the rub - it's not. We are an ISV that includes a set of SSAS cubes in our product. We provide a UI for customers to extend the cubes with custom measures and dimensions. When we ship new versions of our software, we need to be able to deploy our changes (new cubes, dimensions, attributes, etc) without overwriting the customer's customizations.

The BidsHelper project looks pretty cool - I'll check it out. Ultimately, it doesn't sound like something we'd be able to take advantage of to solve our problem - but it may come in handy during development.

|||

Aah, now I see where you are coming from.

I am not really aware of any good way of handling this "out of the box". It sounds like you will either need to write custom AMO code to attach to the client database and modify them. Or you would need to store the customisations that customers apply so that they could be re-applied after an upgrade.

It sounds like a reasonable feature, you could log this as a suggestion on the connect.microsoft.com site under SQL Server if you would like to see it considered for a future version, but in the medium/short term this sounds like something that will need custom code.

|||

Hi Kevin

Need your help desperately

as i read in ur message that you are updating the data source view by AMO

please let me know how to do that

I am working on the SSAS project and we need to add the measure dynamically to the cube( can be SSIS or Amo any thing, it should be automatic)

I am not getting the way to do that

please send me the detail to do that

that will be a big help

thanks

|||

There is a product sample that shows how to build a lite version of the Adventure Works database from scratch using AMO.

http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&referringTitle=Home

If you are dynamically adding measures you would need to update the DSV, add the measures to the appropriate measure group and reprocess all your data.

Scripting changes to the data source view

I need to script out creation of some new cubes and dimension to an SSAS server while leaving the rest of the OLAP database unchanged. Handling the cubes and dimensions themselves seems pretty straight forward, using the scripting tools in SQL Management Studio. However, I'm uncertain about scripting the changes to the data source view (for the fact and dimension tables for the new cubes and dimensions).

In SQL Management Studio, only the entire DSV is scriptable - I don't see a way to script out changes to just some of the tables. I could, in theory, manually edit out the parts of the DSV that aren't related to my new entities, but it's not clear from the XMLA Alter command documentation whether that would work. But my reading, the command would replace the entire Major Object, which is the entire DSV in this case. Am I reading that right?

The only other option I can think of is to programmatically add the new entities to the DSV through explicit code - doable, but a royal pain, and I'd rather avoid it if possible.

Am I understanding things correctly? Is there some other option I'm not aware of?

You are right, the XMLA alter command would replace the entire DSV, so if you only scripted out changed objects that is all you would end up with.

You could programmatically add new entities to the DSV through code, but if you trace the resulting interaction with SSAS you will find that it is still doing an XMLA Alter and sending throught the definition for the entire DSV. But atleast if you programmatically add a table to the DSV, AMO will handle the scripting of the rest of the DSV for you.

|||Thanks for the confirmation, Darren. Fortunately, I came up with a slightly simpler way to do it than manually creating all of the new DSV entities in code. I'm loading up the full cube deployment script, plucking out the new DSV items, and copying them into the existing DSV. In the end, it's not too painful. Works well for new cubes and dimensions as well.|||Glad you have found a solution. I am just curious as to what you mean by "copying them into the existing DSV" are you doing an XML or text "diff" between your new DSV and the existing one?|||By that I meant using AMO to get the DSV on the existing database instance. Basically I'm getting the existing DSV schema (using AMO), parsing out the new DSV schema from the XML/A deployment script for the modified database, and merging the new elements into the existing DSV.

I haven't gotten as fancy as an automated diff process (yet). Currently I'm just manually keeping track of what the new items are. Hopefully I'll be automate that more soon.|||

I thought you must have been doing something like this. It does seem like a lot of manual work. I'm not sure if you really need to go to all that effort. If you basically pass SSAS an alter script with the entire DSV from the deployment script it *should* be able to figure things out. (assuming that your development project is just an updated version of the project that was originally deployed to your server)

Would I be correct in assuming that the situation you are facing is that you have made mulitple changes to your solution, but you only want to deploy some of them - hence the need to manually script things out? I have been working with a friend on a project to build an add-in to BIDS (www.codeplex.com/bidshelper) to enhance BIDS and one feature we were thinking about was the option to deploy just a single object from a project. I have a sub set of this working where I can deploy just the Calculation Script from a cube. If you are interested I don't think it would be too hard for us to add some basic "deploy single object" functionality that would handle other object types.

|||>assuming that your development project is just an updated version of
>the project that was originally deployed to your server

And that's the rub - it's not. We are an ISV that includes a set of SSAS cubes in our product. We provide a UI for customers to extend the cubes with custom measures and dimensions. When we ship new versions of our software, we need to be able to deploy our changes (new cubes, dimensions, attributes, etc) without overwriting the customer's customizations.

The BidsHelper project looks pretty cool - I'll check it out. Ultimately, it doesn't sound like something we'd be able to take advantage of to solve our problem - but it may come in handy during development.

|||

Aah, now I see where you are coming from.

I am not really aware of any good way of handling this "out of the box". It sounds like you will either need to write custom AMO code to attach to the client database and modify them. Or you would need to store the customisations that customers apply so that they could be re-applied after an upgrade.

It sounds like a reasonable feature, you could log this as a suggestion on the connect.microsoft.com site under SQL Server if you would like to see it considered for a future version, but in the medium/short term this sounds like something that will need custom code.

|||

Hi Kevin

Need your help desperately

as i read in ur message that you are updating the data source view by AMO

please let me know how to do that

I am working on the SSAS project and we need to add the measure dynamically to the cube( can be SSIS or Amo any thing, it should be automatic)

I am not getting the way to do that

please send me the detail to do that

that will be a big help

thanks

|||

There is a product sample that shows how to build a lite version of the Adventure Works database from scratch using AMO.

http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&referringTitle=Home

If you are dynamically adding measures you would need to update the DSV, add the measures to the appropriate measure group and reprocess all your data.

Scripting changes to the data source view

I need to script out creation of some new cubes and dimension to an SSAS server while leaving the rest of the OLAP database unchanged. Handling the cubes and dimensions themselves seems pretty straight forward, using the scripting tools in SQL Management Studio. However, I'm uncertain about scripting the changes to the data source view (for the fact and dimension tables for the new cubes and dimensions).

In SQL Management Studio, only the entire DSV is scriptable - I don't see a way to script out changes to just some of the tables. I could, in theory, manually edit out the parts of the DSV that aren't related to my new entities, but it's not clear from the XMLA Alter command documentation whether that would work. But my reading, the command would replace the entire Major Object, which is the entire DSV in this case. Am I reading that right?

The only other option I can think of is to programmatically add the new entities to the DSV through explicit code - doable, but a royal pain, and I'd rather avoid it if possible.

Am I understanding things correctly? Is there some other option I'm not aware of?

You are right, the XMLA alter command would replace the entire DSV, so if you only scripted out changed objects that is all you would end up with.

You could programmatically add new entities to the DSV through code, but if you trace the resulting interaction with SSAS you will find that it is still doing an XMLA Alter and sending throught the definition for the entire DSV. But atleast if you programmatically add a table to the DSV, AMO will handle the scripting of the rest of the DSV for you.

|||Thanks for the confirmation, Darren. Fortunately, I came up with a slightly simpler way to do it than manually creating all of the new DSV entities in code. I'm loading up the full cube deployment script, plucking out the new DSV items, and copying them into the existing DSV. In the end, it's not too painful. Works well for new cubes and dimensions as well.
|||Glad you have found a solution. I am just curious as to what you mean by "copying them into the existing DSV" are you doing an XML or text "diff" between your new DSV and the existing one?|||By that I meant using AMO to get the DSV on the existing database instance. Basically I'm getting the existing DSV schema (using AMO), parsing out the new DSV schema from the XML/A deployment script for the modified database, and merging the new elements into the existing DSV.

I haven't gotten as fancy as an automated diff process (yet). Currently I'm just manually keeping track of what the new items are. Hopefully I'll be automate that more soon.
|||

I thought you must have been doing something like this. It does seem like a lot of manual work. I'm not sure if you really need to go to all that effort. If you basically pass SSAS an alter script with the entire DSV from the deployment script it *should* be able to figure things out. (assuming that your development project is just an updated version of the project that was originally deployed to your server)

Would I be correct in assuming that the situation you are facing is that you have made mulitple changes to your solution, but you only want to deploy some of them - hence the need to manually script things out? I have been working with a friend on a project to build an add-in to BIDS (www.codeplex.com/bidshelper) to enhance BIDS and one feature we were thinking about was the option to deploy just a single object from a project. I have a sub set of this working where I can deploy just the Calculation Script from a cube. If you are interested I don't think it would be too hard for us to add some basic "deploy single object" functionality that would handle other object types.

|||>assuming that your development project is just an updated version of
>the project that was originally deployed to your server

And that's the rub - it's not. We are an ISV that includes a set of SSAS cubes in our product. We provide a UI for customers to extend the cubes with custom measures and dimensions. When we ship new versions of our software, we need to be able to deploy our changes (new cubes, dimensions, attributes, etc) without overwriting the customer's customizations.

The BidsHelper project looks pretty cool - I'll check it out. Ultimately, it doesn't sound like something we'd be able to take advantage of to solve our problem - but it may come in handy during development.

|||

Aah, now I see where you are coming from.

I am not really aware of any good way of handling this "out of the box". It sounds like you will either need to write custom AMO code to attach to the client database and modify them. Or you would need to store the customisations that customers apply so that they could be re-applied after an upgrade.

It sounds like a reasonable feature, you could log this as a suggestion on the connect.microsoft.com site under SQL Server if you would like to see it considered for a future version, but in the medium/short term this sounds like something that will need custom code.

|||

Hi Kevin

Need your help desperately

as i read in ur message that you are updating the data source view by AMO

please let me know how to do that

I am working on the SSAS project and we need to add the measure dynamically to the cube( can be SSIS or Amo any thing, it should be automatic)

I am not getting the way to do that

please send me the detail to do that

that will be a big help

thanks

|||

There is a product sample that shows how to build a lite version of the Adventure Works database from scratch using AMO.

http://www.codeplex.com/MSFTASProdSamples/Wiki/View.aspx?title=SS2005%21Readme_AMOAdventureWorks&referringTitle=Home

If you are dynamically adding measures you would need to update the DSV, add the measures to the appropriate measure group and reprocess all your data.

Wednesday, March 28, 2012

Scripted CREATE INDEX

I have SQL Server 2005 x64. I found in the studio I can generate all
sorts of scripts, including the creation of indexes.
I works, however the script contains the CREATE TABLE statements as
well. I want the scripts to recreate the scripts on another filegroup
(testing a theory from previous post).
Am I missing a switch in the wizard to exclude CREATE TABLE?
I did create the script, but then I manually deleted all the CREATE
TABLE statements, which was a pain.
Thanks
RobOn Mar 12, 11:55 am, "rcamarda" <robert.a.cama...@.gmail.comwrote:

Quote:

Originally Posted by

I haveSQLServer 2005 x64. I found in the studio I cangenerateall
sorts of scripts, including the creation of indexes.
I works, however thescriptcontains the CREATE TABLE statements as
well. I want the scripts to recreate the scripts on another filegroup
(testing a theory from previous post).
Am I missing a switch in the wizard to exclude CREATE TABLE?
I did create thescript, but then I manually deleted all the CREATE
TABLE statements, which was a pain.
Thanks
Rob


If you want to fine-tune what gets scripted, you might want to check
out this free app I wrote using SMO:

http://www.elsasoft.org/tools.htm
it will generate scripts for all objects in any 2000 or 2005 db. You
could easily modify it to script only indexes. source code is
available. implemented in C#.

Monday, March 26, 2012

Script to Populate DB with Sample Data?

All:
Is there a tool out there that will construct DB creation scripts that
include taking the source data from the tables can carrying the info
over to the script? The goal here is for developers to be able to check
out the DB creation script (the DDL that creates tables, stored proc,
etc.) AND have their DB filled with sample data.
The tools that come w/ Enterprise Manager, etc. create the DDL scripts
fine - but how can I help my guys get the proper sample data?
Thanks,
Johnhttp://vyaskn.tripod.com/code/generate_inserts.txt
David Portas
SQL Server MVP
--
<jpuopolo@.mvisiontechnology.com> wrote in message
news:1126468738.427835.243580@.z14g2000cwz.googlegroups.com...
> All:
> Is there a tool out there that will construct DB creation scripts that
> include taking the source data from the tables can carrying the info
> over to the script? The goal here is for developers to be able to check
> out the DB creation script (the DDL that creates tables, stored proc,
> etc.) AND have their DB filled with sample data.
> The tools that come w/ Enterprise Manager, etc. create the DDL scripts
> fine - but how can I help my guys get the proper sample data?
> Thanks,
> John
>|||Hi
Another (quicker) approach would be to build a template database and
populate it with static data (which should really be also held in your
source code control system (see David's link) ) and then give the
developers a backup (which you may want to hold in your source code control
system).
John
<jpuopolo@.mvisiontechnology.com> wrote in message
news:1126468738.427835.243580@.z14g2000cwz.googlegroups.com...
> All:
> Is there a tool out there that will construct DB creation scripts that
> include taking the source data from the tables can carrying the info
> over to the script? The goal here is for developers to be able to check
> out the DB creation script (the DDL that creates tables, stored proc,
> etc.) AND have their DB filled with sample data.
> The tools that come w/ Enterprise Manager, etc. create the DDL scripts
> fine - but how can I help my guys get the proper sample data?
> Thanks,
> John
>|||Wow - Thanks!
John

Monday, March 12, 2012

Script including database and tables creation in one step

Hi all,
I want to create a complete script for my SQL Server 2005 database,
including database creation, and tables creation. Is there any way to
do it visually from SQL Server Management Studio, all in one step.
I've only been able to generate a script with database creation and
another script with tables creation. I just mix the scripts and no
more trouble, but I remember there was a way to generate a complete
script in one step from Management Studio.
Maybe I'm wrong about this "one-step" script, but just in case
somebody knows the trick...
Regards.
Hi
Have you tried right click on the database -tasks--generate scripts?
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178521497.595949.126000@.o5g2000hsb.googlegro ups.com...
> Hi all,
> I want to create a complete script for my SQL Server 2005 database,
> including database creation, and tables creation. Is there any way to
> do it visually from SQL Server Management Studio, all in one step.
> I've only been able to generate a script with database creation and
> another script with tables creation. I just mix the scripts and no
> more trouble, but I remember there was a way to generate a complete
> script in one step from Management Studio.
> Maybe I'm wrong about this "one-step" script, but just in case
> somebody knows the trick...
> Regards.
>
|||Yes, I've already tried but if not wrong, only generates create table
statements, users, roles, schemas and so on. But no sign of create
database statement.
Thanks.
|||Hi
Yes, there isn't. Try right click on the database and click Script database
as...
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178524605.708697.208370@.p77g2000hsh.googlegr oups.com...
> Yes, I've already tried but if not wrong, only generates create table
> statements, users, roles, schemas and so on. But no sign of create
> database statement.
> Thanks.
>
|||The option you mention does not script the different create table
statements; only writes create database related statements.
I'm afraid there is no way to do it "all-in-one step". Then, the mix
between two separated scripts is needed.
Regards.
|||Hi
Take look at SQL-SMO (SQL-DMO) object library
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178532977.970284.245110@.p77g2000hsh.googlegr oups.com...
> The option you mention does not script the different create table
> statements; only writes create database related statements.
> I'm afraid there is no way to do it "all-in-one step". Then, the mix
> between two separated scripts is needed.
> Regards.
>

Script including database and tables creation in one step

Hi all,
I want to create a complete script for my SQL Server 2005 database,
including database creation, and tables creation. Is there any way to
do it visually from SQL Server Management Studio, all in one step.
I've only been able to generate a script with database creation and
another script with tables creation. I just mix the scripts and no
more trouble, but I remember there was a way to generate a complete
script in one step from Management Studio.
Maybe I'm wrong about this "one-step" script, but just in case
somebody knows the trick...
Regards.Hi
Have you tried right click on the database -tasks--generate scripts?
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178521497.595949.126000@.o5g2000hsb.googlegroups.com...
> Hi all,
> I want to create a complete script for my SQL Server 2005 database,
> including database creation, and tables creation. Is there any way to
> do it visually from SQL Server Management Studio, all in one step.
> I've only been able to generate a script with database creation and
> another script with tables creation. I just mix the scripts and no
> more trouble, but I remember there was a way to generate a complete
> script in one step from Management Studio.
> Maybe I'm wrong about this "one-step" script, but just in case
> somebody knows the trick...
> Regards.
>|||Yes, I've already tried but if not wrong, only generates create table
statements, users, roles, schemas and so on. But no sign of create
database statement.
Thanks.|||Hi
Yes, there isn't. Try right click on the database and click Script database
as...
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178524605.708697.208370@.p77g2000hsh.googlegroups.com...
> Yes, I've already tried but if not wrong, only generates create table
> statements, users, roles, schemas and so on. But no sign of create
> database statement.
> Thanks.
>|||The option you mention does not script the different create table
statements; only writes create database related statements.
I'm afraid there is no way to do it "all-in-one step". Then, the mix
between two separated scripts is needed.
Regards.|||Hi
Take look at SQL-SMO (SQL-DMO) object library
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178532977.970284.245110@.p77g2000hsh.googlegroups.com...
> The option you mention does not script the different create table
> statements; only writes create database related statements.
> I'm afraid there is no way to do it "all-in-one step". Then, the mix
> between two separated scripts is needed.
> Regards.
>

Script including database and tables creation in one step

Hi all,
I want to create a complete script for my SQL Server 2005 database,
including database creation, and tables creation. Is there any way to
do it visually from SQL Server Management Studio, all in one step.
I've only been able to generate a script with database creation and
another script with tables creation. I just mix the scripts and no
more trouble, but I remember there was a way to generate a complete
script in one step from Management Studio.
Maybe I'm wrong about this "one-step" script, but just in case
somebody knows the trick...
Regards.Hi
Have you tried right click on the database -tasks--generate scripts?
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178521497.595949.126000@.o5g2000hsb.googlegroups.com...
> Hi all,
> I want to create a complete script for my SQL Server 2005 database,
> including database creation, and tables creation. Is there any way to
> do it visually from SQL Server Management Studio, all in one step.
> I've only been able to generate a script with database creation and
> another script with tables creation. I just mix the scripts and no
> more trouble, but I remember there was a way to generate a complete
> script in one step from Management Studio.
> Maybe I'm wrong about this "one-step" script, but just in case
> somebody knows the trick...
> Regards.
>|||Yes, I've already tried but if not wrong, only generates create table
statements, users, roles, schemas and so on. But no sign of create
database statement.
Thanks.|||Hi
Yes, there isn't. Try right click on the database and click Script database
as...
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178524605.708697.208370@.p77g2000hsh.googlegroups.com...
> Yes, I've already tried but if not wrong, only generates create table
> statements, users, roles, schemas and so on. But no sign of create
> database statement.
> Thanks.
>|||The option you mention does not script the different create table
statements; only writes create database related statements.
I'm afraid there is no way to do it "all-in-one step". Then, the mix
between two separated scripts is needed.
Regards.|||Hi
Take look at SQL-SMO (SQL-DMO) object library
"Lonifasiko" <mloichate@.gmail.com> wrote in message
news:1178532977.970284.245110@.p77g2000hsh.googlegroups.com...
> The option you mention does not script the different create table
> statements; only writes create database related statements.
> I'm afraid there is no way to do it "all-in-one step". Then, the mix
> between two separated scripts is needed.
> Regards.
>

Script for Database Creation??

Hello,
I know how to make scripts for tables and indexes and
other objects, but how do I make a script to create the
actual database?
I have a database with multiple filegroups, etc. and I
would really like to setup a script to recreate it but I
cannot figure out how.
Thanks.
Chris.One way is in QA, Object Browser, right-click the database and do the
scripting from there.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chris" <stooky@.geekadventure.com> wrote in message
news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
> Hello,
> I know how to make scripts for tables and indexes and
> other objects, but how do I make a script to create the
> actual database?
> I have a database with multiple filegroups, etc. and I
> would really like to setup a script to recreate it but I
> cannot figure out how.
> Thanks.
> Chris.|||Sweet, thanks. I was poking around here...there,
downloaded EMS...etc...etc.
Thanks.
Chris.

>--Original Message--
>One way is in QA, Object Browser, right-click the
database and do the
>scripting from there.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Chris" <stooky@.geekadventure.com> wrote in message
>news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
>
>.
>|||Hi,
One more way is using Enterprise manager,
In Enterprise Manager, Right click above the database which you need the
script
select ALL tasks and select "Generate SQL Scripts"
In the Options Tab -- Select (Click) "Script database"
Go back to General Tab and click "Preview"
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eHGOysCBEHA.1140@.TK2MSFTNGP10.phx.gbl...
> One way is in QA, Object Browser, right-click the database and do the
> scripting from there.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Chris" <stooky@.geekadventure.com> wrote in message
> news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
>

Script for Database Creation??

Hello,
I know how to make scripts for tables and indexes and
other objects, but how do I make a script to create the
actual database?
I have a database with multiple filegroups, etc. and I
would really like to setup a script to recreate it but I
cannot figure out how.
Thanks.
Chris.One way is in QA, Object Browser, right-click the database and do the
scripting from there.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Chris" <stooky@.geekadventure.com> wrote in message
news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
> Hello,
> I know how to make scripts for tables and indexes and
> other objects, but how do I make a script to create the
> actual database?
> I have a database with multiple filegroups, etc. and I
> would really like to setup a script to recreate it but I
> cannot figure out how.
> Thanks.
> Chris.|||Sweet, thanks. I was poking around here...there,
downloaded EMS...etc...etc.
Thanks.
Chris.
>--Original Message--
>One way is in QA, Object Browser, right-click the
database and do the
>scripting from there.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>
>"Chris" <stooky@.geekadventure.com> wrote in message
>news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
>> Hello,
>> I know how to make scripts for tables and indexes and
>> other objects, but how do I make a script to create the
>> actual database?
>> I have a database with multiple filegroups, etc. and I
>> would really like to setup a script to recreate it but I
>> cannot figure out how.
>> Thanks.
>> Chris.
>
>.
>|||Hi,
One more way is using Enterprise manager,
In Enterprise Manager, Right click above the database which you need the
script
select ALL tasks and select "Generate SQL Scripts"
In the Options Tab -- Select (Click) "Script database"
Go back to General Tab and click "Preview"
Thanks
Hari
MCDBA
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eHGOysCBEHA.1140@.TK2MSFTNGP10.phx.gbl...
> One way is in QA, Object Browser, right-click the database and do the
> scripting from there.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
>
> "Chris" <stooky@.geekadventure.com> wrote in message
> news:85bc01c40428$6d042e50$a501280a@.phx.gbl...
> > Hello,
> >
> > I know how to make scripts for tables and indexes and
> > other objects, but how do I make a script to create the
> > actual database?
> >
> > I have a database with multiple filegroups, etc. and I
> > would really like to setup a script to recreate it but I
> > cannot figure out how.
> >
> > Thanks.
> >
> > Chris.
>

Friday, March 9, 2012

Script creation

Hi

I am supposed to give scripts for an installtion at client site.

installing SQL server 2005 Developer edition
some databases already we have
tables
indexes
Stored procedures
jobs

Can u please guide me how to do this?

I am new to this.

Muralidaran rI would suggest you get a mentor at your current place of employment.|||In SQL Server Management Studio, right-click on your database and select "Script Database as...".|||Dump and restore|||The jobs will need to be scripted separately from the database, however
(which, incidentally, irritates the hell out of me).

Don't forget to check the appropriate options when you are scripting though, and remember that sp_change_users_login can be helpful to get your userid's back in synch.

Mi Perro, you have a huge pile of work before you...if'n I was you I'd start (a) asking for a mentor at my place of employment, (b) ask if perhaps this task can be given to someone who is not "new to this", (c) updating my resume, or (d) all of the above.

If this is anything other than a training exercise, and you are actually building a representative product at your client's site, you probably need to be more than "new at this", and hopefully your company management would agree.