Accessing System Views Via Linked Servers

Apr 30, 2007

Is there anyway to access system views on/from a linked server?

I have unsuccessfully tried various permutations of
select *
from [MDEDATAWTDss2005].master.[information_schema.colums]

Thanks

View 6 Replies


ADVERTISEMENT

Problem Creating Indexed Views With Linked Servers

Jul 20, 2005

Hi, I have a problem, maybe someone can help me.I'm traing to create a view with a Linked ServerThis query works great:select id, descrfrom SERVER.DB.dbo.TABLEWhen I tray to create the view:CREATE VIEW dbo.View1 WITH SCHEMABINDINGASselect id, descrfrom SERVER.DB.dbo.TABLEGOI have this error:Server: Msg 4512, Level 16, State 3, Procedure Pais2, Line 3Cannot schema bind view 'dbo.View1' because name 'SERVER.DB.dbo.TABLE'is invalid for schema binding. Names must be in two-part format and anobject cannot reference itself.So I try this:CREATE VIEW dbo.View1 WITH SCHEMABINDINGASselect SERVER.DB.dbo.TABLE.id, SERVER.DB.dbo.TABLE.descrfrom SERVER.DB.dbo.TABLEGOI have this error:Server: Msg 117, Level 15, State 2, Procedure Pais2, Line 3The number name 'SERVER.DB.dbo.TABLE' contains more than the maximumnumber of prefixes. The maximum is 3.Then I try this:CREATE VIEW dbo.View1 WITH SCHEMABINDINGASselect a.id, a.descrfrom SERVER.DB.dbo.TABLE as AGOI Have this errorServer: Msg 4512, Level 16, State 3, Procedure View1, Line 3Cannot schema bind view 'dbo.View1' because name'iservsql1.osderrhh.dbo.pais' is invalid for schema binding. Namesmust be in two-part format and an object cannot reference itself.This query alone works great:select a.id, a.descrfrom SERVER.DB.dbo.TABLE as AThe names aren't what I describe here (id is not valid without []).ANY IDEAS?!??!?!I don't know what else can I do.I need help!!!TANKS A LOT!!!!!!!!

View 1 Replies View Related

Restore SMK And System Databases (credentials And Linked Servers)

Apr 28, 2008

Hi there



I have a concern about restore whole SQL server environment.



1st server:



x86 SQL Server 2005 EE SP2 + hotfix 3159 is installed on Windows 2003 SP1 R2. SQL Server is running under Local System Account. Server is not part of AD.



2nd server



Win XP SP2, x86 SQL Server 2005 DE SP2 + hotfix 3159. SQL Server is running under Local Admin Account. Server is part of AD. Server has Credentials and linked servers





I'm trying to move all databases from server 2 to server 1



For this I am doing:

1) Create backup SMK

2) Detach all user databases

3) Backup all system databases

4) Copy all this stuff to server 1

5) Run Server 1 in single-mode (-m)

6) Restore master database

7) Try to restore backup SMK that was done on step 1 and get this error message:



Msg 15329, Level 16, State 11, Line 2
The current master key cannot be decrypted. If this is a database master key, you should attempt to open it in the session before performing this operation. The FORCE option can be used to ignore this error and continue the operation but the data encrypted by the old master key will be lost.


My understanding is that credential secrets, linked server login passwords are lost and should be recreated. DbMK can be restored using passwords.



As far as I know this can be avoided if the same domain account is using for both servers. But the question still this - if I have stand alone server, using local system account for the SQL Server service and have encrypted objects - I cannot restore SQL Server on another box (say in case disaster lost original one) without loosing credentials and linked servers even if I have all backups including backup of SMK.



Sounds gloomily for me. Any idea what I missed?



PS This links

http://blogs.msdn.com/lcris/archive/2005/09/23/473464.aspx

http://blogs.msdn.com/lcris/archive/2005/07/08/437048.aspx

http://blogs.msdn.com/lcris/archive/2005/09/30/475822.aspx

http://blogs.msdn.com/lcris/archive/2006/04/10/572678.aspx

and all relative topics in BOL were studied very carefully



Regards,



Gennadi

View 4 Replies View Related

Accessing Views From Stored Procedures

Sep 7, 2007

Hi,I was just wondering if it's possible to access views from stored procedures? I know it doesn't make much sense, but would it be possible? If so, can you also give me some code example?Thanks. 

View 4 Replies View Related

Accessing Views Via ODBC From MSAccess

Jul 20, 2006

Hello,

This started as a simple thing, allow somebody to access to a database on a SQL 2005 server so they could get to it from MSAccess. I have created a login (Windows Authentication) so they can see the database and gave them "public" and "datareader" abilities.

The user then informed me that while they could see the views they could not see the data. Not being a DBA (sorry) I added "public" to the view's permissions (under properties) and granted it "Select" access and nothing else. After I completed this the user could not even see the views to pick them (via the ODBC link from MSAccess) and when I try to remove "public" from the permissions it dissapears, but when I reopen the permission "public" is back.

I then find out there is no data in the views and so the user would not have been able view anything anyway.

So what I want to do is remove "public" from the views permissions, is this possible?

Thanks for any help,

Tyrone

View 4 Replies View Related

Accessing SQL Servers Across Domains

Jun 22, 1998

We have installed SQL servers in 3 domains. We cannot see the servers in Enterprise manager in the other domains from any other domain. Trusted security is set up. Named pipes is the set protocol as we made no changes at install time. We can see the NT servers in the Server manager. All services are running. Is there something that I missed? Any help will appreciated.

View 1 Replies View Related

Accessing Data Across 6.5 Servers

Jun 22, 1999

Hi,

I need to access data across my sql servers . All the servers are 6.5. Think MS DTC is the solution. But how to implement the same. Can somebody give me step by step instructions.

Thanks in Advance.

Cheers

View 1 Replies View Related

Accessing One Database From Multiple SQL Servers

Dec 1, 2006

Apologies if this question has been asked before. I am about to upgrade a multiuser application based on Access97 and VB6 to C# and possibly SQL Server Express.

My customer does not want to use a server based database solution ie a single instance of SQL Server, but prefers to have a common networked dataset which is accessed via user's own individual database engines. This is because of restrictions on the installation of server based apps.

Does this scenario completely rule out the use of SQL Server Express?

Thanks

View 3 Replies View Related

Problem Accessing My Local A: Verses The SQL Servers A: Drive

Apr 26, 2006

I am having a problem accessing my local A: drive, using the bulk insert command. The actual sql server pc thinks I am accessing its sql server's A: and not my local a: drive. I am trying to read in a simple CSV delimited ascii file into a sql table. Wow what a nightmare just to read a simple ascii file into a table. Unfortunatley I am writing a program in VB.net for an operator to import ascii data from floppy diskettes.

I am using this command below: The command works fine but I have to go to the actual server and put the floppy disk in over there. I want the operator to be able to use there own A: or any location drive for that matter. Sql server over the network is not allowing us to access any local drive to import this data. I get an error 21 because the sql server does not have the floppy in its drive. It seems like some kind of security issue, but I am not sure. Any information would be most appreciated in this matter. Thanks in advance.

Sarah Diane Reid

sample code below:

BULK INSERT Master.dbo.imVBMbAddress

FROM 'a:mbAddressPipes.txt'

WITH (FORMATFILE = 'a:importdatambaddress.fmt',

FIRSTROW=2);

View 3 Replies View Related

Problem In Accessing SQL Server Views From Oracle Using TG4MSQL(Transparent Gateway Connectivity)

Dec 13, 2005

Dear All,I am using the oracle transparent gateway connectivity with sql serverusing tg4msql,as far assettings are concerned those were set and Connectivity is working Fine,and getting the responsefrom that server.here is description what I done as:-There is a View on Sqlserver whichis Join of 6 tables and havedata around 1 million in 2 tables and 0.5 million in rest of thetables, as the Query for creatingsqlserver view is given below:CREATE view Account_anila_test asSELECT ......(around 50 Columns)FROM GE_Init.dbo.Person INNER JOINGE_Init.dbo.Konto ON GE_Init.dbo.Person.Person_ID =GE_Init.dbo.Konto.Person_ID INNER JOINGE_Init.dbo.Produkt ON GE_Init.dbo.Konto.Produkt_ID =GE_Init.dbo.Produkt.Produkt_ID LEFT OUTER JOINGE_Init.dbo.CRMKonto ON GE_Init.dbo.Konto.Konto_ID =GE_Init.dbo.CRMKonto.Konto_ID LEFT OUTER JOINGE_Init.dbo.calcKontoOBSdt ON GE_Init.dbo.Konto.Konto_ID =GE_Init.dbo.calcKontoOBSdt.Konto_ID LEFT OUTER JOINGE_Init.dbo.calcKonto ON GE_Init.dbo.Konto.Konto_ID =GE_Init.dbo.calcKonto.Konto_IDWHERE (GE_Init.dbo.Konto.SlettetKonto = 0) AND(GE_Init.dbo.CRMKonto.MarkertForSletting = 0OR GE_Init.dbo.CRMKonto.MarkertForSletting IS NULL)Now,I made a table in oracle adjacent to sqlserver View and Inserteddata as:INSERT INTO ACCOUNT_TEST11(.....)SELECT .............FROM Person@dbl_getgc1 a INNER JOINKonto@dbl_getgc1 b ON a."Person_ID" = b."Person_ID" INNER JOINProdukt@dbl_getgc1 c ON b."Produkt_ID" = c."Produkt_ID" LEFT OUTER JOINCRMKonto@dbl_getgc1 d ON b."Konto_ID" = d."Konto_ID" LEFT OUTER JOINcalcKontoOBSdt@dbl_getgc1 e ON b."Konto_ID" = e."Konto_ID" LEFT OUTERJOINcalcKonto@dbl_getgc1 f ON b."Konto_ID" = f."Konto_ID"WHERE (b."SlettetKonto" = 0) AND (d."MarkertForSletting" = 0 ORd."MarkertForSletting" IS NULL);This insert Satement worked fine,but when I inserted from the viewalready created in SQLSERVER as:-INSERT INTO ACCOUNT_TEST11(.....)SELECT .............FROM Account_anila_test@dbl_getgc1;This gave a following error:-"WEB_30_SUM", "WEB_360_COUNT", "WEB_360_SUM", "WEB_90_COUNT","WEB_90_SUM"*ERROR at line 48:ORA-28500: connection from ORACLE to a non-Oracle system returned thismessage:[Transparent gateway for MSSQL]ORA-02063: preceding 2 lines from DBL_GETGC1Elapsed: 00:01:01.04after this I set The paramater "HS_FDS_TRACE_LEVEL=ON" in INIt file oftg4msql Folder then in thetrace File of tg4msql folder following error comes:-(0)(0) [Microsoft][ODBC SQL Server Driver]Timeout expired (SQL State:S1T00; SQL(0) Code: 0)(0)If any one has Faced the similar kind of problem and Can help me,Pleaselet me Know where I amdoing Wrong and How this error can be ractified.Waiting For Reply ASAP.RegardsLovkesh

View 1 Replies View Related

Distributed Partitioned Views/Federated Servers Anyone?

Apr 21, 2003

I'm trying to do some researh on the use of SQL's DPV. I'm looking for feedback from people who've actually done this production to know more about the design challenges and level of added administration required. Any information will be much appreciated. Thanks.


aK

View 4 Replies View Related

Accessing UDF On A Linked Server

Mar 5, 2004

Hi all-

I need to invoke a UDF on a linked server. Is this possible?

eg:
I need to execute the following query from Server1

select *
from Server2.Database.owner.fnGetTree() AS Server2Tree
inner join Database.owner.fnGetTree() AS Server1Tree
on Server1Tree.NodeId = Server2Tree.NodeId

Thanks for your time

View 1 Replies View Related

Accessing Linked Server

Sep 25, 2007

Is there any way to access a linked server without using four-part naming?

My problem is that I am trying to find a way to connect to an access database on a 64 bit system (there is no 64 Jet OleDb provider) and I have to run in a 64 bit process so no WoW solutions will work for me .
I am looking into trying to use a Sql Linked server but am trying to find a workaround without having to re-write all our queries to use four-part naming.
Is there someway to configure a connectionstring to default to executing against a linked server??

Any help or suggestions would be welcomed.

View 3 Replies View Related

System Views

Apr 10, 2007

I was looking in sys.syslogins and sys.sql_logins for a property to tell me if the login is locked but all i see are properties for if the account is enabled or if the account has access.
 Is there a system view I can query to tell if if the account is locked ?
 Thanks,
 

View 3 Replies View Related

Accessing Linked Excel Server

Jan 18, 2007

I created a linked Excel server that is stored in a SQL2000 database.

I can run the following from the SQL server with no problem.

Select * From CSCNEDI...EDI$

When I try and run the select from my WinXP computer I get the following from both SQL2000 Query Analyzer or SQL2005 Management Studio (these are configured for client access)

[OLE/DB provider returned message: Unspecified error]

OLE DB error trace [OLE/DB Provider 'Microsoft.Jet.OLEDB.4.0' IDBInitialize::Initialize returned 0x80004005: ].

Msg 7399, Level 16, State 1, Line 1 OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.

Thanks

David Davis

Schuette Inc.

View 1 Replies View Related

User Tables/Views Transfer Between Production And Test Servers

Feb 22, 2005

Hello
I have a production database that i need to refresh to our test environment daily. The database size is 700 MB.
I do not need to transfer the stored procedures and triggers , users and logins.
Would a DTS package that runs every night be the best and the easiest solution to implement or should i look into log shipping and snapshot replication.

thanks

View 2 Replies View Related

Error In Accessing Data Via Linked Server

Nov 23, 2006

 

Hi,

     I am trying to access the View through linked server connection .The linked server connection is between two sql server 2005.

    The problem is I am not able to access 2 columns of nvarchar datatype of length 255, from the view through select statement.

     I do a SELECT col1,col2 from VIEW,then getting the following error .

     Cannot get the data of the row from the OLE DB provider "SQLNCLI" for linked server "SRVXPR". Could not convert the data value due to reasons other than sign mismatch or overflow.


  Then I tried with

      Select  cast(Col1 as nvarchar) ,

                  cast(col2 as nvarchar) from VIEW,

     I am able to get the values.

    The collation type is same for all underlying tables and also for the servers.

     Is there any restrictions in handling nvarchar data thru linked server/ anyother size limitation.

     I don't want to use cast as this will lead to performance problem.       

 

Thanks,

Philip

 

                   

                   

 

View 5 Replies View Related

System Views To See Sql Command Executing

Jan 31, 2006

Hello,

can someone tell me where I can look to find a sql command that
is being executed by an application against my database?
In Oracle, I look in the v$sql_text view - is there something
similar in SQL Server 2000 ?
Many thanks in advance

View 2 Replies View Related

How To Access System Catalog Views From A UDF

Nov 26, 2007

I'm trying to access a System Catalog View (sys.database_permissions, and others) from a table valued function. I need to be able to pass the database name into the function so that I can operate on any database. Typically I'd use dynamic SQL to do something like





INSERT INTO #tempTable

EXEC ('SELECT * FROM ' + @DBName + '.sys.database_permissions')



But of course I can't use dynamic SQL inside of a UDF. I know I could do this using a stored procedure, but I'd need the output to be a recordset that I can query.

Has anyone done anything like this? I think I'm stuck.

View 5 Replies View Related

Error Open/accessing A MSSQL Linked Server

Jan 13, 2005

Hi!

I’m having the fallowing error when I try to open/access a linked server
Error:
Error 7302: Could not create an instance of OLE DB provider 'MSOLAP.2'.
OLE DB error trace [Non-interface error: CoCreate of DSO for MSOLAP.2 returned 0x80004005].

I have already tried to create the server using SEM and also with SQL syntax in ISQLW.
Code:
EXEC sp_addlinkedserver
@server='LINKED_OLAP',
@srvproduct='',
@provider='MSOLAP.2',
@datasrc='MyServerName.MyDomain’,
@catalog='MyDataBase'

I’m allowed to create the linked server but I can’t use it.

Information:
OS: Windows 2003EE
SQL: MSSQL 2000 + SP3a
MDAC: MDAC2.8 rtm

Thanks,
Paulo

View 4 Replies View Related

Linked Server, Views And Efficiency

May 6, 2005

Hi,

I have two servers that i want to create a SQL RS report on.
On one server there is an HR database with our staff details, on the other server there is a database of assets.

In order to report on the assets assigned to each user i am thinking that i will have to :
1) link the servers
2) create a view in the HR database exposing the fields needed
3) create a view in the assets database exposing the assets information joined to the view from the other server
4) create my reports on the view on the assets server.

is this right or am i barking up the wrong tree?

View 9 Replies View Related

Views From Linked Server Inaccessible

Jul 2, 2007

Please help.

I created a linked server with Oracle Provider for OLE DB to Oracle Database from SQL Server 2000 SP 4. Afterwards I created Views from this linked server and granted SQL Server users "select" access to the Views.
Unfortunately when they try to access the views the following error message was generated (see the attached image - error.gif).

Can someone please explain to me what is wrong?

Thanks

Victor

View 7 Replies View Related

Not Seeing Some Linked Server Catalog Views

Jan 30, 2008

SQL 2005 SP2 in Managemrnt Studio...
I have a linked server set-up pointing to an instance that has several databases. In one catalog I have no tables or views being listed for the catalog. So I select a view, add the permissions that should allow the view to show in the list but it does not. And I did refresh and I did even restart management studio.

BTW: I can exec the view using a 4 part name.

Any one have an idea why the view don't show in the list?

Thanks much
chuck

View 5 Replies View Related

Deny User Permissions To See System Views?

Jun 4, 2008

Hi all, Is there any easy way to not allow a user to see system views?  I have set up 1 view for a login, and I have to use an ODBC connection to access it.  However, the 3rd party application I'm using is apparently timing out because of the number of tables/views that are returned. TIA! - Mark 

View 2 Replies View Related

SMO Problem / Can't Select Non System Views Without Crash

Mar 5, 2006

I've had a couple problems with SMO and I wonder if anyone else has.  Specifically, when I run through stored procedures (just like your example) it is painfully slow.  Maybe 5 a second.  Another problem is filtering on nonsystem objects with either "SVR.SetDefaultInitFields(typeof(Microsoft.SqlServer.Management.Smo.View), "IsSystemObject"); or View.isSystemObject.
Both cases crash my app.  Any ideas?
Below are two ways that both crash or hang.
SVR.SetDefaultInitFields(typeof(Microsoft.SqlServer.Management.Smo.View), "IsSystemObject");
foreach (Microsoft.SqlServer.Management.Smo.View view in viewCollection)
{}
OR
 
foreach (Microsoft.SqlServer.Management.Smo.View view in viewCollection)
{
if (!view.IsSystemObject)
{}
}
 
 
 

View 1 Replies View Related

Suid Column Is Not Appearing In System Views

May 11, 2015

I got a script, which ran on SQL Server 7. After compiling on SQL Server 2012, I came across that the previous script used a system ViewsTables columns named "suid", which no longer operate in SQL Server 2012. After modifying the script with 2012 and replaced suid by SID, it works but the suid column is not appearing in System Views. What if we want to get that column back in SQL Server 2012? is there any possible way?

View 3 Replies View Related

Querying Metadata Through System Views And Tables

Mar 15, 2008

Please, could anyone tell me how to get information from which attribute of which table is the attribute from the view derived(it could also be a complex expression, not just attribute)through querying system tables or views(INFORMATION_SCHEMA, preferably if possible, because it's standard)

i'm using MSSQL2005.

Thank you!

View 4 Replies View Related

Linked Servers

Aug 17, 2006

Is it possible to link to an SQL 2005 server db from a SQL 2000 server? Is there a driver for this?

View 1 Replies View Related

What Are Linked Servers And What R Its Uses

Apr 5, 2008

can anybody tell me about Linked Servers and their uses and how to add a linked server to my Sql Server 2005.
 any help on this would be highly appreciated.

View 3 Replies View Related

Linked Servers

Jun 10, 2004

Hello All,

I have been trying to Link two sql servers on two different machines over the Internet without any luck. Can someone point me to information about doing this with good examples?

Thanks

View 2 Replies View Related

LINKED SERVERS

Jan 22, 2002

I currently have a main SQL Server which had a column on the majority of the tables. This column also had a check contraint on it. I dropped the column and the constraint and I now get the following message when trying to query the tables through a linked server 'OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time.'.

Can anyone help

View 1 Replies View Related

Linked Servers.....

May 10, 2001

Hi All,
I have successfully linked a server and had SQL queries running
OK for a few weeks, but today I get the following message....

"OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during execution that was not found at compile time."
(Server: Msg 7353, Level 16, State 1, Line 1)

I've dropped the link and recreated it but I still get the same error
message. Can anyone help???

Thanks
David.

View 2 Replies View Related

Linked Servers In DTS...

Jun 25, 2001

Hi,

I'm using SQL Server 7.0 SP1.

I have a DTS package that requires me to link 2 servers
and query both in order to get my set of records that I
want to Transform. My query runs fine in QA. I copy and
paste it into the SQL Query window of the transformation.
I click Preview and all that happens is a quick flicker of
the DTS window. When I go to Transformations, there are
no source columns.

Here is a copy of my code that I'm trying to use:
-------------------------------------------------------
declare@start_dteas datetime,
@end_dteas datetime

SELECT@start_dte = date_data_range_start_dte,
@END_DTE = date_data_range_END_dte
FROMSIDDEV.SID_DEVELOPMENT.DBO.T901_RUN
WHERERUN_ID = (selectmax(run_id)
from
SIDDEV.SID_DEVELOPMENT.DBO.t901_run
whererun_type_cd = 'M')


SELECTRUN_ID
INTO#RUNS
FROMCRMDEV02.MDCORE.DBO.T901_RUN
WHEREDATE_DATA_RANGE_START_DTE >= @START_DTE
ANDDATE_DATA_RANGE_END_DTE <= @END_DTE

SELECTT70.*
FROM
CRMDEV02.MDCORE.DBO.T70_MD_UNIVERSE_RELATIONSHIP_M A
NGT AS T70 JOIN #RUNS
ONT70.RUN_ID = #RUNS.RUN_ID

DROP TABLE #RUNS
------------------------------------------------------
Is there an issue with Linked Servers and DTS?
Any help would be greatly appreciated.

Thanks in advance,
Darrin

View 1 Replies View Related







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