473,729 Members | 2,405 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 4493
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
3814
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 thousands of records, which won't change the current performance profile at all). If there is a SQL...
2
8401
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 client side javacript code for form validation and client side editing capabilities in order to save...
2
1385
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
2229
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 2005 we will be working with. I have been told that there are considerable differences between the...
9
2413
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 method? Filestream? -- Thanks,
1
1340
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 changes, I thought I would bounce it off the group and see if there is a simpler approach.
0
4684
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
2913
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 a bewildering variety of packages and licences and such, but we can't figure out just which do...
4
3604
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 sockets before and I am struggling with something. From what I can tell the sample server code ...
0
8763
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9284
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9202
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6722
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6022
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4796
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
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
2
2683
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2165
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.