If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Extracting sql server table metadata like schemaname, catalogname from memory/files

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-28-12, 23:52
sandeep424 sandeep424 is offline
Registered User
 
Join Date: Jun 2012
Posts: 2
Extracting sql server table metadata like schemaname, catalogname from memory/files

Hello Guys

I need a favour. I wanted to know that when I create a table using SQL Server, does the table metadata like schemaname and catalogname is stored in memory or in hard-disc. I am trying to extract schemaname and catalogname when the database is down or correctly when I have no connection string. I know about sysindexes, systables etc, but i am not able to understand whether it stores the data which is useful to me like catalogname.

and can someone post me sql query to extract the column names from sysindexes.

Thank you in advance
Reply With Quote
  #2 (permalink)  
Old 06-29-12, 12:43
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 13,587
Code:
SELECT *
   FROM INFORMATION_SCHEMA.COLUMNS
I would also STRONGLY suggest that you consider buying SQL-Spec, it does exactly what you want.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 06-29-12, 17:08
sandeep424 sandeep424 is offline
Registered User
 
Join Date: Jun 2012
Posts: 2
Hi Pat

Thanks for your reply. Information_schema is a useful database and thank you for adding it into my knowledge. But, along with this I wanted to know if without using a connection string or connecting to a database, is it possible to read all the tables or a single table metadata?.

I am writing something which would not have access to database at all the times. I am thinking of a solution of storing it in a file and using it for later purposes. But was hoping that if something is already done by the databases.

Thanks again
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On