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


ADVERTISEMENT

Joins Accross Servers And Time Outs

Nov 28, 2006

First thanks for your time.

We have 4 clustered SQL2000 Servers each contains information specific to its application related to customer information in a casino player tracking database. My problem is as follows On the Playertracking database I can join and return information from the tables there with no problems the performance accross the decently sizable transactional based table is pretty decent. The problem is I need to filter this query down by the Type of machine the customer plays. The child key exists in the playertransaction table the parent key is on another server. Here is the lay out of the tables unecessary information from the tables were truncated for brevity.

CREATE TABLE [dbo].[PlayerSession] (
[PlayerId] [int] NOT NULL ,
[Mnum] [int] NOT NULL ,
[CoinIn] [money] NOT NULL ,
[CoinOut] [money] NOT NULL ,
[Games] [int] NOT NULL ,
[Jackpot] [money] NULL ,
[Win] [money] NULL ,
[TheoWin] [money] NOT NULL ,
[PlayerMod] [tinyint] NOT NULL
) ON [PRIMARY]

-- Player Demographics information
CREATE TABLE [dbo].[Player] (
[PlayerId] [int] NOT NULL ,
[Status] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[Title] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FirstName] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[MiddleName] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[LastName] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[SSN] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
) ON [PRIMARY]

--Machine Information that links to Machine Type table

CREATE TABLE [dbo].[Machine] (
[MNum] [int] NOT NULL ,
[MachineTypeId] [smallint] NOT NULL ,
) ON [PRIMARY]

-- Machine type code table

CREATE TABLE [dbo].[MachineType] (
[MachineTypeId] [smallint] NOT NULL ,
[Denom] [int] NOT NULL ,
[Par] [decimal](6, 2) NOT NULL ,
[GameType] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
) ON [PRIMARY]

From the server where all the player information is ran I can query the linked database for the machine and machine type information like this.

SELECT m.MNum, mt.MachineTypeId, mt.GameType, mt.DisplayType
FROM ACCTV.Accounting.dbo.Machine m INNER JOIN
ACCTV.Accounting.dbo.MachineType mt ON m.MachineTypeId = mt.MachineTypeId

This is the information I am trying to get out but the query times out on me.

SELECT Player.PlayerId, Player.FirstName, Player.LastName, SUM(PlayerSession.CoinIn) AS sumCI, SUM(PlayerSession.CoinOut) AS SumCO,SUM(PlayerSession.TheoWin) AS SumTheo, AVG(PlayerSession.TheoWin) AS AvgTheo, SUM(PlayerSession.Win) AS SumWin, AVG(PlayerSession.Win) AS AvgWin, mt.GameType
FROM Player INNER JOIN
PlayerSession ON Player.PlayerId = PlayerSession.PlayerId INNER JOIN
ACCT.Accounting.dbo.Machine M ON PlayerSession.Mnum = M.MNum INNER JOIN
ACCT.Accounting.dbo.MachineType mt ON M.MachineTypeId = mt.MachineTypeId
GROUP BY Player.PlayerId, Player.FirstName, Player.LastName, mt.GameType

The other option would be some sort of SubQuery but I dont know how to return results from the subqueries to the root query to be returned to the restulting recordset. I am not necessarily looking for an answer more of looking for a direction to go to find my solution.

Thanks again for your help.

View 1 Replies View Related

Table Snapshots Accross Multiple Servers

Apr 20, 2007

Hi,


Is there a way to take a snapshot of a table at precisely the same time on multiple servers and write the table snapshot to another 'work' database? I'm asking in this forum hoping that perhaps SSIS has a built in tool to help with this. I'm wanting to audit table(s) accross seven different servers. In order to do this I want to make sure that I have the table at the same moment in time on all the servers. I plan on using the tablediff utility to then compare each table on each server against one another. If somebody knows a better method to do this please let me know.





Thanks,

Phil

View 1 Replies View Related

Data Synchronization Accross Multiple Servers Running Replication

Apr 19, 2007

Hello,



We have an environment with 7 servers that are running replication with one another and I'm wondering if there are any tools or experiences that any of you might have that may assist in the auditing of these servers. The data should be in synch accross the boards for all tables, but sometimes problems can arise such as replication not being set up properly, stored procedure's being out of synch, or data gliches etc.



In dealing with these issues we have an in-house written program which analises each table on each server and takes a snapshot and does column by column compare. We also have another program that will synch the data up (basically a delete/insert statement on the publisher). This process can take up to 3 weeks for our quarterly update of every table. I'm wondering if anybody has used any tools such as in SSIS or a third party tool and has done or is doing something similar to what we are doing now. If so, are there any tips you wouldn't mind sharing on how our process might be sped up?





Thanks,

Phil

View 4 Replies View Related

Removal Of Selected Indexes / Script Index Create For List Of Indexes

Jul 1, 2014

I'm working to improve performance on a database I've inherited, and there are several thousand indexes. I've got a list of ones which should definitely exist within the database, and I'm looking to strip out all the others and start fresh, though this list is still quite large (1000 or so).

Is there a way I can remove all the indexes that are not in my list without too much trouble? I.e. without having to manually go through them all individually. The list is currently in a csv file.

I'm looking to either automate the removal of indexes not in the list, or possibly to generate the Create statements for the indexes on the list and simply remove all indexes and then run these statements.

As an aside, when trying to list all indexes in the database, I've found various scripts to do this, but found they all seem to produce differing results. What is the best script to list all indexes?

View 5 Replies View Related

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

List Of Keys, Indexes

Oct 29, 2005

Hello,
 
I am new in SQL Server, I have to deal with this big database with many tables, is there any way I can get a list of all primary keys , foreign keys and indexes and on all tables?
 
Thanks,

View 1 Replies View Related

Query To List All Indexes In Db

Oct 17, 2007

Can someone help me with Query to list all indexes (name, table, field etc.) on a particular user/dbo database in sqlserver.

Thanks

View 3 Replies View Related

Fastest Way To Copy Tables And Their Indexes Between Servers?

Nov 13, 2006

The DTS Task Copy Server Objects is PAINFULLY slow.

The Copy Table Wizard is fast but generates an unmanagable DTS and does not bring over the indexes.

Any tips or tricks to copy tables, data and indexes and a reasonable speed?

Thanks,

Carl

View 1 Replies View Related

How To List Tables,indexes,views Etc...

Jun 16, 2003

Hi,

I want to list the table names in a database "mydev_db".What would be the query ?.

I want to run a similar query to find out the indexes,views,stored_procs etc.



Regards,
Copernicus

View 3 Replies View Related

Query To List Indexes From A Table ?

Sep 1, 2006

How can I list indexes with a (SQL) query ?
Thanks

View 1 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

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

SQL Server 2008 :: Display List Of Indexes - Add Database Name In Results

Apr 6, 2015

I written a proc to display the list of Indexes But I needed to print the database where the objects do belong to. How I should write the Dynamic script to add the database Id? I thought to use derived table kind of stuff, but unable to find a solution.

ALTER PROC [dbo].[USP_INDEXCHECK]
AS
DECLARE @sql NVARCHAR(max)
DECLARE @DB VARCHAR(max)
DECLARE databasecursor CURSOR FOR

[Code] .....

View 2 Replies View Related

DB Engine :: How To Find List Of Indexes On Tables On Which Views Has Been Created

Aug 28, 2015

The views are in XYZ production database and user needs the list of indexes on the tables on which the views has been created.

query to find list of indexes on the tables on which the views has been created.

View 4 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

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 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

SQL Server 2012 :: Query Servers From A List For File Storage Information

Oct 13, 2014

I have a group of about 5 servers (which will likely grow toabout 25 in the near future) with their names listed in a table in a database on one of the servers. I want to query all servers in that table using the following query to pull the storage drive, database name, created date, age and size of the databases for each server listed in the table:

SELECT left(mf.Physical_Name,2) AS Storage_Drive,
DB_NAME(mf.database_id) AS DatabaseName,
db.create_Date,
DateDiff(day, db.create_date, getDate()) Age,
sum((mf.size*8))/1024 SizeMB

[Code] ...

How would I best accomplish this if I want to implement it using a TSQL procedure?

View 4 Replies View Related

SQL Server 2008 :: Find The List Of Servers By Querying At Active Directory?

Mar 3, 2015

Is there anyway,can we find the list of servers by querying at active directory?

View 3 Replies View Related

SQL Server Admin 2014 :: How To List The Target Servers Associated With A Master Server

Sep 9, 2015

I'm looking for a way to list the target servers associated with a master server. The reason is that we're moving to another master server, and I'd prefer not to move the targets manually.

I've got most of the T-SQL already (sp_msx_enlist, sp_add_jobserver), but I'd like a scripted solution instead of a wizard.

View 2 Replies View Related

AVG Amount Spreaded Accross

Dec 6, 2007

Can any help me regarding the following

When you are pulling the data from PPV
SELECT
[MATERIAL]
,[IR_AMOUNT]
FROM [LATCUBDAT].[dbo].[ppv]
where [MATERIAL] = 'MR004' AND [IR_AMOUNT] = 53728.85
Result







material

IR_Amount


MR004

53728.85


When you want to join ppv to rmu and then pull the data then
select R.[PRODL]
,P.[MATERIAL]
,P.[IR_AMOUNT] AS 'IR_AMOUNT'




FROM [LATCUBDAT].[dbo].[ppv]P
INNER JOIN [LATCUBDAT].[dbo].[rmu] R ON R.[RAW MATERIAL] = P.[MATERIAL]
where P.[MATERIAL] = 'MR004' AND P.[IR_AMOUNT] =53728.85












PRODUCT LINE

MATERIAL

AMOUNT


30000

MR004

53728.85


32000

MR004

53728.85


36000

MR004

53728.85


50000

MR004

53728.85


52000

MR004

53728.85


54000

MR004

53728.85


When I use avg in the query I get this report
select R.[PRODL]
,P.[MATERIAL]
,avg (P.[IR_AMOUNT]) AS 'IR_AMOUNT'




FROM [LATCUBDAT].[dbo].[ppv]P
INNER JOIN [LATCUBDAT].[dbo].[rmu] R ON R.[RAW MATERIAL] = P.[MATERIAL]
where P.[MATERIAL] = 'MR004' AND P.[IR_AMOUNT] =53728.85
GROUP BY R.[PRODL],P.[MATERIAL]
ORDER BY R.[PRODL],P.[MATERIAL]










PRODUCT LINE

MATERIAL

AMOUNT


30000

MR004

53728.85


32000

MR004

53728.85


36000

MR004

53728.85


50000

MR004

53728.85


52000

MR004

53728.85


54000

MR004

53728.85


I will like to see








PRODUCT LINE

MATERIAL

AMOUNT


30000

MR004

8954.808


32000

MR004

8954.808


36000

MR004

8954.808


50000

MR004

8954.808


52000

MR004

8954.808


54000

MR004

8954.808


If there where 4 product line then avg distributed between 4 and like wise

View 5 Replies View Related

How To Copy Columns Accross Tables

Aug 15, 2007

I have 1 table in my db that I have imported from a txt file using DTS.

In my database "DOJ" I have a table named "DOJGRAB" with ALL my data fresh from a import using DTS.

Also in "DOJ" are 6 other tables (NAME, PERSON, etc...)

How can I parse the columns out from my DOJGRAB table to fill existing columns in my other 6 tables? Basically a copy of specific columns from DOJGRAB to their proper places in the other tables.

Can somebody post an example of the syntax I would use to copy a column from one table to another? Thanks!

View 7 Replies View Related

Update Data Accross 2 Databases

Mar 14, 2008

I have to DBs. One is the original and the other is for testing. They both have similar data structure. Wanted to know if there is a way to update tables contents in one db with data that is in the other one.

View 4 Replies View Related

Isssue With Repllication Accross Domains And Inter

Aug 10, 2007

Hi,

I am newbie in replication,

I have a requirement where need to set upo replication with db such as both dbs are in different domain.
I have created a merge publication with create pulblisher wizard.

I want to use FTP as default location for the snapshot so that from both the domain database can accesss this path and subscriber will take the snapshot from it.


Issue facing like to run the snapshot agent we need to provide windows domain user or machine user but we can't add this user in FTP machine as domain is differnt will not get access on this machine.


I am getting following error:

Message: The replication agent failed to create the directory '\192.168.7.57ftprootuncPARAG-TEST_NORTHWINDSUB_PARAG_PUB20070810185320'.
Stack: at Microsoft.SqlServer.Replication.Utilities.CreateDirectoryWithExtendedErrorInformation(String directory)
at Microsoft.SqlServer.Replication.Snapshot.SnapshotProvider.CreateSnapshotFolders()
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.CreateSnapshotFolders()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: MSSQL_REPL, Error number: MSSQL_REPL52026)
Get help: http://help/MSSQL_REPL52026
Source: mscorlib
Target Site: Void WinIOError(Int32, System.String)
Message: Logon failure: unknown user name or bad password.

Stack: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, DirectorySecurity dirSecurity)
at System.IO.Directory.CreateDirectory(String path, DirectorySecurity directorySecurity)
at Microsoft.SqlServer.Replication.Utilities.CreateDirectoryWithExtendedErrorInformation(String directory) (Source: mscorlib, Error number: 0)


Any help regarding this is appreciable.

Please can put more light on it if I am doing anything wrong.


Thanks & Regards
Amit Harhare

View 5 Replies View Related

Update Multiple Fields Accross A Join

Jul 23, 2005

"David Portas" <snipped for brevity> wrote:Example 1:[color=blue]>> UPDATE table_a> SET col = ? /* Unspecified */> WHERE EXISTS> (SELECT *> FROM table_b> WHERE table_b.key_col = table_a.key_col)>[/color]<snip again>Many thanks. I have used this sample extensively since you posted it. Hopeyou (or someone) can help me with one more thing: How would it be writtento update several fields in table A with data from table B, where as youhave shown, a column matches the records?TIA!~ Duane Phillips.

View 4 Replies View Related

Fully Qualified Query Accross Databases

Sep 21, 2007

Are there any perfmonace or query optimization limitations or issues that arise when issueing a fully qualified query across multiple databases on the same Instance of SQL Server. In other words are all features of query optimization fully supported in queries that span databases on the same Instance.

View 3 Replies View Related

SSIS With Transaction Accross Different Network Zone

Nov 1, 2007

Hello, all

I have developed a SSIS package using a transaction

1. Users upload excel file to web server(139.223.15.xxx)
2.Excute SSIS package in web server to import excel file to SQL SERVER 2005(139.223.3.xxx)

If web server and SQL server are in the same network zone, the package will work successfully.

However, the two servers are in the different network zone, it encounters an error :

DTS can't enlist OLE DB in distribution transaction. Error Code: 0x8004D00E

How do I set any configurations?

Environment:
Web server:windows 2003 server sp1 ent
SQL server 2005 ent:windows 2003 server sp1 ent
SSIS: isolation level-->read committed

View 1 Replies View Related







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