List Of Databases From Multiple Servers Without SMO

Nov 14, 2007



Is it possible to get an aggregate list of databases from multiple servers, without using SMO?

All target servers are running SQL Server 2005.

Ben Aminnia

View 2 Replies


ADVERTISEMENT

Creating A Database From Multiple Databases Accross Multiple Servers

Sep 13, 2007

Hi,

I'm trying to create a database that takes specific information from a number of databases on different servers to make some reporting that we have much easier.

I'm pretty new to SQL so I'm not sure of the best way to proceed. I read an article that suggested I use the OPENROWSET command. The problem is, the version of SQL that came with one of the programmes we use is limited and will not allow you to turn on the allow "Ad Hoc distributed Queries" so the SLQ statement will not execute.

I'm confused why it won't let me to connect through ODBC as I've created a web page that selects data from this database with no problems!

Here is the SQL statement that I've written to make sure it is the correct one (on the msdn library page it said that this was the ODBC connection):

SELECT a.*
FROM OPENROWSET('MSDASQL','DRIVER=(SQL Server);SERVER=APPOLOACT7;UID=sa;PWD=***************',
'SELECT * FROM MDCTestAndDev.dbo.TBL_CONTACT') AS a



I've also created the ODBC connection using the tool on Administration Tools>Data Sources ODBC

Any help would be greatly appreciated (also any ways of selecting from one database and inserting it into another will be helpfull)

Thanks

View 8 Replies View Related

Setting Up SQL Server Encryption Between Multiple Servers And Databases

Feb 23, 2007

Greetings.

I have a setup/deployment question regarding SQL Server Encryption.

Internal database encrypts data in 3 different tables. This could execute on any one of 6 different servers.
The tables with encrypted data are replicated to another database on different servers (3)

How should the keys/certificates be created so that the data in the replicated database can be decrypted?

In my test scenario so far, I have been unable to have the second database decrypt the data that was encrypted on the first database (currently on the same server).

-- Create Database Master Key
CREATE MASTER KEY ENCRYPTION BY
PASSWORD = 'p@ssw0rd'
GO

-- Create Certificate
CREATE CERTIFICATE MyCertificate
WITH SUBJECT = 'My Data Encryption Certificate',
EXPIRY_DATE = '10/31/2010';
GO

CREATE SYMMETRIC KEY MyKey
WITH
ALGORITHM = AES_256,
IDENTITY_VALUE = 'My Symmetric Key',
KEY_SOURCE = 'Unique phrase that will be used to secure the key'
ENCRYPTION BY CERTIFICATE MyCertificate;
GO

View 3 Replies View Related

Transact SQL :: Looping Through Multiple Servers And Databases In Stored Procedure

Aug 27, 2015

I am doing some administrative tasks and need to collect some principals information from multiple instances and user databases.

I have table "dbo.instances" with list of instances. 
I have databases from "sys.databases". 

How can I execute the query to get principals information from "sys.database_principals" on each remote instance and database. I know that can use cursor, but not sure how to do this with multiple servers and databases.

View 3 Replies View Related

Report Designer: Need To List Fields From Multiple Result Rows As Comma Seperated List (like A JOIN On Parameters)

Apr 9, 2008



I know I can do a JOIN(parameter, "some seperator") and it will build me a list/string of all the values in the multiselect parameter.

However, I want to do the same thing with all the occurances of a field in my result set (each row being an occurance).

For example say I have a form that is being printed which will pull in all the medications a patient is currently listed as having perscriptions for. I want to return all those values (say 8) and display them on a single line (or wrap onto additional lines as needed).

Something like:
List of current perscriptions: Allegra, Allegra-D, Clariton, Nasalcort, Sudafed, Zantac


How can I accomplish this?

I was playing with the list box, but that only lets me repeat on a new line, I couldn't find any way to get it to repeate side by side (repeat left to right instead of top to bottom). I played with the orientation options, but that really just lets me adjust how multiple columns are displayed as best I can tell.

Could a custom function of some sort be written to take all the values and spit them out one by one into a comma seperated string?

View 21 Replies View Related

LIST SERVERS

Jun 5, 2001

Where is the List Servers option? Can anyone points me the link.

TIA

Jagan

View 1 Replies View Related

Can't Get List Of Servers

Jun 11, 2007

I can't get my server to show with the DMO function ListAvailableSQLServers or with the osql -L flag. The OS is windows 2000, but the drive is fat32 and doesn't have Directory Service.
Do you need NTFS to have Directory Service, and does SQL Server need Directory Service to broadcast its available servers?
I've got Visual Studio .Net and had no luck when I searched for an answer.

View 5 Replies View Related

List Of Servers

May 22, 2008

Hi,

How can i fetch the list of SQL Servers available along with their status like whether it is active or inactive?

View 5 Replies View Related

Linking Tables From Different Databases Or Querying From Multiple Databases

Dec 10, 2007

Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query. 
 

View 3 Replies View Related

How To Get List Of All Sql Servers On Network

Oct 7, 2002

Hi,
Is there any function/API in vb to retrieve all the sql servers that are avaiable on a network? Basically, i wanted to implement this facility in my application where users can select a server from list of all avaiable servers on LAN.

Thanks!
Asif

View 6 Replies View Related

How Is Available Servers List Populated

Feb 15, 2005

When registering a new SQL Server in EM using the wizard a window appears that is supposed to list available SQL Servers, however it does not.

So, my question is:

How is this list derived? and how can the list be managed?

View 4 Replies View Related

Can Not See Any Server In The Available Servers List

May 26, 2007

I successfully installed SQL Server 2005 Express edition in my pc. I ran Visual Basic 6 and used and Ado object to build a connection string to access the server but, I could not see any server in the comobox list.

I always get connection failure messages say that the server does not exitst!!!



Any help please.



Thanks

View 1 Replies View Related

Getting List Of Indexes Accross Servers

Mar 30, 2000

Is there anyway that I can run a procedure that will give me all the indexes on tables that are accross multiple servers?

Thanks for any help.

Dianne

View 2 Replies View Related

How To Get The List Of All Active SQL Servers On The Network Using VB ?

Apr 22, 1999

Hi all,

Does any of you know, how to get the list of all Active SQL Servers on the Network using VB ?

regards,

Anand

View 1 Replies View Related

Get List Of Servers In Sql Server 2000

Apr 14, 2007



Hi



I have 4 Servers registered in my system in SQL SERVER 2000.

How to get those list of servers.



View 5 Replies View Related

Easiest Way To List All Data Sources Servers?

Dec 1, 2007

SQL Server RS 2000 SP4

I'm trying to find the easiest way to get a list of every data source on a RS instance, including the name of the SQL Server that the data source points to. We want to make sure none of the data sources point at our primary OLTP server.

I looked at the DataSource table in the ReportServer DB, but of course the connection string info is encrypted. I'm hoping that I don't need to resort to writing .net code to hit the web service.

TIA,

-Peter

View 3 Replies View Related

Connect 2 Databases On 2 Servers ???

Sep 4, 2007

 Hi, If you have  2 databases with the exact same table columns, and in the first database in a table column the indentidy seed starts at 1 and finishes at 32,000 can you attatch a second database so that the indentity starts at 32,001and carries on. What happens if you create a site and run out of disk space and need to attach another database which is located on another server??? I am really confused about this.Hope someone can give some links to some articles about this as I can't find any information about it.How can this be done? Thanks 

View 1 Replies View Related

Databases In Remote Servers

May 12, 2006

Hello,This is my first post, and i am looking for help about Databases in remote servers.This is my problem:1) I have a free account in "HostBasket", with 50 mb of space, and 10 mb of SQL Server... with ASP.NET 2 support --> http://www.hostbasket.com/dotnet2.shtml?LinkFrom=100602) They gave me this info for the database:Your SQL Server: sql15.hostbasket.comYour database name: myDatabaseNameYour login for the database: myLoginYour password for the database: myPasswordConnection string for ASP.NET (using ADO.NET with System.Data.SqlClient namespace):Persist Security Info=True;User ID=myLogin;Password=myPassword;Initial Catalog=MyDatabaseName;Data Source=sql15.hostbasket.com 3) Actually, i don't know what to do with that info... I mean, i have read so much info, and all people saying "their way" to do things... oh, I am so confused...4) I read in a website, this: "the database can be uploaded as a FILE saved in the App_Data folder, under the .mdf extension"I read that from : http://dotnetjunkies.com/QuickStartv20/aspnet/doc/data/vwd.aspx5) In the url given above, there is a "step by step" example... i follow it, exactly (i start a asp.net website, i create the database and the table, i show the data with the grids, etc )6) All is OK until here, i mean, when i run the website with VWD, it shows me the info OK.7) But... ¿How can i do this works on the Remote Server i described in 1) and 2) ?I know how to upload my website, in fact i uploaded a very basic one, and all was OK, but when i work with databases starts my problem...So, i am almost sure, that i have an error in the "Conecction String"... connectionString="Data Source=.SQLExpress;AttachDbFilename=|DataDirectory|MiBaseDeDatos.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" ¿How should it be, to work with my free remote server?or,if you have done the "easy way" of uploading the .MDF file in the server (but a server different of mine) please, tell me the "how to..." (and the server you used :p )--------------------Ok guys, i am a Chilean young (i dont speak english very well) and i tried to write my ideas in an easy way, so I REALLY HOPE you can help me.I am a New (very new) on this (vwd , .net , asp.net ) in fact, i am using this just 3 days ago...THANK YOU SO MUCH,Carlos,La Serena, Chile.

View 7 Replies View Related

Transferring Databases Between Servers

Feb 15, 2002

I need some advice on copying databases, stored procedures, views, logins ..etc from a SQL Serevr 7.0 server, to a new SQL Server 2000 server.
Is it better to backup the databases on one server and then restore them to the other. Or id it easier to use the Wizards to Import everything from new server, or to Export everything from the old server ?

Any advice would be appreciated. I need to ensure that I do not miss anything, in particular Stored Procedures in the old master database.

View 2 Replies View Related

Documenting SQL Servers/databases

Mar 27, 2001

I'm fairly new to a DBA role, I've been tasked with documenting all the SQL servers/databases. Is there anywhere on the Web where I could find a standard list of what needs to be documented. Any help/advice would be appreciated.

View 1 Replies View Related

Transferring Databases Between Servers

Jan 11, 2000

I tried using Import/Export to transfer a database from one SQL Server box to another using NT authentication.

The database appeared to transfer OK, however the process crashed with an error suggesting that a SQL Server login was not present.

How are the SQL Server logins transferred ?

Richard

View 2 Replies View Related

How To Connect Two Databases On Two Servers

Aug 23, 2013

We are wanting to know how to connect 2 databases residing on 2SQL servers. The workstation has access to both databases. Join on Cols 1 and 2.

Server1, Database1, Table1, Column1 (Char)
Server2, Database2, Table2, Column2 (VarChar)

View 2 Replies View Related

Compare Databases Between 2 SQL Servers

May 17, 2006

Hello,I wish to see if the tables from database A server A1 exist in databaseA on server B1.I setup a linked server from my first server (robertcamarda) to atarget (cognos-dev)This works from robertcamarda:select count(*) from [cognos-dev].ds_v6_source.dbo.stdmasand this works:select * from ds_v6_source.information_schema.tables order bytable_namebut this wont work:select * from [cognos-dev].ds_v6_source.information_schema.tables orderby table_nameError:Msg 117, Level 15, State 1, Line 1The object name 'cognos-dev.ds_v6_source.dbo.information_schema.tables'contains more than the maximum number of prefixes. The maximum is 3.I want to do something like:select * from ds_v6_source.information_schema.tableswhere table_name not in (select table_name from[cognos-dev].ds_v6_source.information_schema.tables order bytable_name)so I can see of the sql server (robertcamarda) has any missing tablesthat exist on the server (cognos-dev)TIARobSQL Server 2005 Enterprise

View 3 Replies View Related

2 Databases On 2 Servers, 1 Query?

Jan 25, 2008

Hello,

We have adedicated MS-SQL Server for our CRM database and we have another MS-SQL database server for in house applications, written in c#.Net 2.0. To avoid duplicating information already in our CRM database, it would be nice if we could build a query that combined columns from both data sources.Example





Code Snippet

CRM database on Server1
Table Accounts


Columns
AccountID UniqueIdentifier Primary Key

Name NvarChar(50)



Application Database on Server2
Table Transaction


Columns

TransactionID UniqueIdentifier Primary Key

AccountID UniqueIdentifier
Amount Money




Would it be possible to create a T-SQL statement that will select




Code Snippet

Select
Server1.CRM.Accounts.Name,
Server2.Application.Transaction.TransactionID,
Server2.Application.Transaction.AccountID,
Server2.Application.Transaction.Amount



From Server1.CRM.Accounts INNER JOIN Server2.Application.Transaction




ON (Server1.CRM.Accounts.AccountID = Server2.CRM.Transaction.AccountID)


I appreciate there will need to be 2 connections and therefore some credential information would need to be passed too.


Is anything like this possible? I do not wish to copy the Name field from Server1.CRM.Accounts to Server2..Application.Transaction as this is duplication and any change to the value of Server1.CRM.Accounts.Name would not be reflected in the results.


Many thanks for any information provided.

View 3 Replies View Related

How To Run A JOIN Between Databases On Two SQL Servers

Feb 23, 2008





Code Snippet
SELECT ReciptItems.acc_TopicCode, ReciptItems.acc_DetailCode, ReciptItems.acc_CTopicCode,
SUM(ReciptItems.TotalInputPrice + ReciptItems.TotalOutputPrice), a.MoeenName_L1
FROM ReciptItems LEFT OUTER JOIN
Acc_mydbname.dbo.Categories AS a ON ReciptItems.acc_TopicCode = a.TopicCode
GROUP BY ReciptItems.acc_TopicCode, ReciptItems.acc_DetailCode, ReciptItems.acc_CTopicCode, a.MoeenName_L1





How Replace Acc_mydbname with (SELECT AccountDBName FROM Config)

(SELECT AccountDBName FROM Config) ='Acc_mydbname_2008.dbo.'

View 6 Replies View Related

Synchronize 2 Databases On Different Servers

Apr 10, 2006

Hi,

I was wondering if the following is possible: I have 2 SQL Express servers on different machines. One holds the production and one the development database. On a request basis I'd like mirror all the data of the production database to the development database. Right now I have to stop the sql engine, zip the mdf, send it over, attach it to database, etc. and that's quite cumbersome. So, is there an easier way to do this? If not with SQL Express, is it possible with the full version?

Thanks,

Tom

View 1 Replies View Related

Exchange Data Between Databases On Two Servers??

May 29, 2007

Dear all
 
I have tow server on the same intranet. One server has a sql server 2000 database and the other one has SQL server 2005 databse.
 The sql 2000 database has a table called employee. When ever a new employee is inserted in the database i would like the same values to be sent to the sql 2005 database. But this cant be done on the application level. It has to be done in the database. The application level can not be changed.
I was thinking a trigger but how to achieve the writing from one database to another. If they were on the same server then it would be easier but because they are on different servers i dont know how to do it.
 Has anyone had similar issue before?
Any help is apreciated.
 
Sincerely
Dan

View 2 Replies View Related

Specify Two Different Servers/databases For SQL Report Viewer

Apr 25, 2008

I'm working with the SQL Report Viewer in VS2k5. In the Data tab, where the Dataset drop down list is, I click the "..." to edit the dataset. I am currently using the following for the datasource...
   Data Source=ServerName;Initial Catalog=DatabaseName
In one database, I store an employee ID number. I need to access a different database on a different server to reference the employee ID and pull the employee's name. Is there a way to specify two different databases on two different servers in the connection string above?
Thanks!

View 1 Replies View Related

Select Data From Two Databases On Different Servers

Oct 27, 1999

Hi there,
I was just wondering is it possible to select data from two different databases on two different servers?

ie Select * from
Server1.databasename..table, Server2.databasename..table


If anyone has any suggestions they would be appreciated,
Thanks,
Fin

View 2 Replies View Related

Tool For Syncronization Databases On 2 Servers

Aug 15, 2005

Hello, I need a tool for management ms sql: compare list of databases on 2 servers (not structure and/or data of 2 databases), copy from one server to second new databases, delete from the second server ... Not to propose Copy Wizard.
Thanks

View 4 Replies View Related

One SQL Statement To Access Databases On Different Servers

Dec 8, 2004

I know the SQL syntax to join two tables in different databases on the ame server, but does anyone know if a SQL statement will allow you to join tables from different databases on different servers?

View 8 Replies View Related

SSIS - How To Run A JOIN Between Databases On Two SQL Servers?

Jan 17, 2006

Hi All,

I need to run an Insert query which pulls data from a table located on server A database AA Table AAA conditional on (or JOINED with) Table BBB in database BB sever B. In SQL 2000 I would simply do the following:

From Server A:

sp_addlinkedserver B

INSERT dbo.ResultsTable

SELECT SourceTable.* FROM B.BB.dbo.BBB SourceTable

INNER JOIN A.AA.dbo.AAA ConditionTable ON SourceTable.RecID = ConditionTable.RecID

sp_dropserver B



What do I need to do to perform the same operation in SSIS world?

Thank you !

View 1 Replies View Related

Restoring Encrypted Databases Between Different Servers

Jun 20, 2007

Hello:

I'm working with two sql servers instances, ServerA and ServerB, which run under two different service accounts on different machines. They both have a database, DatabaseA, that has some encrypted fields.

If I take a backup of DatabaseA on ServerA and restore it on ServerB, I need to re-encrypt the Database Master Key (DMK) with the Service Master Key (SMK) as follows:

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'pwd used to encrypt DMK'
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY

However, if I again take a backup on ServerB and then restore it on ServerA, I can use the DMK on ServerA without re-encrypting it with the SMK.

Shouldn't I have to re-encrypt the DMK with the SMK everytime I restore from a backup that was generated from a different server?

Thanks,
Cyndi







View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved