Questions tagged [sysobjects]

31 questions
1
vote
1 answer

How to generate a syso-file for Go in a windows pipline on Azure DevOps

I want to use a syso-file by go build to set an icon for my executable. Everything works fine on my win10 notebook, but when I use the same syso-file (checked in with git lfs) with ubuntu-latest or windows-latest I get this…
hdev
  • 6,097
  • 1
  • 45
  • 62
1
vote
2 answers

sql to find database of a table mssql

I am working on a project that has multiple contexts because data are being pulled form different databases. We have around hundreds of databases, 1 database have hundreds of tables too, so going through a lot of databases are there to find a table…
user742102
  • 1,335
  • 8
  • 32
  • 51
1
vote
2 answers

How does one select the server name in a sys objects query

In T-SQL, I am trying to do something like :- select * from [server_name].dbo.sys.objects but I keep getting the error 'Invalid object name..' I ultimately want to compare all the databases of the two servers (something like the…
heyNow
  • 866
  • 2
  • 19
  • 42
1
vote
2 answers

sys.objects [name] column is not consistent with object name in definition (stored procedure name)

Last week, as a part of one requirement, I wrote a script to generate object definition for all database objects. While testing, I found that for few stored procedures, [sys.objects].name was not matching with name in actual object definition (as…
1
vote
1 answer

MS SQL Server - Database Sysobject table missing permissions?

I'm going trying to fix an issue that is burning and I've spent the last day without success. I have a database server running SQL Server 2008, one database and one stored procedure. The stored procedure logic contains the following sentence: IF…
G21
  • 1,297
  • 2
  • 18
  • 39
1
vote
1 answer

Object type of function mistakenly displayed as 'P'-procedure in Sybase IQ

I'm trying to debug some custom code over Sybase IQ DB objects depending on object type. When I reached 'Function' type something strange happened. Code below creates DB object of type 'P'-procedure instead of 'F'-function: create function…
0
votes
1 answer

ODBC query against sysobjects does not return user defined objects

I'm running the following query SELECT * FROM sysobjects WHERE type = 'P' ORDER BY name against several SQL Server 2019 databases using ODBC. For one of the databases the query refuses to return user defined objects over ODBC. It returns all…
0
votes
1 answer

In LinqPad, querying Databases in LinqPad 6 and 7

In LinqPad 5 the following code example works very well for accessing information for databases which includes information such as Recovery Model, encryption status and other useful information for a DBA. This is using Linq to SQL for the SQL…
Brad
  • 62
  • 4
0
votes
4 answers

How do I map the id in sys.extended_properties to an object name

When we codegen our CRUD stored procs, we add an extended property that indicates the table they are based on. I want to be able to interrogate sys.extended_properties to get a list of procs that depend on a given table, but extended_properties…
Rikalous
  • 4,514
  • 1
  • 40
  • 52
0
votes
1 answer

Looking to see how many sysobjects uses tables from a particular database

Looking to see how many sysobjects uses tables from a particular database. I am running a query in sysobjects in DB (and ssis packages) to confirm how many object we would need to review before we embark.. is there a way to identify tables used…
suki
  • 63
  • 6
0
votes
2 answers

SQL Server stored prcedure definition is different with sys_modules.definition

I have 10 stored procedures they are different with their definition in sys_modules. I find them with this query: select b.definition, a.name from sysObjects a left outer join sys.sys_modules b on b.id = a.object_id where …
0
votes
1 answer

Table sysobjects has changed or does not longer exist after SQL Server 2005. What is the equivalent?

I am looking at a report for upgrade compatability on sql server and seeing the following error: Table sysobjects has changed or does not longer exist after SQL Server 2005. Using it may cause errors. For more details, please see: Line X, Column…
otc
  • 694
  • 1
  • 9
  • 40
0
votes
1 answer

Find any hard coded values in SQL Server

I need to identify any objects in a database containing "scenarioID" that has hard coded value. I am looking to identify following cases: scenarioId = XX (two digit value) scenarioId=XX (two digit value) scenarioId= XX (two digit…
NonProgrammer
  • 1,337
  • 2
  • 23
  • 53
0
votes
1 answer

SQL User Cannot Select Objects from sysobjects where UID = User

I'm working with a legacy system that attempts to execute schema changes in SQL for specific users by first querying sysobjects as that user to determine if the object exists. If it does it creates an ALTER VIEW statement otherwise it creates a…
0
votes
1 answer

Moving from dbo.sysobjects to sys.tables in sp_ procs

I used to write database-agnostic stored procedures by creating them in master with the sp_ prefix and referring to dbo.sysobjects, which at runtime would bind to whatever database I happened to be in. eventually I tried to migrate my code to use…
ekkis
  • 9,804
  • 13
  • 55
  • 105