473,216 Members | 1,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

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 "sysdatabases" ...
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 4477
On Mon, 12 Jan 2004 18:32:36 -0500, "Tom Jones" <to******@lucent.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_COLUMNS 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.andyhsoftware.co.uk/space>
Jul 17 '05 #2
Hi Tom!
On Mon, 12 Jan 2004 18:32:36 -0500, "Tom Jones" <to******@lucent.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 "sysdatabases" ...
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_SCHEMA_* 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******@lucent.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 "sysdatabases" ...
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
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...
2
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...
2
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,...
3
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...
9
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...
1
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...
0
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...
5
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...
4
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...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.