SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Sp_help for Oracle?


Sp_help for Oracle?

Author
Message
Gerald Britton
Gerald Britton
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12347 Visits: 1828
I'm building a set of SQL Server views that use OPENQUERY to run queries against an Oracle server.

I want to see the metadata of the query from Oracle's perspective.

Is there an equivalent to SQL Server's sp_help for Oracle that I could use?

Gerald Britton, MCSE-DP, MVPToronto PASS Chapter
Lowell
Lowell
SSC Guru
SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)

Group: General Forum Members
Points: 298223 Visits: 42172
you can use the two built in procedures which are used specifically for interrogating linked servers.

EXEC sp_tables_ex [OracleLinkedServerName] will get you started, but from there, you need to find a database/schema/table to really dig into:


EXECUTE sp_tables_ex
@table_server ='CPULinked',
@table_schema='BOOFILES',
@table_name = 'DOCTR'

EXECUTE sp_columns_ex
@table_server ='CPULinked',
@table_schema='BOOFILES',
@table_name = 'DOCTR',
@Column_Name ='DRTYPE'



Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Gerald Britton
Gerald Britton
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12347 Visits: 1828
Thanks for the tip!

Unfortunately, these queries returned empty result sets for me, though the server, schema and tables/views most certainly exist (and I can query them using OPENQUERY)

Actually what I was looking for was an equivalent to sp_help that I can run on Oracle. So something like:


select * from openquery(oracle, 'exec sp_help ''schema.table''')



replacing 'exec sp_help ''schema.table''' with whatever the equivalent is on Oracle.

Gerald Britton, MCSE-DP, MVPToronto PASS Chapter
Lowell
Lowell
SSC Guru
SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)SSC Guru (298K reputation)

Group: General Forum Members
Points: 298223 Visits: 42172
ahh, sorry.
DESC or DESCRIBE TableName will get you some information, not sure how pretty it will be over a linked server, but that's what you want to try.

Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!
Gerald Britton
Gerald Britton
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12347 Visits: 1828
Alas, I don't think you can run DESC over OPENQUERY, since it is not a SQL command. I think you can only do that with the SQLPLUS command.

Could be wrong though!

Gerald Britton, MCSE-DP, MVPToronto PASS Chapter
Joie Andrew
Joie Andrew
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25174 Visits: 2133
Doesn't Oracle have metadata views like ALL_TABLES, ALL_TAB_COLUMNS and ALL_USER_TABLES? Can you query those?

Joie Andrew
"Since 1982"
kevaburg
kevaburg
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16470 Visits: 1284
g.britton (5/15/2015)
Alas, I don't think you can run DESC over OPENQUERY, since it is not a SQL command. I think you can only do that with the SQLPLUS command.

Could be wrong though!


You are right.....it is an internal command that only works with SQLPlus.....shame though....
knareshseo92
knareshseo92
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 1
What is the business process management?

Business process management (BPM) is a systematic approach to making an organization’s workflow more effective, more efficient and more capable of adapting to an ever-changing environment. A business process is an activity or set of activities that will accomplish a specific organizational goal.What is the definition of process management?

Process management is the ensemble of activities of planning and monitoring the performance of a business process. The term usually refers to the management of business processes and manufacturing processes. Business process management (BPM) and business process re engineering are interrelated, but not identical.

What is BPM industry?

Business process management (BPM) is a field Oracle Interview Questions in operations management that focuses on improving corporate performance by managing and optimizing a company’s business processes. It can, therefore, be described as a “process optimization process.”

Visit and Checkout Oracle Endeca Training
John Esraelo
John Esraelo
SSCertifiable
SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

Group: General Forum Members
Points: 5305 Visits: 1097
have you tried transparent gateway between oracle and sql server?

Cheers,John Esraelo
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum









































































































































































SQLServerCentral


Search