Re: MS SQL server Meata data question

From: Jochen Daum (jochen.daum_at_cans.co.nz)
Date: 01/13/04


Date: Tue, 13 Jan 2004 15:18:13 +1300

Hi Tom!
On Mon, 12 Jan 2004 18:32:36 -0500, "Tom Jones" <tomjones@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/


Relevant Pages

  • Re: [PHP] Getting mysql_query results into an array
    ... perform some kind of calculation upon $array ... it's USUALLY much more efficient to write an SQL query ... Databases are highly optimized for this kind of thing, ... query is nasty and the PHP is fast and easy, ...
    (php.general)
  • RE: [PHP] Microsoft .NET arguement
    ... I've found MS SQL (and MS Access databases) to be extremely fast ... have them installed alongside PHP for Win32. ... MySQL started slowing down before the MS SQL did. ...
    (php.general)
  • Re: Oracle vs MSSQL Parameters
    ... My SQL is ... ported between those databases. ... The instance of the DbCommand ... Oracle directly); the MS Data Set Generator tool used in the VS.NET IDE also ...
    (microsoft.public.dotnet.framework.adonet)
  • GUID default value
    ... We are developing a complex system, which will run on Oracle, MS SQL ... All the databases are to be replicated. ... GUID column, which is filled once a new record is inserted. ...
    (microsoft.public.access.tablesdbdesign)
  • GUID default value
    ... We are developing a complex system, which will run on Oracle, MS SQL ... All the databases are to be replicated. ... GUID column, which is filled once a new record is inserted. ...
    (microsoft.public.access.replication)