SQL Server 2012 - ddl

Is there a way to export DDL for SQL Server 2012?
A previous question of this nature was answered in Dec 2009, but it does not seem to apply,
Previous answer:
For SQL Server:
In SQL Server Management Studio, right click on your database and choose 'Tasks' -> 'Generate Scripts'.
You will be asked to choose which DDL objects to include in your script.
link edited Dec 19 '09 at 8:58
answered Dec 18 '09 at 18:53
Daniel Vassallo
78.6k11129180
I've tried the suggestion, but after right-clicking on my database, these is no such "Tasks" option.
Any ideas?
2012 Analysis Services just has a deployment wizard. I'm not deploying, just trying to document.
I've checked Data Quality Services, Integration Services, Performance Tools, but do not see anything that I recognize.
I've been working with SQL Devloper for Oracel for the past few years, but I seem to remember ACCESS and SQL Serever management had a Data Export on the Tools menu. It allowed you to pick and choose what to export, including DDl, with or without data.
I'd like to do something like that - include all my tables, but no data.
Any ideas?
Thanks.

I assume you want to script the DDL from a particular database on your SQL Server 2012 instance. To do so you click on the database of interest in SSMS, then right click and then hover over 'Tasks >', and then across and down to click on 'Generate Scripts'. This will open the wizard as shown in the three screen shots below. Tip: Be sure to check out the scripting options on the 'Advanced' tab.

Related

Oracle Developer Tools (ODT) & Visual Studio Integration

I've installed the ODT for Visual Studio 2015 (I've also tried VS2013) in hopes of using the "Oracle Database Project" but experiencing some specific error messages that don't appear to be very common.
When I browse the database via the Server Explorer, there is an option for you to be able to right click on a Relational Table and click "Generate Create Script to Project...".
However, when clicking this option I get a very non-specific error message and cannot work out why;
"Create script was not generated to Project for some of the selected object(s). See the 'Oracle Database Output' output pane for more information."
When I look at the "Oracle Database Output" window I get the message;
"Script Generation failed - Internal Error."
For here-on-in, it's gets very frustrating to find out what's wrong and to debug this non-descriptive error message.
What's most interesting is that the script generation function works for other database objects such as views & procedures, it just fails to work for database tables.
Has anybody experienced this error before? I'm wondering if it's a driver issue of some sort! (I have the oracle 11g client installed, and just tried with a specific ODAC/ODT combination package which appears to also install the 12c client, connecting to an Oracle Elements 11g server)
Any help appreciated, Thanks.
I have this problem too.
I was able to Create the scripts earlier, but now I cannot.
I did some investigating and decided this is not a problem with the oracle database. It is something to do with the state of VS.
I restarted VS2015 and I could create scripts again.

Oracle/TOAD/Team Coding: Can't select a TFS Namespace when attempting to connect to TFS through TOAD

We are currently attempting to evaluate whether or not we want to use TOAD's Team Coding feature as it would seamlessly allow us to use TFS as a repository for our database objects. We currently have the newest version of TOAD (It is a TRIAL VERSION) sitting on a VM somewhere. The Team Coding feature is installed, and I can browse my TFS projects. What I can't do, however, is connect to TFS through the Logon in TOAD because it won't allow me to click 'OK' when I am attempting to select a namespace.
It was my understanding that the trial had been fixed to allow for this to happen. I couldn't find anything on their website, so I was curious if anyone knew the answer as to why I can't do this.
This only applies to Toad for Oracle.
You should be able to Log in to TFS with the Trial Version. If you can browse TFS Projects in Toad, you should be already logged in to TFS correctly.
The most likely reason that the button is disabled, is that you are attempting to logon to a remote workspace. I am assuming you can see your local WorkSpaces (Namespaces ?) in the Logon Window. Does the word (Remote) appear in parentheses next to the workspace name. If this is the case, then you are selecting a remote workspace. This workspace was set up for a different machine.
You will need to select or set up a workspace that was created for this machine. The quickest way to test this is to select 'New' from the workspace selection and create a new workspace mapped to a local folder (you can always delete later). Then you should be able to log in to TFS.
Hope this helps
P.S
We do not typically monitor postings on StackOverflow, so if you might want hop on over to the Toad Yahoo Groups with any follow up questions

Sqldeveloper 2.* had handy Data Modeler - is there anything similar in Sqldeveloper3.*

Sqldeveloper 2.* had a very good tool to view database schema. here is the screen-shot of how it can be launched:
Was this tool removed from SqlDeveloper 3.* and is there something similar there?
P.S. I tried googling and reading manuals for some time, of course.
The latest versions of SQL Developer still have the data modeler.
http://www.oracle.com/technetwork/developer-tools/datamodeler/overview/index.html
here's a link that shows you, I use it almost daily in the latest version of sql developer (or at least 3.1.07 that I am using -->whoa they've updated to 3.2 I'll go get that later)
you can still goto Tools->Data Modeler but you can also OPEN and SAVE the datamodeler via the File->Data Modeler context menus (it seems to have been 'combined' with SQL DEVELOPER to the point where you save it independently).
If you go to VIEW->Data Modeler->Browser you can then create models etc and save them via the aforementioned menu item in SAVE.

Crystal Reports 2008 doesn't show database tables / views that I know exist

I have a schema in an Oracle 11g R2 database that I'm trying to connect Crystal Reports.
I have two users; an admin user (where I create the views, etc.) and a reporting user that has the ability to query certain tables/views.
In any other database tool (SQL Developer, TOAD, DB Visualizer), I can see the schema along its tables and views, and can query against them and create new views, etc. as I should be able to.
However, in Crystal Reports 2008, when attempting to access the data, the proper schemas/views aren't displayed. Examples:
Creating an ODBC datasource in Crystal (which I believe connects to one I've pre-created in windows that works just fine), only a small subset of schemas are shown in Crystal (but not the one I should be able to see).
Creating an Oracle datasource in Crystal shows me the schema, and all of the tables I believe, but only one of the views (not the one I need).
NOTE: Normally I would think that it's a permissions issue on the database, except that I can access these schemas/tables/views properly from every other client I've tried.
Any ideas? Is it the drivers that Crystal 2008 uses? Is it still somehow possibly a permissions issue? I'd appreciate any insight you fine folks have.
Looks like this was indeed an error on our DBA's part. A certain level of "select" permissions in their permission model was preventing access. It appears to have been resolved.
But if anyone would like to help me gather all copies of Crystal 2008 in a warehouse and light them on fire, be my guest. :)
I've got a better one...
I was working with this for a long time today, trying to help one of our new developers. He had developed a report from a different workstation against a different data source, and we needed to swap the data source when we transferred it to the new network. Fired up CR, Showed him how to "Set Datasource Location", we get the account information, check the connection string, etc. Get ready to show him how to replace one db w/ another... find the connection, open the server, pop out the databases, open the database to show the tables and... Nothing. Hm...
Try a different account that I know works. Strange, THAT one doesn't see any tables either. Try a different database. OK, now I'm a little off-balance... Remote into the web server to see if I can run one from there. Fire up CR, Open an existing report, hit refresh, put the PW in, and voila! Data. Lots. Copy his report up, remote in, open it, get ready to Set Datasource Location, and ... nothing.
Spoke w/ the DBA, watched/walked him through the check, still nothing.
Funny thing was, if I had a report that had connected before, it would run. Wonderful! Check the available tables... nothing. Quick jump to look at the db... I can see the privileges, I can see everything set fine. Cool. Tried again, nothing.
OK, spoke to another DBA. I walk him through CR to show him the issue, he and I are going to explicitly set permissions. I open the data source in CR, right click to look at Properties, and... noticed that I hadn't check Options. Sinking feeling in the pit of my stomach. Open Options, and notice in the Data Explorer section, TABLES is not checked.
I remember WHY I set it... a long time ago. The DB has thousands of tables, and I knew which ones I needed. I paste a command and go, I never CHOOSE tables.
So... Check TABLES, and thousands of tables show up again. Sigh.
OPEN CRYSTAL REPORT THEN CLICK FILE -> OPTIONS -> SELECT TAB DATABASE -> IN THE EXPLORER OPTIONS PUT TICK MARK ON TABLES AND Onwer Like < add schema name> click ok
this will list only that schema. Crystal Report has some limit is loading all table names so select the scheme so that it will load only that schema.
thanks,
praveen.

SQL Stored Procedure Debugging in VS2010

I am attempting to debug a stored procedure in VS2010 using the Server Explorer and the "Step into stored procedure" menu item command.
The issue I am having is that when I right click on the stored procedure, the only options I have are Copy, Refresh and Properties. Is there anything I need to do to make the "Step into stored procedure" option appear?
SQL Debugging is enabled in the project properties for good measure.
The Step into option is available in my vs2005 installation.
You have to add the server / database to Visual Studio 2010 Server Explorer.
Then you'll be able to debug stored procedures.
This should work using VS10 Pro and MsSQL10R2, and have set up the MsSQL instance where the stored procedure lives in Server Explorer so that VS10 can connect to the same server instance your program connects to to execute its SP. Opening the Server Explorer and locating the SP, then right-clicking its name in the tree-view gives you this option.
Previous MsSQL versions supported SP debugging only in tools like Query Analyser, and then by standalone execution rather than as part of a running mixed-platform application program.
In VS10 one can also debug stored procedures on MsSQL9 this way, by standalone execution, by opening a SQL window, right-clicking and picking "Connection" from the pop-up window, and connecting to the server instance on which you wish to execute the query or SP. In the PL/SQL script representing the guts of the SP one can then set breakpoints.
(Note that this started out as a WAG: I've done it before and happend across this question while surfing for information to elicit enough recall that I didn't have to re-enact the entirety of the original train of thought. Then I revised the answer as I went along checking that what I thought worked worked.)
Have you tried to script out the stored procedure and open the sql file into your local or server SQL Server with Management Sudio? You will be able to set some PRINT flags and debug as per your needs. Hope this workaround works!.
check that you use data provider: ".Net Framevork DataProvider for SQL Server"

Resources