I need to create a data dictionary that lists all the tables, columns and data types in PDF file format. I use SQL Server 2008 R2. How do I get this information?
I was able to view the schema view as someone suggested with all the information I need, but how to make a PDF file format with that information?
I would recommend using a paid product for what you're looking for, http://www.sqldatadictionary.com/ , http://www.apexsql.com/sql_tools_doc.aspx , or http://www.red-gate.com/products/sql-development/sql-doc/ ..
You can use dataedo if you looking for tool with gui. Has free version. Program semi-automatically generates the database schema and then can export schema to pdf or html format. It worked for me.
Best file result when used MS Access data documenter do it for you. I first used a tool to convert MS SQL db to MS Access db. Then I used data documenter tool within MS Access.
Thank you all for helping me.
look at the
SELECT *
FROM SYS.OBJECTS A
LEFT JOIN SYS.COLUMNS B ON A.OBJECT_ID = B.OBJECT_ID
WHERE A.TYPE_DESC = 'USER_TABLE'
and select your specific columns
Related
I am using the WPForms Pro version that stored the entries into a database. I found out that WPForms stored the data into my database as JSON into the fields column of wp_entries table.
I need to further process this data into reports and I would love this data to be available as standard SQL table.
Does anyone know how to convert this JSON code into a SQL output using SQL code? I have tried JSON_TABLE function but I'm a bit unfamiliar with that logic.
Backend is MySQL / MariaDB.
My JSON data looks something like this:
{"5":{"name":"Locate cost","value":"0.90","id":5,"type":"number"},"3":{"name":"Ticker","value":"IDAI","id":3,"type":"text"}
Thanks!
I am using Access(2003) mdb file as front end of oracle 11g R2 as backend. I am using odbc connection to retrieve data from oracle database. But sometime mdb is displaying incorrect output.
For example, when I use the below query in mdb
SELECT *
FROM PLAN
WHERE (((PLAN.BATCH_REF)="SSU080520122"));
and it is providing wrong result. But the same query is providing correct result in oracle.
Any help will be appreciated.
PLAN is a reserved word. Using reserved words as table or column names can confuse the db engine. Although this may not actually be the source of your trouble, it would be easy to rule it out as a contributor. See if you get the results you expect with this query:
SELECT *
FROM [PLAN] AS p
WHERE p.BATCH_REF="SSU080520122";
Im running SQL Server 2008 on winows server 2008 and I have a stored proc that outputs some information about a product entity with the inout as a product Id.
It outputs a reecord to represent the product information followed by a second table full of orders.
Im wondering if there is any way to call the stored proc and write the orders data to a CSV file from the command shell?
The other alternative is to try this using a custom written application and a data reader but I dont realy want to go down this route.
You should be able to use the SQLCMD command-line utility to do this. It's a complex tool to use; the BOL entry can be found here, and if necessary a bit of googling should turn up the odd tutorial that goes over the basics.
I need to extract all the tables, stored procs and functions from an SQL Server 08 db that are under a particular schema. I could filter the displayed items in Management Studio and then do Script As -> Drop/Create for each of them, but I would really like to avoid this as there are quite a few items in the schema.
Is there a way to do this?
Edit:
I've had a look at this question (possible duplicate I just found). I'd rather not use an external tool as suggested, since this is at work and I'd need to get approval to use one. Nor do I want one big Create Database script - I need separate scripts for each table/sproc/function.
select
object_name(obj.object_id),
sch.name,
co.definition
from
sys.objects obj
join sys.schemas sch on sch.schema_id = obj.schema_id
left join sys.sql_modules co on co.object_id = obj.object_id
where
sch.name = 'DBO' --here goes your schema name
--The syscoments table was used back in sql 2000 and you should not use it anymore - but when so it is the sys.syscomments table
Visual Studio 2010 Premium includes database project tooling support that allows you to perform database schema comparisons between databases (where you can filter to only a specified database schema) and extract all the objects (and configuration) in a live database to a VS2010 database project, creating a script per object.
See Working with Database Projects.
Something based on
SELECT [text] FROM [syscomments]
I'm wondering if there is a utility that exists to create a data dictionary for a MySQL database.
I'm considering just writing a php script that fetches the meta data about the database and displays it in a logical format for users to understand but I'd rather avoid that if there is some pre-built utility out there that can simply do this for me.
Have you looked into HeidiSQL or phpMyAdmin?
Also, MySQL Admin.
Edit#1 fixed typo, added more info
Take a look at https://stackoverflow.com/a/26703098/4208132
There is a db_doc.lua plugin for MySQL Workbench CE
[EDITED]
It seems that the LUA plugin support was discontinued.
So I wrote a plugin in Python to generate data dictionaries.
It is available at: https://github.com/rsn86/MWB-DBDocPy
Looks like MySQL Admin is now MySQL Workbench and you need the Enterprise version to get their reporting tool called DBDoc. It explains a little about customizing DBDoc reporting templates at http://dev.mysql.com/doc/workbench/en/dbdoc-templates.html
The easiest thing to do is Download Toad for MySQL, which is free, and create your own query against the mysql information_schema internal database. You can add columns you want to the query below. Then select all results and export as csv using TOAD.
use information_schema;
desc columns;
select c.table_name, c.column_name, c.data_type from columns c
where c.table_schema = "mydatabaseinstance";