Showing posts with label populate. Show all posts
Showing posts with label populate. Show all posts

Monday, March 26, 2012

Script to populate for a large DB

can someone help me provide a script that will populate around 50GB of data
? Ideally it would be multiple tables with some various data types...if I
could add more data to Northwind or pubs or even AdventureWorks, that would
be fine..
Thanks
On May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
> can someone help me provide a script that will populate around 50GB of data
> ? Ideally it would be multiple tables with some various data types...if I
> could add more data to Northwind or pubs or even AdventureWorks, that would
> be fine..
> Thanks
BCP and Bulk Insert are good options for populating large amounts of
data quickly. This link might be helpful.
http://msdn2.microsoft.com/en-us/library/ms175915.aspx
Also, you could consider using SSIS (Integration Services), if you are
using SQL Server 2005. It has some pretty useful ETL/transformation
options that should be helpful.
http://msdn2.microsoft.com/en-us/library/ms167031.aspx
http://www.tutorialized.com/tutorial/Your-First-Script-Component-in-SQL-Server-2005-Integration-Services/13640
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant
|||I am aware of these tools, but I wanted scripts where I could just run and
it would start populating..
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1178481390.533564.160560@.y5g2000hsa.googlegro ups.com...
> On May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
>
> BCP and Bulk Insert are good options for populating large amounts of
> data quickly. This link might be helpful.
> http://msdn2.microsoft.com/en-us/library/ms175915.aspx
> Also, you could consider using SSIS (Integration Services), if you are
> using SQL Server 2005. It has some pretty useful ETL/transformation
> options that should be helpful.
> http://msdn2.microsoft.com/en-us/library/ms167031.aspx
> http://www.tutorialized.com/tutorial/Your-First-Script-Component-in-SQL-Server-2005-Integration-Services/13640
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>
|||Hassan
TestBase www.tenerus.com
TESTBytes www.cai.com
"Hassan" <hassan@.hotmail.com> wrote in message
news:uURKzgDkHHA.3484@.TK2MSFTNGP02.phx.gbl...
>I am aware of these tools, but I wanted scripts where I could just run and
>it would start populating..
> "EMartinez" <emartinez.pr1@.gmail.com> wrote in message
> news:1178481390.533564.160560@.y5g2000hsa.googlegro ups.com...
>

Script to populate for a large DB

can someone help me provide a script that will populate around 50GB of data
? Ideally it would be multiple tables with some various data types...if I
could add more data to Northwind or pubs or even AdventureWorks, that would
be fine..
ThanksOn May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
> can someone help me provide a script that will populate around 50GB of data
> ? Ideally it would be multiple tables with some various data types...if I
> could add more data to Northwind or pubs or even AdventureWorks, that would
> be fine..
> Thanks
BCP and Bulk Insert are good options for populating large amounts of
data quickly. This link might be helpful.
http://msdn2.microsoft.com/en-us/library/ms175915.aspx
Also, you could consider using SSIS (Integration Services), if you are
using SQL Server 2005. It has some pretty useful ETL/transformation
options that should be helpful.
http://msdn2.microsoft.com/en-us/library/ms167031.aspx
http://www.tutorialized.com/tutorial/Your-First-Script-Component-in-SQL-Server-2005-Integration-Services/13640
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||I am aware of these tools, but I wanted scripts where I could just run and
it would start populating..
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1178481390.533564.160560@.y5g2000hsa.googlegroups.com...
> On May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
>> can someone help me provide a script that will populate around 50GB of
>> data
>> ? Ideally it would be multiple tables with some various data types...if I
>> could add more data to Northwind or pubs or even AdventureWorks, that
>> would
>> be fine..
>> Thanks
>
> BCP and Bulk Insert are good options for populating large amounts of
> data quickly. This link might be helpful.
> http://msdn2.microsoft.com/en-us/library/ms175915.aspx
> Also, you could consider using SSIS (Integration Services), if you are
> using SQL Server 2005. It has some pretty useful ETL/transformation
> options that should be helpful.
> http://msdn2.microsoft.com/en-us/library/ms167031.aspx
> http://www.tutorialized.com/tutorial/Your-First-Script-Component-in-SQL-Server-2005-Integration-Services/13640
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||Hassan
TestBase www.tenerus.com
TESTBytes www.cai.com
"Hassan" <hassan@.hotmail.com> wrote in message
news:uURKzgDkHHA.3484@.TK2MSFTNGP02.phx.gbl...
>I am aware of these tools, but I wanted scripts where I could just run and
>it would start populating..
> "EMartinez" <emartinez.pr1@.gmail.com> wrote in message
> news:1178481390.533564.160560@.y5g2000hsa.googlegroups.com...
>> On May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
>> can someone help me provide a script that will populate around 50GB of
>> data
>> ? Ideally it would be multiple tables with some various data types...if
>> I
>> could add more data to Northwind or pubs or even AdventureWorks, that
>> would
>> be fine..
>> Thanks
>>
>> BCP and Bulk Insert are good options for populating large amounts of
>> data quickly. This link might be helpful.
>> http://msdn2.microsoft.com/en-us/library/ms175915.aspx
>> Also, you could consider using SSIS (Integration Services), if you are
>> using SQL Server 2005. It has some pretty useful ETL/transformation
>> options that should be helpful.
>> http://msdn2.microsoft.com/en-us/library/ms167031.aspx
>> http://www.tutorialized.com/tutorial/Your-First-Script-Component-in-SQL-Server-2005-Integration-Services/13640
>> Hope this helps.
>> Regards,
>> Enrique Martinez
>> Sr. Software Consultant
>

Script to populate for a large DB

can someone help me provide a script that will populate around 50GB of data
? Ideally it would be multiple tables with some various data types...if I
could add more data to Northwind or pubs or even AdventureWorks, that would
be fine..
ThanksOn May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
> can someone help me provide a script that will populate around 50GB of dat
a
> ? Ideally it would be multiple tables with some various data types...if I
> could add more data to Northwind or pubs or even AdventureWorks, that woul
d
> be fine..
> Thanks
BCP and Bulk Insert are good options for populating large amounts of
data quickly. This link might be helpful.
http://msdn2.microsoft.com/en-us/library/ms175915.aspx
Also, you could consider using SSIS (Integration Services), if you are
using SQL Server 2005. It has some pretty useful ETL/transformation
options that should be helpful.
http://msdn2.microsoft.com/en-us/library/ms167031.aspx
http://www.tutorialized.com/tutoria...-Services/13640
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||I am aware of these tools, but I wanted scripts where I could just run and
it would start populating..
"EMartinez" <emartinez.pr1@.gmail.com> wrote in message
news:1178481390.533564.160560@.y5g2000hsa.googlegroups.com...
> On May 6, 10:43 am, "Hassan" <has...@.hotmail.com> wrote:
>
> BCP and Bulk Insert are good options for populating large amounts of
> data quickly. This link might be helpful.
> http://msdn2.microsoft.com/en-us/library/ms175915.aspx
> Also, you could consider using SSIS (Integration Services), if you are
> using SQL Server 2005. It has some pretty useful ETL/transformation
> options that should be helpful.
> http://msdn2.microsoft.com/en-us/library/ms167031.aspx
> http://www.tutorialized.com/tutoria...-Services/13640
> Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||Hassan
TestBase www.tenerus.com
TESTBytes www.cai.com
"Hassan" <hassan@.hotmail.com> wrote in message
news:uURKzgDkHHA.3484@.TK2MSFTNGP02.phx.gbl...
>I am aware of these tools, but I wanted scripts where I could just run and
>it would start populating..
> "EMartinez" <emartinez.pr1@.gmail.com> wrote in message
> news:1178481390.533564.160560@.y5g2000hsa.googlegroups.com...
>sql

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

Friday, March 23, 2012

script to copy logins and users with all permissions

Hello all,
I am looking for the script, which I believe exists already.I need to
be able to populate the script for security of one database and
apply it to another database, even if it is located on another server:
1. All logins which not exist have to be created and which exists
ignored including the NT accounts
2. Users same as the old database + the existing ones stay in database
3. Passwords for the new logins.
4. All permissions/grants on all objects for the users that exists
(usually it's the case) and ignore those that don't.
I have script which does some of it, but it's not perfect, so every
time there are some errors.
Please let me know, if you need me to email script that I have. It's
pretty long so I cannot just post it in here.
Thank you in advance.Inna,

If on SQL 2K, use Enterprise Manager.
Right click the database/All Tasks/Generate SQL Script.
Click the Options tab and you can select all of the logins and object
permissions you need.

-- Bill

"Inna" <mednyk@.hotmail.comwrote in message
news:1169753046.376196.16430@.v45g2000cwv.googlegro ups.com...

Quote:

Originally Posted by

Hello all,
I am looking for the script, which I believe exists already.I need to
be able to populate the script for security of one database and
apply it to another database, even if it is located on another server:
1. All logins which not exist have to be created and which exists
ignored including the NT accounts
2. Users same as the old database + the existing ones stay in database
3. Passwords for the new logins.
4. All permissions/grants on all objects for the users that exists
(usually it's the case) and ignore those that don't.
I have script which does some of it, but it's not perfect, so every
time there are some errors.
Please let me know, if you need me to email script that I have. It's
pretty long so I cannot just post it in here.
Thank you in advance.
>

|||On Jan 25, 7:04 pm, "AlterEgo" <altereg...@.dslextreme.comwrote:

Quote:

Originally Posted by

Inna,
>
If on SQL 2K, use Enterprise Manager.
Right click the database/All Tasks/Generate SQL Script.
Click the Options tab and you can select all of the logins and object
permissions you need.
>
-- Bill
>
"Inna" <med...@.hotmail.comwrote in message
>
news:1169753046.376196.16430@.v45g2000cwv.googlegro ups.com...
>
>
>

Quote:

Originally Posted by

Hello all,
I am looking for the script, which I believe exists already.I need to
be able to populate the script for security of one database and
apply it to another database, even if it is located on another server:
1. All logins which not exist have to be created and which exists
ignored including the NT accounts
2. Users same as the old database + the existing ones stay in database
3. Passwords for the new logins.
4. All permissions/grants on all objects for the users that exists
(usually it's the case) and ignore those that don't.
I have script which does some of it, but it's not perfect, so every
time there are some errors.
Please let me know, if you need me to email script that I have. It's
pretty long so I cannot just post it in here.
Thank you in advance.- Hide quoted text -


>
- Show quoted text -


Hello,
I cannot use Enterprise Manager, because every time it has to be done
for different database and this script is a part of another process
and it uses database name and server name as parameter.
Is there way just to populate script for any database, from query
analyzer?|||On Jan 30, 3:26 pm, "Inna" <med...@.hotmail.comwrote:

Quote:

Originally Posted by

On Jan 25, 7:04 pm, "AlterEgo" <altereg...@.dslextreme.comwrote:
>
>
>

Quote:

Originally Posted by

Inna,


>

Quote:

Originally Posted by

If on SQL 2K, use Enterprise Manager.
Right click the database/All Tasks/Generate SQL Script.
Click the Options tab and you can select all of the logins and object
permissions you need.


>

Quote:

Originally Posted by

-- Bill


>

Quote:

Originally Posted by

"Inna" <med...@.hotmail.comwrote in message


>

Quote:

Originally Posted by

news:1169753046.376196.16430@.v45g2000cwv.googlegro ups.com...


>

Quote:

Originally Posted by

Quote:

Originally Posted by

Hello all,
I am looking for the script, which I believe exists already.I need to
be able to populate the script for security of one database and
apply it to another database, even if it is located on another server:
1. All logins which not exist have to be created and which exists
ignored including the NT accounts
2. Users same as the old database + the existing ones stay in database
3. Passwords for the new logins.
4. All permissions/grants on all objects for the users that exists
(usually it's the case) and ignore those that don't.
I have script which does some of it, but it's not perfect, so every
time there are some errors.
Please let me know, if you need me to email script that I have. It's
pretty long so I cannot just post it in here.
Thank you in advance.- Hide quoted text -


>

Quote:

Originally Posted by

- Show quoted text -


>
Hello,
I cannot use Enterprise Manager, because every time it has to be done
for different database and this script is a part of another process
and it uses database name and server name as parameter.
Is there way just to populate script for any database, from query
analyzer?


AlterEgo's point is - let Enterprise manager generate the sql for you.
It will give you a starting point and you can change the code to be
specific for your application.

Tuesday, March 20, 2012

Script out whole SQL SERVER Database including INSERT

Hi All,
I am trying to script out a whole SQL SERVER database with all objects
in it along with INSERT Statments to populate data into the table. My
goal is to have one single file which I can just run and produce the
same structure in a new system.
I do not know if there is a way to do that. If there is, I would really
appreciate if any of you can let me know.
Thanks
-- CCDon=B4t know which SQL Server version you are using but for SQL2k5 the
new namespace from SSIS offers something to do that programmatically.
Anyway, if you don=B4t want the tools and want to do that the old
fashioned way, there is a script from vyaskn which produces the
statement from TSQL:
http://vyaskn.tripod.com/code.htm#inserts
HTH, Jens Suessmeyer.