Showing posts with label import. Show all posts
Showing posts with label import. Show all posts

Tuesday, March 27, 2012

Exporting Packages

Can I simply Export my packeges on my SQL Server 2005 and use them on another SQL 2005 Server ?

Ie.

Can I build them at home, burn to a CD then import in work ? without any issues at all ?

I have a completly different user name in work for instance.

If not, is it possible to do this at all ?

Thanks

Yes, use windows authentication and/or configurations|||I would rather choose the option encrypt sensitive with password.
Then you can deploy your package where you want.
When you execute the package don't forget to provide the password...

Fridtjof|||Perfect thanks :)|||

Is you are moving packages between locations, the chances are that the resources used will be different and therefore have different credentials, so saving passwords would not really solve the problem, in fact it would be a risk as you would may disclose local credentials to another site or organisation, when there is no need. I'd also suggest that do not save sensitive is safer, and when used with configurations it is very easy for both development and operationally.

exporting from vision to sql server

hi all,
i can import my database diagram from
sql server using the data>reverse engineer feature
the question is
how can i send it back?
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787correction that Visio not vision
--
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Jose G. de Jesus Jr MCP, MCDBA" wrote:

> hi all,
> i can import my database diagram from
> sql server using the data>reverse engineer feature
> the question is
> how can i send it back?
> --
> thanks,
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787|||Hello,
As far as I remember, you can do that only with Visio for Enterprise
Architects 2003 Edition
Mary
"Jose G. de Jesus Jr MCP, MCDBA" <Email me> wrote in message
news:AA9FF22E-EE50-4AF9-BDA3-006AE243307D@.microsoft.com...
> correction that Visio not vision
> --
> thanks,
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>|||Hi
For SQL 2000 diagrams and Visio diagrams are different things, you can not
export it back into SQL Server. If you want to update your database with
schema changes in the model then use the Update option on the database menu.
John
"Jose G. de Jesus Jr MCP, MCDBA" wrote:
> correction that Visio not vision
> --
> thanks,
> --
> Jose de Jesus Jr. Mcp,Mcdba
> Data Architect
> Sykes Asia (Manila philippines)
> MCP #2324787
>
> "Jose G. de Jesus Jr MCP, MCDBA" wrote:
>

Sunday, March 25, 2012

Exporting Database using Microsoft OLE DB Prvider

Hello,

I'm trying to export a database using the 'DTS Import/Export Wizard', I need to use the 'Microsoft OLE DB Provider for SQL Server', but it does not appear on the 'Data source' Drop-Down list of that Wizard.

What can I do to get that OLE DB Provider installed?

I'm running SQL Server 2000 Personal on a Windows XP Media Center PC and I have MSDAC 2.8 SP1 installed.

I also checked that I have the file sqloledb.dll on the 'C:\Program Files\Common Files\System\Ole db' directory.

I'll appreciate any help.

Thanks.

apply sql server sp4|||

I already have SQL Server SP4.

I also tried to unregister and re-register sqloledb.dll and oledb32.dll

|||Anybody? I'm having the exact same problem. how do you "re-install" and register the standard data source items like "Microsoft OLE DB Provider for SQL Server"?

I'm running XP Media Center SP2 with

SQL Enterprise Manager 2000 SP4.

I've re-registered the DLLs, etc. Where can the data source files physically be found?

I don't have much use for "Driver da Microsoft para arquivos textto (*txt,*csv)"!

I need my SQL Import/Export back! Help!

Thanks, all...

Thursday, March 22, 2012

Exporting data from excel...

Ok,
I understand how to import data from MS SQL to Excel whenMS SQL is on different machine in the network. I am curious how to export data to the MS SQL databases from Excel on my machine... help is appreciated
thanks!Originally posted by ab8140
Ok,

I understand how to import data from MS SQL to Excel whenMS SQL is on different machine in the network. I am curious how to export data to the MS SQL databases from Excel on my machine... help is appreciated

thanks!

There are many ways to do this. Is it a one shot deal or are you going to be doing this over and over again with the same data? One way is to create a simple DTS package to access the spreadsheet and import it in. Another way would be to save the file as a text file and bcp it in. Or, you could write a simple vba app in excel that opens up an odbc or ado connection into sql and pumps the data in. Yes, there are many many ways depending on your specific talents and needs.|||As referred DTS can be used to accomplish the task, make sure SQL Services account does have necessary privileges when scheduling or executing such DTS packages.sql

Wednesday, March 21, 2012

Exporting a table and importing it

I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.
The tables are - Cust, MatProd, Plant
the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.
Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.
If I want to use DTS how can I do it.
Thanks
KarenAre the database servers on the same network? Can they "talk" to each
other?
You could use DTS to import data from one server. It is a fairly easy
process. Using DTS in this type of basic scenario is pretty
straightforward. You simply import data from a specific source.
Keith
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||Right click on tables--> all tasks-->export data
Then you will get a wizard, set up your source DB and your destination DB,
select the tables hit run and that's it
you can also use BCP to export and import them
http://sqlservercode.blogspot.com/
"karenmiddleol@.yahoo.com" wrote:

> I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||DTS or the "bulk copy" command can be used to export the data to a file such
as tab delimited text, MS Access, native, etc.
However, none of these file formats will retain all the table structure
including the exact data type, constraints, triggers, etc. For this, you
will need to use the "Generate Scripts" feature of Enterprise Manager. On
the destination database, run the scripts to re-create empty tables, then
use DTS or bulk copy the files into the appropriate tables.
CREATE TABLE
http://msdn.microsoft.com/library/e...reate2_8g9x.asp
How to generate a script (Enterprise Manager)
http://msdn.microsoft.com/library/e...design_3qt0.asp
Preparing Data for Importing and Exporting
http://msdn.microsoft.com/library/e...pt_bcp_1njt.asp
Copying Data From a Data File to SQL Server
http://msdn.microsoft.com/library/e...pt_bcp_4t9u.asp
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>

Exporting a table and importing it

I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.
The tables are - Cust, MatProd, Plant
the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.
Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.
If I want to use DTS how can I do it.
Thanks
KarenAre the database servers on the same network? Can they "talk" to each
other?
You could use DTS to import data from one server. It is a fairly easy
process. Using DTS in this type of basic scenario is pretty
straightforward. You simply import data from a specific source.
Keith
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||Right click on tables--> all tasks-->export data
Then you will get a wizard, set up your source DB and your destination DB,
select the tables hit run and that's it
you can also use BCP to export and import them
http://sqlservercode.blogspot.com/
"karenmiddleol@.yahoo.com" wrote:

> I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||DTS or the "bulk copy" command can be used to export the data to a file such
as tab delimited text, MS Access, native, etc.
However, none of these file formats will retain all the table structure
including the exact data type, constraints, triggers, etc. For this, you
will need to use the "Generate Scripts" feature of Enterprise Manager. On
the destination database, run the scripts to re-create empty tables, then
use DTS or bulk copy the files into the appropriate tables.
CREATE TABLE
http://msdn.microsoft.com/library/e...reate2_8g9x.asp
How to generate a script (Enterprise Manager)
http://msdn.microsoft.com/library/e...design_3qt0.asp
Preparing Data for Importing and Exporting
http://msdn.microsoft.com/library/e...pt_bcp_1njt.asp
Copying Data From a Data File to SQL Server
http://msdn.microsoft.com/library/e...pt_bcp_4t9u.asp
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>sql

Exporting a table and importing it

I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.
The tables are - Cust, MatProd, Plant
the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.
Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.
If I want to use DTS how can I do it.
Thanks
Karen
Are the database servers on the same network? Can they "talk" to each
other?
You could use DTS to import data from one server. It is a fairly easy
process. Using DTS in this type of basic scenario is pretty
straightforward. You simply import data from a specific source.
Keith
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegro ups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>
|||Right click on tables--> all tasks-->export data
Then you will get a wizard, set up your source DB and your destination DB,
select the tables hit run and that's it
you can also use BCP to export and import them
http://sqlservercode.blogspot.com/
"karenmiddleol@.yahoo.com" wrote:

> I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>
|||DTS or the "bulk copy" command can be used to export the data to a file such
as tab delimited text, MS Access, native, etc.
However, none of these file formats will retain all the table structure
including the exact data type, constraints, triggers, etc. For this, you
will need to use the "Generate Scripts" feature of Enterprise Manager. On
the destination database, run the scripts to re-create empty tables, then
use DTS or bulk copy the files into the appropriate tables.
CREATE TABLE
http://msdn.microsoft.com/library/en...eate2_8g9x.asp
How to generate a script (Enterprise Manager)
http://msdn.microsoft.com/library/en...esign_3qt0.asp
Preparing Data for Importing and Exporting
http://msdn.microsoft.com/library/en...t_bcp_1njt.asp
Copying Data From a Data File to SQL Server
http://msdn.microsoft.com/library/en...t_bcp_4t9u.asp
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegro ups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>

Exporting a table and importing it

I want to export 3 tables in a SQL database with the table definition
and want to then import from this dump into another SQL database where
these tables do not exist.
The tables are - Cust, MatProd, Plant
the database to be exported is - SourcePur and the database these table
have to be created and imported is TargetPur.
Please can you share what utility and what command line options I use
to export these tables into one dump and how to import it back.
If I want to use DTS how can I do it.
Thanks
KarenAre the database servers on the same network? Can they "talk" to each
other?
You could use DTS to import data from one server. It is a fairly easy
process. Using DTS in this type of basic scenario is pretty
straightforward. You simply import data from a specific source.
--
Keith
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||Right click on tables--> all tasks-->export data
Then you will get a wizard, set up your source DB and your destination DB,
select the tables hit run and that's it
you can also use BCP to export and import them
http://sqlservercode.blogspot.com/
"karenmiddleol@.yahoo.com" wrote:
> I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>|||DTS or the "bulk copy" command can be used to export the data to a file such
as tab delimited text, MS Access, native, etc.
However, none of these file formats will retain all the table structure
including the exact data type, constraints, triggers, etc. For this, you
will need to use the "Generate Scripts" feature of Enterprise Manager. On
the destination database, run the scripts to re-create empty tables, then
use DTS or bulk copy the files into the appropriate tables.
CREATE TABLE
http://msdn.microsoft.com/library/en-us/tsqlref/ts_create2_8g9x.asp
How to generate a script (Enterprise Manager)
http://msdn.microsoft.com/library/en-us/howtosql/ht_7_design_3qt0.asp
Preparing Data for Importing and Exporting
http://msdn.microsoft.com/library/en-us/adminsql/ad_impt_bcp_1njt.asp
Copying Data From a Data File to SQL Server
http://msdn.microsoft.com/library/en-us/adminsql/ad_impt_bcp_4t9u.asp
<karenmiddleol@.yahoo.com> wrote in message
news:1129118048.865757.65170@.g47g2000cwa.googlegroups.com...
>I want to export 3 tables in a SQL database with the table definition
> and want to then import from this dump into another SQL database where
> these tables do not exist.
> The tables are - Cust, MatProd, Plant
> the database to be exported is - SourcePur and the database these table
> have to be created and imported is TargetPur.
> Please can you share what utility and what command line options I use
> to export these tables into one dump and how to import it back.
> If I want to use DTS how can I do it.
> Thanks
> Karen
>

Exporting a MS-SQL database

I have an asp site connected to an MS-SQL database, I need to export
the database and import it in to a MySQL database? How would I be able
to do this? My only way of communicating with the MS-SQL database is
via asp scripts.

Thank You
Ben Sagal

PS. i have no problem fixing the SQL code manually to be compatible
with MySQL.TI know you only have access via an asp script , but MySQL do offer a
migration toolkit

--

Jack Vamvas
___________________________________
Search IT jobs from multiple sources- http://www.ITjobfeed.com/SQL
<bsagal@.gmail.comwrote in message
news:1191321416.670361.48860@.50g2000hsm.googlegrou ps.com...

Quote:

Originally Posted by

>I have an asp site connected to an MS-SQL database, I need to export
the database and import it in to a MySQL database? How would I be able
to do this? My only way of communicating with the MS-SQL database is
via asp scripts.
>
Thank You
Ben Sagal
>
PS. i have no problem fixing the SQL code manually to be compatible
with MySQL.
>

Exporting a Cube into MS Excel

Hello,

I am wondering if it is possible to import hierarchies established in a SSAS 2005 cube into MS Excel. Right now, when I import a cube into MS Excel (Office 2003) through the following path in Excel: Data/Import External Data/New Database Query/Olap Cubes/"MyCube".cube, I am able to see cube's dimensions and measures but I cannot see my hiearchies. I would like my users to be able to drill down to the lowest level in a given hierarchy, the same way it works in a Cube Browser in BI Studio. Can it be done?

Any thoughts about it would be greatly appreciated.

Thanks a lot!

Hi.

There shouldn't be any problems using SSAS hierarchies in Excel 2003 (I do it quite a lot myself). One problem though is that the hierarchies are not displayed as such in the Pivot Table Field List but are shown as regular dimension values. Try to change the hierarchies' names, e.g. put a '-' in the beginning of the hierarchies' names to make it easier to distinguish them from regular dimensions.

Hope this helps.

Regards

Kjetil

|||

Yep, I found them. You were right, those hiearchies looked like dimension values. Let me ask you one more thing. My cube is pretty big, and I am wondering if there is a way in SSAS 2005 to get a subset of this cube, let say instead of sales for the whole week, I would like to see one day sales. I know that I could use perspectives in a cube browser but I am not sure how it is translating when you import a cube into an Excel file.?

Thank you very much for your help!

|||

Hi again.

I am not sure if I have understood your question correctly but if you want to break down the displayed data into one-day sales, one thing you can do is to to create a hierarchy with date as the lowes level member, e.g. a 'Year-Month-Week-Date' - hierarchy. This way you can select what level to display and make the calculations on and even filter out unwanted data at any level.

Hope this was what you wanted.

Regards

Kjetil

|||

That's exactly what I am going to do.

Thanks a lot Lars!

Export/Import via web

Scenario:
- W2k server sp4 / sql server 2k sp4 box.
- firewall with only port 80 opened.
I have to:
Query data from remote server to export into local server.
I would like to do it via ASP/IIS in one step.
How can I do it?
Regards.
Gibe si fatto passare perch Rossi dietro come una purga, prima o
poi una cagata te la fa fare...!Hi
I am not an ASP expert and you may get a better reply in a internet
programming newsgroup.
I don't know of any way to do this in one step! Some componenets will let
you save the contents to file (such as an excel spreadsheet) but it is a two
stage process to select/insert the data and then save it. Other two process
would be to have scheduled jobs or DTS packages to create the files and then
allow the user to download them.
John
"Fabri" wrote:

> Scenario:
>
> - W2k server sp4 / sql server 2k sp4 box.
> - firewall with only port 80 opened.
>
> I have to:
> Query data from remote server to export into local server.
> I would like to do it via ASP/IIS in one step.
> How can I do it?
> Regards.
> --
> Gibe si è fatto passare perchè Rossi dietro è come una purga, prima o
> poi una cagata te la fa fare...!
>

Export/Import tables from MSQL from/to .xml files

When I try to export a sql table to a .xml file I get the following error
when I use either sqlxmloledb or sqlxmloledb.3.0 as the destination:
sqloledb must be specified as the data provider.
However, sqloledb does not appear in the list of ole db providers. Does
anyone know how I can register sqloledb as a data provider please
I also have a problem using sql query analyzer to access a .xml file. All of
the examples in the help files show encoded xml data rather than accessing a
.xml data file on disk. Does anyone know how to link in the .xml file to sq
l
script please.
Regards,
Alan de Wetsqloledb should already be part of the OS. If you install MDAC / SqlClient
Tools / VS, SQLOLEDB should be installed.
Check C:\Program Files\Common Files\System\Oledb\sqloledb.dll for
verification. If the dll is there and is registered, then SQLOLEDB should be
there.
To use SQLOLEDB as the provider in the connection string, append
Provider=SQLOLEDB to the connection string.
thanks
Chandra
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Alan de Wet" <AlandeWet@.discussions.microsoft.com> wrote in message
news:B79E3526-4685-44FB-8CA1-94B0E4D97F90@.microsoft.com...
> When I try to export a sql table to a .xml file I get the following error
> when I use either sqlxmloledb or sqlxmloledb.3.0 as the destination:
> sqloledb must be specified as the data provider.
> However, sqloledb does not appear in the list of ole db providers. Does
> anyone know how I can register sqloledb as a data provider please
> I also have a problem using sql query analyzer to access a .xml file. All
> of
> the examples in the help files show encoded xml data rather than accessing
> a
> .xml data file on disk. Does anyone know how to link in the .xml file to
> sql
> script please.
> Regards,
> Alan de Wet|||Thanks for your reply Chandra. SQLOLEDB does not appear in the list of ole d
b
providers when I try to do an export from the Import and Export tool in MSQL
and am entering the Destination details. I am not trying to do the export
from a VB application so I do not have a connection string. SQLOLEDB is in
C:\Program Files\Common Files\System\Ole DB (being Ole DB and not Oledb). Ho
w
do I check if it is registered please?
Regards,
Alan
"Chandra Kalyanaraman [MSFT]" wrote:

> sqloledb should already be part of the OS. If you install MDAC / SqlClient
> Tools / VS, SQLOLEDB should be installed.
> Check C:\Program Files\Common Files\System\Oledb\sqloledb.dll for
> verification. If the dll is there and is registered, then SQLOLEDB should
be
> there.
> To use SQLOLEDB as the provider in the connection string, append
> Provider=SQLOLEDB to the connection string.
>
> thanks
> Chandra
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Alan de Wet" <AlandeWet@.discussions.microsoft.com> wrote in message
> news:B79E3526-4685-44FB-8CA1-94B0E4D97F90@.microsoft.com...
>
>|||Is it true that SQLXMLOLEDB provider supports data export via DTS
Import/Export Wizard?
Best regards
Martin Rakhmanov
"Alan de Wet" wrote:
> Thanks for your reply Chandra. SQLOLEDB does not appear in the list of ole
db
> providers when I try to do an export from the Import and Export tool in MS
QL
> and am entering the Destination details. I am not trying to do the export
> from a VB application so I do not have a connection string. SQLOLEDB is in
> C:\Program Files\Common Files\System\Ole DB (being Ole DB and not Oledb).
How
> do I check if it is registered please?
> Regards,
> Alan
> "Chandra Kalyanaraman [MSFT]" wrote:
>|||After I installed sqlxml 2 new Data Providers (SQLXMLOLEDB and
SQLXMLOLEDB.3.0) appear in the list when I select my destination. I have
tried both of them. When I select either one I get a message saying: To
connect click properties and enter the required information. When I click on
properties I do not see sqloledb as a ole db provider but if I select any
other provider, click OK and then click next I get a message saying that
SQLOLEDB must be specified as the data provider. If I select either
sqxmloledb or sqlxmloledb.3.0 as the ole db provider under properties I am
then asked to enter Data Source, Location and Server Log On Information whic
h
does not make sense as I am trying to export to a .xml file.
So to answer your question, maybe it was supposed to but it does not appear
to support data export via DTS Import/Export Wizard.
Best Regards,
Alan de Wet
"jimmers" wrote:
> Is it true that SQLXMLOLEDB provider supports data export via DTS
> Import/Export Wizard?
> Best regards
> Martin Rakhmanov
>
> "Alan de Wet" wrote:
>

Export/Import tables from MSQL from/to .xml files

When I try to export a sql table to a .xml file I get the following error
when I use either sqlxmloledb or sqlxmloledb.3.0 as the destination:
sqloledb must be specified as the data provider.
However, sqloledb does not appear in the list of ole db providers. Does
anyone know how I can register sqloledb as a data provider please
I also have a problem using sql query analyzer to access a .xml file. All of
the examples in the help files show encoded xml data rather than accessing a
..xml data file on disk. Does anyone know how to link in the .xml file to sql
script please.
Regards,
Alan de Wet
sqloledb should already be part of the OS. If you install MDAC / SqlClient
Tools / VS, SQLOLEDB should be installed.
Check C:\Program Files\Common Files\System\Oledb\sqloledb.dll for
verification. If the dll is there and is registered, then SQLOLEDB should be
there.
To use SQLOLEDB as the provider in the connection string, append
Provider=SQLOLEDB to the connection string.
thanks
Chandra
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Alan de Wet" <AlandeWet@.discussions.microsoft.com> wrote in message
news:B79E3526-4685-44FB-8CA1-94B0E4D97F90@.microsoft.com...
> When I try to export a sql table to a .xml file I get the following error
> when I use either sqlxmloledb or sqlxmloledb.3.0 as the destination:
> sqloledb must be specified as the data provider.
> However, sqloledb does not appear in the list of ole db providers. Does
> anyone know how I can register sqloledb as a data provider please
> I also have a problem using sql query analyzer to access a .xml file. All
> of
> the examples in the help files show encoded xml data rather than accessing
> a
> .xml data file on disk. Does anyone know how to link in the .xml file to
> sql
> script please.
> Regards,
> Alan de Wet
|||Thanks for your reply Chandra. SQLOLEDB does not appear in the list of ole db
providers when I try to do an export from the Import and Export tool in MSQL
and am entering the Destination details. I am not trying to do the export
from a VB application so I do not have a connection string. SQLOLEDB is in
C:\Program Files\Common Files\System\Ole DB (being Ole DB and not Oledb). How
do I check if it is registered please?
Regards,
Alan
"Chandra Kalyanaraman [MSFT]" wrote:

> sqloledb should already be part of the OS. If you install MDAC / SqlClient
> Tools / VS, SQLOLEDB should be installed.
> Check C:\Program Files\Common Files\System\Oledb\sqloledb.dll for
> verification. If the dll is there and is registered, then SQLOLEDB should be
> there.
> To use SQLOLEDB as the provider in the connection string, append
> Provider=SQLOLEDB to the connection string.
>
> thanks
> Chandra
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Alan de Wet" <AlandeWet@.discussions.microsoft.com> wrote in message
> news:B79E3526-4685-44FB-8CA1-94B0E4D97F90@.microsoft.com...
>
>
|||Is it true that SQLXMLOLEDB provider supports data export via DTS
Import/Export Wizard?
Best regards
Martin Rakhmanov
"Alan de Wet" wrote:
[vbcol=seagreen]
> Thanks for your reply Chandra. SQLOLEDB does not appear in the list of ole db
> providers when I try to do an export from the Import and Export tool in MSQL
> and am entering the Destination details. I am not trying to do the export
> from a VB application so I do not have a connection string. SQLOLEDB is in
> C:\Program Files\Common Files\System\Ole DB (being Ole DB and not Oledb). How
> do I check if it is registered please?
> Regards,
> Alan
> "Chandra Kalyanaraman [MSFT]" wrote:
|||After I installed sqlxml 2 new Data Providers (SQLXMLOLEDB and
SQLXMLOLEDB.3.0) appear in the list when I select my destination. I have
tried both of them. When I select either one I get a message saying: To
connect click properties and enter the required information. When I click on
properties I do not see sqloledb as a ole db provider but if I select any
other provider, click OK and then click next I get a message saying that
SQLOLEDB must be specified as the data provider. If I select either
sqxmloledb or sqlxmloledb.3.0 as the ole db provider under properties I am
then asked to enter Data Source, Location and Server Log On Information which
does not make sense as I am trying to export to a .xml file.
So to answer your question, maybe it was supposed to but it does not appear
to support data export via DTS Import/Export Wizard.
Best Regards,
Alan de Wet
"jimmers" wrote:
[vbcol=seagreen]
> Is it true that SQLXMLOLEDB provider supports data export via DTS
> Import/Export Wizard?
> Best regards
> Martin Rakhmanov
>
> "Alan de Wet" wrote:

Export/Import SQL EM Registrations?

I have a development laptop I frequently need to reimage (ghost). I have about 25 SQL Servers registered in Enterprise Manager. Some use Windows Auth, some SQL Auth. Can I export the registration information so I don’t have to re-enter it every time
I rebuild my laptop?
I have been able to export/import the server aliases using this key (this works fine): [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer \Client\ConnectTo]
I have also exported/imported: [HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\80\Tools\SQLEW\Registered Servers X]
But All I get are the groups, no servers.
TIA
It is possible. You have to use DMO to save the registered servers to a
file, from the source machine. And then move this file to the target machine
and add the servers on the target machine by looping through the rows in the
file (again you will have to use DMO).
I hope this gives you a starting point. If not, post back and I'll try to
post some code.
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
<hpux9@.nospam.nospam> wrote in message
news:2DFF37FF-E4D3-4FFC-BF8E-5DFA8DA9C482@.microsoft.com...
> I have a development laptop I frequently need to reimage (ghost). I have
about 25 SQL Servers registered in Enterprise Manager. Some use Windows
Auth, some SQL Auth. Can I export the registration information so I don't
have to re-enter it every time I rebuild my laptop?
> I have been able to export/import the server aliases using this key (this
works fine):
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer \Client\ConnectTo]
>
> I have also exported/imported:
[HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered Servers X]
> But All I get are the groups, no servers.
> TIA
>
|||Hi TIA,
From your descriptions, I understood that you would like to export all
registered Server and then import them in a new machine. Have I understood
you? If there is anything I misunderstood, please feel free to let me know
Based on my scope, The method by exporting Register Files is not supported
from SQL7 SP3 as encryption has been put in the process. Furtuantely, we
could do it by creating SQL-DMO
Here are the steps:
1. Create a vbs file and call it readreg.vbs which contains the following.
Please substitute [servername] with SQL Server name and [password] with the
SA password.
It also creates a table RegServers in pubs database so make sure that this
does not exist. This script collects information about the currently
registered servers and stores the information in the RegServers table.
Dim oApplication
Dim oServerGroups
Dim oServerGroup
Dim oRegisteredServer
Dim oNewRegisteredServer
Dim oSQLServer
Dim MsgOutput
set oSQLServer = CreateObject("SQLDMO.SQLServer")
Set oApplication = CreateObject("SQLDMO.Application")
Set oServerGroups = oApplication.ServerGroups
oSQLServer.Connect "servername", "sa", "password"
oSQLServer.ExecuteImmediate "Create table pubs..RegServers(ServerName
varchar(30),
SLogin varchar(30), SPassword varchar(30), IsNtAuth varchar(2))"
For Each oServerGroup in oApplication.ServerGroups
For Each oRegisteredServer in oServerGroup.RegisteredServers
MsgOutput = "Insert Into Pubs..RegServers values("
MsgOutput = MsgOutput + "'" + oRegisteredServer.Name + "', '" +
oRegisteredServer.Login + "', '" + oRegisteredServer.Password + "', '" +
CStr(oRegisteredServer.UseTrustedConnection) + "')"
oSQLServer.ExecuteImmediate MsgOutput
Next
Next
oSQLServer.Disconnect
msgbox "complete"
2. To run, open a command-prompt and run "cscript readreg.vbs".
3. To verify that the information was retrieved correctly, go to the SQL
Server
specified in the script and run the following:
use pubs
select * from RegServers
4. Create another vbs file and call it createreg.vbs which contains the
following:
Again substitute [servername] with SQL Server name and [password] with the
sa
password.
Dim oApplication
Dim oServerGroups
Dim oServerGroup
Dim oRegisteredServer
Dim oNewRegisteredServer
Dim oSQLServer
Dim oQueryResults
Dim MsgOutput
Dim num
Dim SrvNameOutput
Dim LoginOutput
Dim PassOutput
Dim AuthOutput
Dim GetLoginOutput
set oSQLServer = CreateObject("SQLDMO.SQLServer")
Set oApplication = CreateObject("SQLDMO.Application")
Set oServerGroups = oApplication.ServerGroups
oSQLServer.Connect "servername" , "sa", "password"
set oQueryResults = oSQLServer.ExecuteWithResults ("Select ServerName,
SLogin,
SPassword, IsNtAuth from pubs..RegServers")
For num = 1 To oQueryResults.Rows
SrvNameOutput = oQueryResults.GetColumnString(num, 1)
LoginOutput = oQueryResults.GetColumnString(num, 2)
PassOutput = oQueryResults.GetColumnString(num, 3)
AuthOutput = oQueryResults.GetColumnString(num, 4)
If LoginOutput = "" Then
LoginOutput = " "
End if
Set oNewRegisteredServer = CreateObject("SQLDMO.RegisteredServer")
oNewRegisteredServer.Login = LoginOutput
oNewRegisteredServer.Name = SrvNameOutput
oNewRegisteredServer.Password = PassOutput
oNewRegisteredServer.UseTrustedConnection = CLng(AuthOutput)
oServerGroups("SQL Server
Group").RegisteredServers.Add(oNewRegisteredServer )
Next
Msgbox "complete"
5. To run, open a command-prompt and run "cscript createreg.vbs".
NOTE:
a. When doing the tests, please make sure that Enterprise Manager is
closed.
b. The script gathers information about the registered servers for the
currently
logged on user.
c. If you want to test on a single machine, you may do the following:
- run readreg.vbs
- Delete the registration from Enterprise Manager or delete the entries in
the
following registry key:
HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
Server\80\Tools\SQLEW\Registered
Servers X
Please test the method and I strongly recommand you doing this in a
development machine first
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Microsoft Developer Community Support
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
|||Thanks for the scripts. I have changed them to JavaScript and am using XML to do the export/import. Is it possible to get the Server aliases using SQLDMO, or should I just read straight from the registry?
Thanks
-Kevin
""Mingqing Cheng [MSFT]"" wrote:

> Hi TIA,
> From your descriptions, I understood that you would like to export all
> registered Server and then import them in a new machine. Have I understood
> you? If there is anything I misunderstood, please feel free to let me know
> Based on my scope, The method by exporting Register Files is not supported
> from SQL7 SP3 as encryption has been put in the process. Furtuantely, we
> could do it by creating SQL-DMO
> Here are the steps:
> 1. Create a vbs file and call it readreg.vbs which contains the following.
> Please substitute [servername] with SQL Server name and [password] with the
> SA password.
> It also creates a table RegServers in pubs database so make sure that this
> does not exist. This script collects information about the currently
> registered servers and stores the information in the RegServers table.
> Dim oApplication
> Dim oServerGroups
> Dim oServerGroup
> Dim oRegisteredServer
> Dim oNewRegisteredServer
> Dim oSQLServer
> Dim MsgOutput
> set oSQLServer = CreateObject("SQLDMO.SQLServer")
> Set oApplication = CreateObject("SQLDMO.Application")
> Set oServerGroups = oApplication.ServerGroups
> oSQLServer.Connect "servername", "sa", "password"
> oSQLServer.ExecuteImmediate "Create table pubs..RegServers(ServerName
> varchar(30),
> SLogin varchar(30), SPassword varchar(30), IsNtAuth varchar(2))"
> For Each oServerGroup in oApplication.ServerGroups
> For Each oRegisteredServer in oServerGroup.RegisteredServers
> MsgOutput = "Insert Into Pubs..RegServers values("
> MsgOutput = MsgOutput + "'" + oRegisteredServer.Name + "', '" +
> oRegisteredServer.Login + "', '" + oRegisteredServer.Password + "', '" +
> CStr(oRegisteredServer.UseTrustedConnection) + "')"
> oSQLServer.ExecuteImmediate MsgOutput
> Next
> Next
> oSQLServer.Disconnect
> msgbox "complete"
>
> 2. To run, open a command-prompt and run "cscript readreg.vbs".
> 3. To verify that the information was retrieved correctly, go to the SQL
> Server
> specified in the script and run the following:
> use pubs
> select * from RegServers
> 4. Create another vbs file and call it createreg.vbs which contains the
> following:
> Again substitute [servername] with SQL Server name and [password] with the
> sa
> password.
> Dim oApplication
> Dim oServerGroups
> Dim oServerGroup
> Dim oRegisteredServer
> Dim oNewRegisteredServer
> Dim oSQLServer
> Dim oQueryResults
> Dim MsgOutput
> Dim num
> Dim SrvNameOutput
> Dim LoginOutput
> Dim PassOutput
> Dim AuthOutput
> Dim GetLoginOutput
> set oSQLServer = CreateObject("SQLDMO.SQLServer")
> Set oApplication = CreateObject("SQLDMO.Application")
> Set oServerGroups = oApplication.ServerGroups
> oSQLServer.Connect "servername" , "sa", "password"
> set oQueryResults = oSQLServer.ExecuteWithResults ("Select ServerName,
> SLogin,
> SPassword, IsNtAuth from pubs..RegServers")
> For num = 1 To oQueryResults.Rows
> SrvNameOutput = oQueryResults.GetColumnString(num, 1)
> LoginOutput = oQueryResults.GetColumnString(num, 2)
> PassOutput = oQueryResults.GetColumnString(num, 3)
> AuthOutput = oQueryResults.GetColumnString(num, 4)
> If LoginOutput = "" Then
> LoginOutput = " "
> End if
> Set oNewRegisteredServer = CreateObject("SQLDMO.RegisteredServer")
> oNewRegisteredServer.Login = LoginOutput
> oNewRegisteredServer.Name = SrvNameOutput
> oNewRegisteredServer.Password = PassOutput
> oNewRegisteredServer.UseTrustedConnection = CLng(AuthOutput)
> oServerGroups("SQL Server
> Group").RegisteredServers.Add(oNewRegisteredServer )
> Next
> Msgbox "complete"
> 5. To run, open a command-prompt and run "cscript createreg.vbs".
> NOTE:
> a. When doing the tests, please make sure that Enterprise Manager is
> closed.
> b. The script gathers information about the registered servers for the
> currently
> logged on user.
> c. If you want to test on a single machine, you may do the following:
> - run readreg.vbs
> - Delete the registration from Enterprise Manager or delete the entries in
> the
> following registry key:
> HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL
> Server\80\Tools\SQLEW\Registered
> Servers X
> Please test the method and I strongly recommand you doing this in a
> development machine first
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Microsoft Developer Community Support
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
>
>
|||Hi Kevin,
Does the script works fine with you? Based on my scope, I am afraid you
could not find Server Aliases by means of SQLDMO. I think reading directly
from Registry is fine.
BTW, It is highly appreciated if you could share us with your JavaScript
and XML files among Newsgroup Community. In this way, I believe, provided
multi ways for those who may encounter the same issue. Thanks in advance.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Microsoft Developer Community Support
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
|||Thanks for your help! The scripts below are a hack, but they work fine for me.
These scripts can be used to dump/load SQL registration information so you don’t have to enter/re-enter it by hand (quite handy after you re-image your development workstation).
Dump_SQL_Reg.js
===============
Run from the command line to dump all SQL registration for the current machine and user to an XML file.
cscript /nologo Dump_SQL_Reg.js > servers.xml
NOTE: If there are any SQL servers using SQL auth, the passwords will be in clear text in the XML file.
Load_SQL_Reg.js
===============
Run from the command line to load SQL registrations from servers.xml (in same dir) for the currently logged in user.
cscript /nologo Load_SQL_Reg.js > load.log
Yes you can edit the servers.xml by hand and just use the loader script.
I whipped these up in a hurry, so I would not be surprised if there are some things it can’t deal with.
If you have any questions, let me know.
Sample of the XML file
======================
<?xml version='1.0' standalone='yes' ?>
<registrations>
<aliaslist>
<alias name='App1PRD_DB' data='DBMSSOCN,PRDDB01,1433'/>
<alias name='App2PRD_DB' data='DBMSSOCN, ,PRDDB01,1433'/>
<alias name='App1DEV_DB' data='DBMSSOCN,DEVDB01,1433'/>
<alias name='App2DEV_DB' data='DBMSSOCN, ,DEVDB01,1433'/>
</aliaslist>
<group name='App1'>
<reg server='App1_PRD_DB' login='' password='' trustedyn='1'/>
<reg server='App1_DEV_DB' login='' password='' trustedyn='1'/>
</group>
<group name='App2'>
<reg server=App2PRD_DB' login='XXXX' password='XXXX' trustedyn='0'/>
<reg server='App2DEV_DB' login='XXXX' password='XXXX' trustedyn='0'/>
</group>
</registrations>
//*************************************************//
// Dump_SQL_Reg.js
var oApplication = new ActiveXObject ("SQLDMO.Application");
var oServerGroups = oApplication.ServerGroups
var reReplaceXMLChars = new RegExp ("<|>|&|'","g");
var serverGroupEnum = new Enumerator(oServerGroups);
var xml = "<?xml version='1.0' standalone='yes' ?>\n<registrations>\n";
// Grab the alias list (if any)
var aliaslist = getSQLAliasXML();
xml += aliaslist;
for (;!serverGroupEnum.atEnd();serverGroupEnum.moveNex t())
{
oServerGroup = serverGroupEnum.item();
xml += " <group name='" + oServerGroup.Name.replace(reReplaceXMLChars, XMLEncode) +"'>\n";
registeredServerEnum = new Enumerator(oServerGroup.RegisteredServers);
for (;!registeredServerEnum.atEnd();registeredServerEn um.moveNext())
{
oRegisteredServer = registeredServerEnum.item();
xml += " <reg server='" + oRegisteredServer.Name.replace(reReplaceXMLChars, XMLEncode) + "' ";
xml += "login='" + oRegisteredServer.Login.replace(reReplaceXMLChars, XMLEncode) + "' ";
xml += "password='" + oRegisteredServer.Password.replace(reReplaceXMLCha rs, XMLEncode) + "' ";
xml += "trustedyn='" + oRegisteredServer.UseTrustedConnection + "'/>\n";
}
xml +=" </group>\n";
}
xml += "</registrations>";
WScript.Echo (xml);
/*
|| returns the alias on the current machine in an XML fragment
|| <aliaslist>
|| <alias name="my server alias" data="DBMSSOCN,xxxxxx,1433"/>
|| </aliaslist>
*/
function getSQLAliasXML()
{
var XMLFrag = ""
var hive = "HKLM";
var key = "SOFTWARE\\Microsoft\\MSSQLServer\\Client\\Connect To";
aAliasValues = HKLM_EnumValue(key);
if (aAliasValues != null)
{
var WshShell = WScript.CreateObject ("WScript.Shell");
var buffer = "";
XMLFrag += " <aliaslist>\n";
for (var x=0; x < aAliasValues.length; x++)
{
buffer = WshShell.RegRead (hive + "\\" + key + "\\" + aAliasValues[x]);
XMLFrag += " <alias name='" + aAliasValues[x] + "' data='" + buffer + "'/>\n";
}
XMLFrag += " </aliaslist>\n";
}
return (XMLFrag);
}
/*
|| Pass path to registry Key in HKLM
|| Returns an array with the values in the key
|| null if key is not found
||
*/
function HKLM_EnumValue (regPath)
{
HKLM = 0x80000002;
sRegPath = regPath;
try
{
oLoc = new ActiveXObject("WbemScripting.SWbemLocator");
oSvc = oLoc.ConnectServer(null, "root\\default");
oReg = oSvc.Get("StdRegProv");
oMethod = oReg.Methods_.Item("EnumValues");
oInParam = oMethod.InParameters.SpawnInstance_();
oInParam.hDefKey = HKLM;
oInParam.sSubKeyName = sRegPath;
oOutParam = oReg.ExecMethod_(oMethod.Name, oInParam);
if (oOutParam.sNames != null)
return (oOutParam.sNames.toArray());
else
return (null);
}
catch(err)
{
WScript.Echo("Error occurred\nCode: " + hex(err.number) +"; Description: " + err.description);
}
}
//User-defined function to format error codes.
//VBScript has a Hex() function but JScript does not.
function hex(nmb)
{
if (nmb > 0)
return nmb.toString(16);
else
return (nmb + 0x100000000).toString(16);
}
// Strip out special chars
function XMLEncode(str)
{
return (
(str == "<") ? "<" :
(str == ">") ? ">" :
(str == "&") ? "&" :
(str == "'") ? "'" :
(str == "\"") ? """ : str
);
}
//*************************************************//
//*************************************************//
// Load_SQL_Reg.js
// open the xml file
var fname = "servers.xml";
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load(fname);
if (xmlDoc.parseError.errorCode != 0)
{
var myErr = xmlDoc.parseError;
WScript.Echo("You have error " + myErr.reason);
}
else
{
// process each alias
var objNodeList = xmlDoc.getElementsByTagName("alias");
for (var i=0; i < objNodeList.length; i++)
{
var alias = objNodeList.item(i).getAttribute("name");
var data = objNodeList.item(i).getAttribute("data");
addAlias (alias, data);
}
var oApplication = new ActiveXObject("SQLDMO.Application");
var oServerGroups = oApplication.ServerGroups;
var oRegisteredServers = oApplication.RegisteredServers;
var objNodeList = xmlDoc.getElementsByTagName("reg");
for (var i=0; i < objNodeList.length; i++)
{
// Test the group
var group = objNodeList.item(i).parentNode.getAttribute("name" );
try
{
// does the group already exist?
var oServerGroup = oServerGroups(group);
}
catch (e)
{
// add it
WScript.Echo("Adding group: " + group);
var oGroup = new ActiveXObject("SQLDMO.ServerGroup");
oGroup.Name = group;
oServerGroups.Add(oGroup);
}
// Test the server
server = objNodeList.item(i).getAttribute("server");
try
{// Does the server already exist in this group?
var oRegisteredServer = oServerGroups(group).RegisteredServers(server);
// If so delete it!
WScript.Echo ("Removing Server: " + server);
oServerGroups(group).RegisteredServers.Remove(serv er);
}
catch (e)
{
// does not exist, do nothing
}
try
{
// NOTE: this will fail if server is already registered in a different group
WScript.Echo ("Adding Server: " + server);
var oNewServer = new ActiveXObject("SQLDMO.RegisteredServer");
oNewServer.Name = server;
oNewServer.Login = objNodeList.item(i).getAttribute("login").replace( /^$/, " ");
oNewServer.Password = objNodeList.item(i).getAttribute("password");
oNewServer.UseTrustedConnection = parseInt (objNodeList.item(i).getAttribute("trustedyn"));
oServerGroups(group).RegisteredServers.Add(oNewSer ver);
}
catch (e)
{
// print error and continue
WScript.Echo ("***Error**: " + e.description);
}
}
}
function addAlias(alias, data)
{
var regKey = "HKLM\\SOFTWARE\\Microsoft\\MSSQLServer\\Client\\C onnectTo\\" + alias ;
// see if the key exists
var WshShell = WScript.CreateObject ("WScript.Shell");
try
{
var found = WshShell.RegRead (regKey);
}
catch (e)
{
//do nothing
}
if (found != null)
{
// delete the key before re-add
WshShell.RegDelete (regKey);
}
// add the key
WScript.Echo ("Adding alias for : " + regKey);
WshShell.RegWrite (regKey, data, "REG_SZ");
}
//*************************************************//
""Mingqing Cheng [MSFT]"" wrote:

> Hi Kevin,
> Does the script works fine with you? Based on my scope, I am afraid you
> could not find Server Aliases by means of SQLDMO. I think reading directly
> from Registry is fine.
> BTW, It is highly appreciated if you could share us with your JavaScript
> and XML files among Newsgroup Community. In this way, I believe, provided
> multi ways for those who may encounter the same issue. Thanks in advance.
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
>
> Sincerely yours,
> Mingqing Cheng
> Microsoft Developer Community Support
> Introduction to Yukon! - http://www.microsoft.com/sql/yukon
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
>

export/import registered server list to/from enterprise manager.

how can I export the list of servers I've registered in my enterprise manager
and import it back on other computer's EM? TIA.
Adi ..
I posted a reply in the .server group. Please do not multipost.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"adi" <adi@.discussions.microsoft.com> wrote in message
news:E649596F-2163-4726-99AB-6270F6550EBB@.microsoft.com...
how can I export the list of servers I've registered in my enterprise
manager
and import it back on other computer's EM? TIA.
Adi ..
sql

export/import registered server list from/to EM

how can I export the list of servers I've registered in my enterprise manager
and import it back on other computer's EM? TIA.
Adi ..
See if this helps:
http://groups-beta.google.com/group/...3f7828bb?hl=en
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"adi" <adi@.discussions.microsoft.com> wrote in message
news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
how can I export the list of servers I've registered in my enterprise
manager
and import it back on other computer's EM? TIA.
Adi ..
|||Thanks Vyas,
That was helpful. That script imported all servers under default "SQL Server
Group", but it was better than nothing.
"Narayana Vyas Kondreddi" wrote:

> See if this helps:
> http://groups-beta.google.com/group/...3f7828bb?hl=en
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "adi" <adi@.discussions.microsoft.com> wrote in message
> news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
> how can I export the list of servers I've registered in my enterprise
> manager
> and import it back on other computer's EM? TIA.
> Adi ..
>
>

Monday, March 19, 2012

export/import registered server list from/to EM

how can I export the list of servers I've registered in my enterprise manager
and import it back on other computer's EM? TIA.
Adi ..See if this helps:
http://groups-beta.google.com/group/microsoft.public.sqlserver.tools/msg/53d641423f7828bb?hl=en
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"adi" <adi@.discussions.microsoft.com> wrote in message
news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
how can I export the list of servers I've registered in my enterprise
manager
and import it back on other computer's EM? TIA.
Adi ..|||Thanks Vyas,
That was helpful. That script imported all servers under default "SQL Server
Group", but it was better than nothing.
"Narayana Vyas Kondreddi" wrote:
> See if this helps:
> http://groups-beta.google.com/group/microsoft.public.sqlserver.tools/msg/53d641423f7828bb?hl=en
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "adi" <adi@.discussions.microsoft.com> wrote in message
> news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
> how can I export the list of servers I've registered in my enterprise
> manager
> and import it back on other computer's EM? TIA.
> Adi ..
>
>

export/import registered server list from/to EM

how can I export the list of servers I've registered in my enterprise manage
r
and import it back on other computer's EM? TIA.
Adi ..See if this helps:
f7828bb?hl=en" target="_blank">http://groups-beta.google.com/group...
f7828bb?hl=en
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"adi" <adi@.discussions.microsoft.com> wrote in message
news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
how can I export the list of servers I've registered in my enterprise
manager
and import it back on other computer's EM? TIA.
Adi ..|||Thanks Vyas,
That was helpful. That script imported all servers under default "SQL Server
Group", but it was better than nothing.
"Narayana Vyas Kondreddi" wrote:

> See if this helps:
> 23f7828bb?hl=en" target="_blank">http://groups-beta.google.com/group...23f7828bb?hl=en
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "adi" <adi@.discussions.microsoft.com> wrote in message
> news:40E5E439-F0F8-425E-B7A5-41D72A08E070@.microsoft.com...
> how can I export the list of servers I've registered in my enterprise
> manager
> and import it back on other computer's EM? TIA.
> Adi ..
>
>

Export/import Maintance Tasks

Hello,

is there any way to export/import maintance tasks from one SQL Server to another ?

We have two SQL Server with same DB. Every day launch a couple of maintance tasks for DB to stay in good state. It will be very helpful to make possible to export/import maintance tasks. I see that maintance tasks are SSIS packages stores in SQL Server. But don't know how to export it.

Any suggestion ?

Thanks

Anton Kalcik

Open SQL Server Management Studio
Select File and then Connect Object Explorer
Change the Server Type to Integration Services, connect to the server
Expand to Servername (Integration Services) | Stored Packages | MSDB | Maintenance Plans
Right click the desired Maintenance Plan and select Export

|||Thanks

Export/import Maintance Tasks

Hello,

is there any way to export/import maintance tasks from one SQL Server to another ?

We have two SQL Server with same DB. Every day launch a couple of maintance tasks for DB to stay in good state. It will be very helpful to make possible to export/import maintance tasks. I see that maintance tasks are SSIS packages stores in SQL Server. But don't know how to export it.

Any suggestion ?

Thanks

Anton Kalcik

Open SQL Server Management Studio
Select File and then Connect Object Explorer
Change the Server Type to Integration Services, connect to the server
Expand to Servername (Integration Services) | Stored Packages | MSDB | Maintenance Plans
Right click the desired Maintenance Plan and select Export

|||Thanks