473,543 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MS SQL server Meata data question

I need to use php's native mssql api in order to read the meta data from an
entire DBMS ... I have sql server 2000 up and running and using the provided
browsing tools poked around and found that the databases in the system were
listed under a database named "master" in a table named "sysdatabas es" ...
there is a "syscolumns " table there too but it looks like i need specific
info about the architecture of sql server's inner workings to use it.

the native php support for sql server doesn't have meta data functions like
are provided for things like mysql and odbc. I can't use adodb or pear for
alot of reasons ...

can anyone help me or point me to a souce for how to get:

databases -- I have done this one in a round about way
tables in those databases
attributes in those tables
and attribute types

I need to do this for Oracle too but I think the native support for Oracle
is better and the tools built in ... I think Oracle supports something they
call show commands that just do what I want.

Thanks
Tom
Jul 17 '05 #1
3 4485
On Mon, 12 Jan 2004 18:32:36 -0500, "Tom Jones" <to******@lucen t.com> wrote:
I need to do this for Oracle too but I think the native support for Oracle
is better and the tools built in ... I think Oracle supports something they
call show commands that just do what I want.


No idea about SQL Server, never used it. However, in Oracle, you look in the
'data dictionary' for metadata; it's a set of views such as USER_TABLES,
USER_TAB_COLUMN S that you query with ordinary SQL.

See: http://otn.oracle.com/pls/db92/db92....emark=homepage

'SHOW' commands are for MySQL - such as 'SHOW TABLES'. You can execute these
as queries and they return a result set, but they're not proper SQL as you
can't have WHERE clauses or use them in joins etc.

--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>
Jul 17 '05 #2
Hi Tom!
On Mon, 12 Jan 2004 18:32:36 -0500, "Tom Jones" <to******@lucen t.com>
wrote:
I need to use php's native mssql api in order to read the meta data from an
entire DBMS ... I have sql server 2000 up and running and using the provided
browsing tools poked around and found that the databases in the system were
listed under a database named "master" in a table named "sysdatabas es" ...
there is a "syscolumns " table there too but it looks like i need specific
info about the architecture of sql server's inner workings to use it.

the native php support for sql server doesn't have meta data functions like
are provided for things like mysql and odbc. I can't use adodb or pear for
alot of reasons ...

can anyone help me or point me to a souce for how to get:

databases -- I have done this one in a round about way
tables in those databases
attributes in those tables
and attribute types

I need to do this for Oracle too but I think the native support for Oracle
is better and the tools built in ... I think Oracle supports something they
call show commands that just do what I want.
Check out the INFORMATION_SCH EMA_* Views, which are well explained in
the MSSQL documentation (BOL). Thats what I use...

HTH,Jochen

Thanks
Tom


--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 17 '05 #3
Call the store procedure sp_databases and sp_tables to get a list of
databases and tables (in the current database). sp_columns will get your a
list of a table's columns. Look in your MS SQL help file for more info.

Uzytkownik "Tom Jones" <to******@lucen t.com> napisal w wiadomosci
news:bt******** @netnews.proxy. lucent.com...
I need to use php's native mssql api in order to read the meta data from an entire DBMS ... I have sql server 2000 up and running and using the provided browsing tools poked around and found that the databases in the system were listed under a database named "master" in a table named "sysdatabas es" ...
there is a "syscolumns " table there too but it looks like i need specific
info about the architecture of sql server's inner workings to use it.

the native php support for sql server doesn't have meta data functions like are provided for things like mysql and odbc. I can't use adodb or pear for alot of reasons ...

can anyone help me or point me to a souce for how to get:

databases -- I have done this one in a round about way
tables in those databases
attributes in those tables
and attribute types

I need to do this for Oracle too but I think the native support for Oracle
is better and the tools built in ... I think Oracle supports something they call show commands that just do what I want.

Thanks
Tom

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
3777
by: David W. Fenton | last post by:
A client is panicking about their large Access application, which has been running smoothly with 100s of thousands of records for quite some time. They have a big project in the next year that will lead to a lot of use of the database and the adding of quite a lot of new data (though I can't conceive of them adding more than than 10s of...
2
8375
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when submitting the form to update the database. The server doesn't have the client side value any more. It seems to me that as I begin to write the...
2
1377
by: angus | last post by:
Hi All, i have an aspx form for the user to input, and those data will be stored into the database. I would like to build up the form dynamically by using the data in the a database table, named question for example, i have a question table and the data in the question table is as follow
3
2217
by: datapro01 | last post by:
I am a DB2 DBA that has been asked to become familiar enough with SQL Server in order to become actively involved in its installation, implementation, and to review database backup/recovery procedures. SQL Server will be used by a vendor packaged application. The problem is that we are awaiting word on whether it will be SQL Server 2000 or...
9
2402
by: CGW | last post by:
I asked the question yesterday, but know better how to ask it, today: I'm trying to use the File.Copy method to copy a file from a client to server (.Net web app under IIS ). It looks to me that when I give a path like @"C:\holdfiles\myfile.txt" it looks on the server C drive. How do I pull from the client? Do I need a different class and/or...
1
1332
by: Frank Millman | last post by:
Hi all I am developing a multi-user business/accounting application. It is coming along nicely :-), though rather slowly :-( I have hit an issue which will require a lot of changes to the code I have written so far, together with an increase in complexity and all the bad things that follow from that. Before I go ahead and make the...
0
4654
by: Macca | last post by:
Hi, I am writing an asychronous socket server to handle 20+ simulataneous connections. I have used the example in MSDN as a base. The code is shown at end of question. Each connection has a number of different types of data coming in. I have a databuffer for each type of data coming in.
5
2902
by: B1ackwater | last post by:
We've fooled around with Access a bit, but only using the single-user store-bought version. It seems to be a good database - versatile and infinitely programmable - and can apparently be used as a front end to SQL server if we ever needed to go that route. But - is there a client/server version of Access ? Looking on the CDW site there is...
4
3592
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket client and asynchronous socket server example code provided in the .NET framework developers guide is a great start but I have not dealt with...
0
7402
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7347
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7733
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5883
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5264
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1814
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
963
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
633
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.