Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error getting list of objects from db in SQL Server 2014

Tags:

sql-server

I am new to SQL Server 2014 and I was trying to generate data script from a database but I kept getting this error:

Error getting list of objects from db_name

The query for creating tables and inserting data was successful and generating schema script was successful too. I did some research and found this link.

I did turn auto close option off according to a guy's reply but it didn't work, I followed up on the link to another thread but there's nothing.

like image 704
fatg Avatar asked Mar 21 '16 02:03

fatg


People also ask

How to list all the objects in a SQL Server database?

SQL Server provides sys.objects system view that list all the objects from the database. SELECT * FROM sys.objects. Which will return all user-defined (tables, view, functions) and system objects in that database: To find desired SQL Server database objects, type the following:

How to search for invalid objects in SQL complete?

Selecting the “Find Invalid Objects” command in SQL Complete In the window that appears, click on the “Analyze” button in the upper left corner or the middle of the window: Img.3. Running the search for invalid objects Note that you can select multiple databases at once on the “Databases” panel: Img.4. Selecting multiple databases

How to find SQL Server database objects in Visual Studio?

To find SQL Server database objects in the Object Explorer panel via the query window, right-click on the name of the object in the query window and from menu choose the Navigate to object command: ApexSQL Search is add-in for database objects and text searching, which integrates with SSMS and Visual Studio.

How to find desired SQL Server database objects in adventureworks 2014?

To find desired SQL Server database objects, type the following: USE AdventureWorks2014 SELECT NAME AS ObjectName,schema_name (o.schema_id) AS SchemaName, type, o. type_desc FROM sys. objects o WHERE o. is_ms_shipped = 0 AND o. NAME LIKE '%Add%' ORDER BY o.


1 Answers

  1. Click on "Save Report" button
  2. Open the generated file and analyze the message regarding the error, this can give a clue on how to solve the problem.

In my case was that the sql output file was being used by another process. I closed the SQSMS, reopened and that's it.

like image 113
Amadeo Lara Avatar answered Oct 20 '22 03:10

Amadeo Lara