Why Don't You Guys Provide A Way To Find Out The Dependancies Of Any Object (SProc, Table, View And Etc...) Within SQL Server...
Nov 15, 2007
Why don't you folks (SQL SERVER Management Studio Team or SQL SERVER Database Engine Team) provide an option by using which I would be in a position to know what all the other objects are depended on a selected object and vice versa. That means:
When I select a Table within the SQL SERVER Management Studio if there is an option for understanding "Which all the objects (tables or views) it is depended on (I mean Foreign key and etc... kind of relations) and also Which all the objects (Tables, Views, Stored Procedures and etc...) are using this table", It would be of great help for all developers.
I can be contacted over kotis@microsoft.com
I BLOG @ http://blogs.msdn.com/kreddy
View 3 Replies
ADVERTISEMENT
Nov 19, 2013
How to find whether an object is used by any sp , view ?
I need a query which will result the sp , view names which uses the given object name .
View 6 Replies
View Related
Jul 5, 2007
Hey,
To reduce the load on my current server I wish to move a table which is being updated frequently by a static feed to an independant server.
Is there any way of moving a table with all of it's dependancies (Stored procedures and other tables) to another server without manually finding them all.
I'm very new to this as you can tell so if you require specifics let me know :)
Jim
View 2 Replies
View Related
Jun 20, 2007
Hi, in Management Studio I was able to view a list of dependancies for a table, both those Objects the table depended on, and Objects that depended on it; specifically a set of stored procedures. After modifying the table by adding several columns and updating the relevant stored procedures, the list of dependacies was gone. Once I executed the two stored procedures I had modified, they appeared in the list of dependancies for the table.
Originally there were more than two procedures listed as dependant on the table, but they only selected from the table based on a pre-existing column,so they didn't need to be modified when the additional columns were added. I suspect that the graph of dependacies is created when the stored procedures are compiled, but I'm not sure.
Is there any way to force the database to recalculate dependancies, or at least those for a specific table?
View 4 Replies
View Related
Jul 26, 2005
I tried all the INFORMATION_SCHEMA on SQL 2000 andI see that the system tables hold pretty much everything I aminterested in: Objects names (columns, functions, stored procedures, ...)stored procedure statements in syscomments table.My questions are:If you script your whole database everything you end up havingin the text sql scripts, are those also located in the system tables?That means i could simply read those system tables to get any informationI would normally look in the sql script files?Can i quickly generate a SQL statement of all the indexes on my database?I read many places that Microsoftsays not to modify anything in those tables and not query them since theirstructure might change in future SQL versions.Is it safe to use and rely the system tables?I basically want to do at least fetching of information i want from thesystem tables rather than the SQL script files.I also want to know if it's pretty safe for me to make changes in thesetables.Can i rename an object name for example an Index name, a Stored Procedurename?Can i add a new column in the syscolumns table for a user table?Thank you
View 4 Replies
View Related
Feb 7, 2007
I can't find 'SQL Server: SSIS Pipeline' performance object in performance monitor on a 64-bit SQL Server. I see it on a 32-bit. Does anybody know why?
Thanks
View 3 Replies
View Related
Dec 16, 2003
I have a SPROC that uses various VIEWs (passed into the SPROC from an ASP.NET dropdownlist), but I'm getting "Invalid Syntax near 'View name' " errors from the browser (IE) when I execute the dropdownlist.
It appears to me that it should work. The VIEWs run fine by themselves.
When I run the SPROC in Query Analyzer, I get the following error
Server: Msg 201, Level 16, State 4, Procedure Company_List_by_Filter, Line 0
Procedure 'Company_List_by_Filter' expects parameter '@Filter', which was not supplied.
I completely removed the control and rebuilt it (Using VisualStudio.NET 2003), but still have the same error.
VS builds the code without error.
Here's the code for the event handler:
private void Select_Filter_SelectedIndexChanged(object sender, System.EventArgs e)
{
SqlConnection myConnection = new SqlConnection("server=AMD;database=imSMART;Trusted_Connection=yes");
SqlDataAdapter myCommand = new SqlDataAdapter("Company_List_by_Filter", myConnection);
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;
myCommand.SelectCommand.Parameters.Add(new SqlParameter("@Filter", SqlDbType.VarChar, 150));
myCommand.SelectCommand.Parameters["@Filter"].Value = Select_Filter.SelectedValue;
//Arbitrary table name Company_List
DataSet ds = new DataSet();
myCommand.Fill(ds, "Company_List");
Select_Company.DataSource=ds.Tables["Company_List"].DefaultView;
Select_Company.DataBind();
}
Somehow the @Filter variable is not properly getting passed by the SPROC to the VIEW.
Anyone have any ideas why this is happening?
Thanks,
Paul
View 1 Replies
View Related
Jun 15, 2001
Hi guys,
I am trying to create a view through SP
as follows, but I am getting as error as Invalid syntax near view.
Please let me know where I am doing wrong.
Thanks,Rau
CREATE PROCEDURE PurgeReport
@intJob as int
AS
if @intjob=1
begin
CREATE VIEW Purge AS SELECT Btch_id AS Batch_ID, DLN, Process,End_DLN, Job,
Tcode
FROM Batch_HDR
end
View 2 Replies
View Related
Mar 24, 2004
Hi!
Sudenly I stoped being able to view sql server object properties in the visual studio properties window . When I selected an sql server object in the server explorer i could see its properties in the prop. window . Now I can't see them anymore, the properties window apears blank.
Can anyone tell what do I need to do to be able to view them again.
Thanks & Best Regards
Pedro Costa
View 3 Replies
View Related
May 9, 2005
I have a sproc in my database that when editing in VS 2003 shows different results.
The sproc code is:
ALTER PROCEDURE dbo.VMUsage_GetRaw
@VMBox nvarchar,@StartDate datetime,@EndDate datetime
AS
SET NOCOUNT ON
SELECT *FROM VMRawUsageWHERE (ACCOUNT = @VMBox) AND (CONVERT(datetime, DATE + ' ' + TIME) > @StartDate) AND (CONVERT(datetime, DATE + ' ' + TIME) < @EndDate)
When I open the SQL statement in the designer and run (and enter my parameters) I get a recordset returned, but when I just "Run Stored Procedure" and enter the same parameters I get no results. The same occurs when I run the sproc from my website (no results).
Any ideas what is happening between the two?
View 1 Replies
View Related
Aug 21, 2006
In the below sproc I want to create a view based on the incoming parameter, which is a date passed on from VB in the format 01-01-2006.
Yet getting that to work, seems quite a challenge.
I've been dabbling a bit with the sproc and QA, passing the date parameter to it in varous forms, using both single, double and triple quotationmarks and changing the parameter type to datetime.
I either wind up with a syntax error " Incorrect syntax near '01' " or " Unclosed quotation mark before the character string ".
Anyone have a guess at how to fix this issue?
Cheers, Trinsan
REATE PROCEDURE KONTROL_DRdobbeltrapportering
@rapdato as varchar
AS
if exists (select * from dbo.sysobjects where id = object_id(N'[KONTROL_vw_DRdobbeltrappbasis]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [KONTROL_vw_DRdobbeltrappbasis]
EXEC('
CREATE VIEW KONTROL_vw_DRdobbeltrappbasis
AS
SELECT Gramex_DW.dbo.Programhoved.[Rettet af DR],
Gramex_DW.dbo.Programlinie.Stationskode,
Gramex_DW.dbo.Programlinie.Udsendelsesdato,
Gramex_DW.dbo.Programlinie.[Udsendelses starttid],
Gramex_DW.dbo.Programlinie.Rapporteringsdato, Gramex_DW.dbo.Programlinie.Mediekode,
Gramex_DW.dbo.Programlinie.MUSANummer, Replace(Left(convert(varchar, [Gramex-ID]),11),''.'','''') AS GramexID,
Gramex_DW.dbo.Programlinie.Side, Gramex_DW.dbo.Programlinie.Tracknummer,
Gramex_DW.dbo.Programlinie.ISRC, Gramex_DW.dbo.Programlinie.Producentlandekode,
Gramex_DW.dbo.Programlinie.Spilletid, Gramex_DW.dbo.Programlinie.Minuttakst,
Gramex_DW.dbo.Programlinie.[Afregnet Station],
Gramex_DW.dbo.Programlinie.[Afregnet den],
Gramex_DW.dbo.Programlinie.[Afregnings ID], Gramex_DW.dbo.Programlinie.[Ur-opførelse],
Gramex_DW.dbo.Programlinie.Talestof, Gramex_DW.dbo.Programlinie.[Betalt af DR],
Gramex_DW.dbo.Programlinie.Kending, Gramex_DW.dbo.Programlinie.[Oprettelses ID],
Gramex_DW.dbo.Programlinie.[Oprettet den], Gramex_DW.dbo.Programlinie.[Oprettet af],
Gramex_DW.dbo.Programlinie.[Ændret den], Gramex_DW.dbo.Programlinie.[Ændret af],
Gramex_DW.dbo.Programlinie.[Eventuel delskæring], Gramex_DW.dbo.Programlinie.Plademærkenavn,
Gramex_DW.dbo.Programlinie.Katalogbetegnelse, Gramex_DW.dbo.Programlinie.Tracktitel,
Gramex_DW.dbo.Programlinie.Selskabsnummer, Gramex_DW.dbo.Programlinie.Indspilningsår,
Gramex_DW.dbo.Programlinie.Fonogramtitel, Gramex_DW.dbo.Programlinie.Plademærkenummer,
Gramex_DW.dbo.Programlinie.[Antal opførelser], Gramex_DW.dbo.Programlinie.[Rec nummer],
Gramex_DW.dbo.Programlinie.Indslagsnummer, Gramex_DW.dbo.Programlinie.[Afspillet gange],
Gramex_DW.dbo.Programlinie.[Afspillet minutter], Gramex_DW.dbo.Programlinie.Spilletidsløbenummer,
Gramex_DW.dbo.Programlinie.Pointtildelt, Gramex_DW.dbo.Programlinie.[Rettet af Gramex],
Gramex_DW.dbo.Programlinie.[Pgmkorlinie løbenummer], Gramex_DW.dbo.Programlinie.[Tape Kilde],
Gramex_DW.dbo.Programlinie.[Hoved artist], Gramex_DW.dbo.Programhoved.Produktionsnummer
FROM Gramex_DW.dbo.Programlinie
INNER JOIN Gramex_DW.dbo.Programhoved
ON (Gramex_DW.dbo.Programlinie.Stationskode = Gramex_DW.dbo.Programhoved.Stationskode)
AND (Gramex_DW.dbo.Programlinie.Udsendelsesdato = Gramex_DW.dbo.Programhoved.Udsendelsesdato)
AND (Gramex_DW.dbo.Programlinie.[Udsendelses starttid] = Gramex_DW.dbo.Programhoved.[Udesendelses starttid])
WHERE Gramex_DW.dbo.Programlinie.Rapporteringsdato >= ' + @rapdato + '
AND (Gramex_DW.dbo.Programlinie.Mediekode <> 1) AND
(Gramex_DW.dbo.Programlinie.Spilletid >= ''00:01:00'') AND (Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2'') AND
(Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2 ZULU'') AND (Gramex_DW.dbo.Programlinie.Stationskode <> ''TV2 CHARLIE''')
GO
View 2 Replies
View Related
May 1, 2015
best possible way to provide truncate table permission to a SQL Server Database user (ddl_admin role cannot be granted to the user in my case)
View 3 Replies
View Related
Feb 2, 2007
Hey,
I have a asp.net 2.0 app that has a sql server express backend. I have been scratching my head for weeks trying to find a good wasy to encrypt my connection string. I store the string in web.config (which in itself is in theory "safe" because it's not servable) and I have scoured the web to try to find a simple way to encrypt the connection string. Even using user store would require running aspreg_iis.exe on the host with a command prompt (which clearly I cannot do). It seems that everyone's solution requires running a command prompt executable on the server.
So I am left to wonder what everyone else does. I am not comfortable using just the web.config because a determined hacker could get to that info. Then again, a determined hacker could get into any system , I guess. There are no credit card #'s stored in this app, but in theory there must be a way. I run all access to the db through stored procedures with permissions, for whatever it's worth.
Thanks in advance!
David
View 3 Replies
View Related
Sep 28, 2007
Exec sp_depends I have learned today shows what tables are in a specific view or sp but im noticing it only shows the tables that are in that database. Is there a way to show all tables from all tables that are in that database.
View 6 Replies
View Related
Apr 3, 2007
Dear All,
Greets for the day,
This is the first time I am using SQL Server 7.0 on a bussiness machine, I need to apply password on the database, OS is windows XP professional, need u r help on this.
View 1 Replies
View Related
Oct 11, 2000
Does anyone know of a system SP to produce a listing of all tables and their dependancies and/or a list of all the stored procedures and their dependancies as opposed to looking at each one seperately?
Thanks!
View 1 Replies
View Related
May 20, 2007
I have a database that stores the information of a third party system. The system where the database is running has reached its performance and hardware upgrade limits. I don€™t want to separate the database objects in two different database servers. How can I add a second server to increase performance? A cluster will help me in this case? Or there is any other way to group servers for performance?
View 10 Replies
View Related
Mar 30, 2007
The overly complex MSDN library is proving virtually useless to me. To give you some background, I've programmed PHP / MYSQL websites, in-depth VBA programs for Excel and a bit of non-database work in various languages - I'm an amateur.
I've just bought a new PC (2g Ram, Core 2 Duo, Vista Home Basic) and would like to run Web Developer Exp, VB Exp and SQL Server 05 Exp.
Note. I have installed all three and run through Microsoft's video tutorial, until I hit a snag at the start of Tutorial 2. When try to create a new SQL Database in WebDev, an error saying either SQL Server is not installed or operating correctly (could Microsoft provide a more specific error or what????)
The questions Microsoft need to answer are:
1. What are the hardware requirements for SQL Server 05?
2. What are the operating system requirements for SQL Server 05?
3. What does IIS have to do with SQL Server 05?
4. How do you know if you meet the IIS requirements for running SQL Server 05?
5. Exactly what elements of SQL Server 05 are affected by different levels of IIS?
6. Can anti-virus or firewall software cause issues.
Please, some one from Microsoft respond.
View 5 Replies
View Related
Feb 4, 2005
I need to remove some login ID on a SQL2000 server, but it did not let me
because the login ID owns objects in one or more databases.
How can I find out what objects does the login ID own?
Thank you
View 4 Replies
View Related
Nov 8, 2007
I'm trying to identify the objects in master that the role public has select permissions on, but when I run this query, I get 4 results where the default schema is null and the major_id column does not correspond to any records in the sys.all_objects table. Where else can I look to find what objects these are. DBO is listed as the grantor.
I appreciate your help.
SELECT *
FROM SYS.DATABASE_PERMISSIONS P,
SYS.DATABASE_PRINCIPALS R
WHERE P.GRANTEE_PRINCIPAL_ID=R.PRINCIPAL_ID and
permission_name='SELECT' and class_desc='OBJECT_OR_COLUMN' and
r.name='public'
order by r.name desc
View 1 Replies
View Related
Aug 21, 2004
Hello,
How can I view content of an encrypted object in a database.
Thanks in advance,
Uday
View 3 Replies
View Related
Aug 5, 2003
Hi,
I wanted find the log information if anybody deleted my database or bojects in my server.
Is it possible we can able to find this details in my previous log or any sys tables ?
Thanks
View 4 Replies
View Related
Sep 17, 2014
I got an error that says to run DBCC CHECKTABLE, but I can't find what table it is. It gives the db id and page Id. I ran DBCC PAGE but I could not figure out what object is using that page. I posted the error and dbcc page results below. Also, Slot 74 is not missing. I could not find m_objId or AllocUnitId in any system tables . Also, I got the same error for this db several other times. When I ran dbcc checkdb I did not get any errors. This is a SQL 2012 db created by SharePoint.
Why is m_nextPage and m_prevPage = (0:0) ?
Does the m_type=3 change how a page is linked?
I found Type 3 – text mix page. A text page that holds small chunks of LOB values plus internal parts of text tree. These can be shared between LOB values in the same partition of an index or heap.
Error2 from log--
Message
The Database ID 7, Page (1:14002), slot 74 for LOB data type node does not exist. This is usually caused by transactions that can read uncommitted data on a data page. Run DBCC CHECKTABLE.
Message
Error: 7105, Severity: 22, State: 6.
[Code] ....
View 2 Replies
View Related
May 5, 2015
I'm trying to run an Insert on tables using a User Login but I keep getting the error above. I ran the insert using my own credentials and it worked. The User LOGIN in question has read & write permission to the database.
View 4 Replies
View Related
Jan 24, 2008
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider,
View 2 Replies
View Related
Apr 10, 2008
Hi,I have SQL Server Express Edition. I tried working out some ASP.NET Labs in my local system. Here is the link of the Virtual Lab which I tried. http://msevents.microsoft.com/CUI/WebCastEventDetails.aspx?EventID=1032286906&EventCategory=3&culture=en-US&CountryCode=USI recieve this error in my local system. An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)I tried working out solutions from various websites. But the no solution is effective. Could anyone help me in solving this issue.
View 1 Replies
View Related
Jul 18, 2007
A view I created won't show up in "views' in Object Explorer, but will only show up when I script for it (Select * from blah). It also won't go into the ODBC. why?
View 8 Replies
View Related
Nov 19, 2007
Hi,
I try to implement mirroring using certificate authentication.
When I do this query :
create certificate Principal_cert with subject = 'Principal certificate', start_date = '2007/11/01', expiry_date = '2020/11/01';
GO
Create endpoint endpoint_Princ state = started
as tcp(listener_port = 7024, listener_ip = all)
for database_mirroring (authentication=certificate Principal_cert, encryption = disabled, role = all);
GO
I have this error :
Msg 1088, Level 15, State 1, Line 1
Cannot find the object "Principal_cert" because it does not exist or you do not have permissions.
I have also noticed that the error does not occured when I try this in the master database.
So, I have two questions:
1. Why SQL server does not find a certificate that just been created ?
2. Should the certificate be in the master database or in the database being mirrored ?
Thanks for any help.
View 4 Replies
View Related
Jul 1, 2015
I recently updated the datatype of a sproc parameter from bit to tinyint. When I executed the sproc with the updated parameters the sproc appeared to succeed and returned "1 row(s) affected" in the console. However, the update triggered by the sproc did not actually work.
The table column was a bit which only allows 0 or 1 and the sproc was passing a value of 2 so the table was rejecting this value. However, the sproc did not return an error and appeared to return success. So is there a way to configure the database or sproc to return an error message when this type of error occurs?
View 1 Replies
View Related
Apr 29, 2014
I have table 'stores' that has 3 columns (storeid, article, doc), I have a second table 'allstores' that has 3 columns(storeid(always 'ALL'), article, doc). The stores table's storeid column will have a stores id, then will have multiple articles, and docs. The 'allstores' table will have 'all' in the store for every article and doc combination. This table is like the master lookup table for all possible article and doc combinations. The 'stores' table will have the actual article and doc per storeid.
What I am wanting to pull is all article, doc combinations that exist in the 'allstores' table, but do not exist in the 'stores' table, per storeid. So if the article/doc combination exists in the 'allstores' table and in the 'stores' table for storeid of 50 does not use that combination, but store 51 does, I want the output of storeid 50, and what combination does not exist for that storeid. I will try this example:
'allstores' 'Stores'
storeid doc article storeid doc article
ALL 0010 001 101 0010 001
ALL 0010 002 101 0010 002
ALL 0011 001 102 0011 002
ALL 0011 002
So I want the query to pull the one from 'allstores' that does not exist in 'stores' which in this case would the 3rd record "ALL 0011 001".
View 7 Replies
View Related
Mar 30, 2007
Hi,
I am wondering using transfer sql server objects task in a sub-package and feeding tableslist property from the parent package. which works fine.
problem :
I want to be able to change the name in the fly so if I have
TableA I want to copy it for the destination as TableB
is there any work arround this just using transfer sql server objects task.
Thanks
View 7 Replies
View Related
Apr 11, 2007
I'm getting the below error when attempting to copy a database. The view works just fine but the package keeps giving me the below error:
07 3:26:37 PM,4/11/2007 3:26:37 PM,0,0x,ERROR : errorCode=-1073548784 description=Executing the query "
CREATE VIEW [app].[vwbaseTransfer]
AS
Select a.app_id, a.app_year, u.first_name, u.middle_name, u.last_name, app_phoneAM, email, CONVERT(varchar(10), app_dob, 101) as app_dob, app_citizen,
CASE WHEN app_untilDate > GetDate() Then app_addr1 ELSE app_pAddr1 END AS app_addr1,
CASE WHEN app_untilDate > GetDate() Then app_addr2 ELSE app_pAddr2 END AS app_addr2,
CASE WHEN app_untilDate > GetDate() Then app_addr3 ELSE app_pAddr3 END AS app_addr3,
CASE WHEN app_untilDate > GetDate() Then app_addr3 ELSE app_pAddr3 END AS app_addr4,
CASE WHEN app_untilDate > GetDate() Then app_city ELSE app_pcity END AS app_city,
CASE WHEN app_untilDate > GetDate() Then app_state ELSE app_pstate END AS app_state,
CASE WHEN app_untilDate > GetDate() Then app_zipcode ELSE app_pzipcode END AS app_zipcode,
app_sex, app_racecode, app_accept_letter, app_acceptDate, app_orientation_date, app_ssn
FROM applicant a inner join uop_user u on u.id = a.app_id
where app_accept_letter is not null and app_acceptDate is not null
" failed with the following error: "Invalid object name 'applicant'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
StackTrace: at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer()
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
View 11 Replies
View Related
Sep 21, 2005
How can I determine when a sproc or table was last used?
I suspect that I have many obsolete tables and sprocs in my database but how can I find out for sure??
Thanks,
DL
View 5 Replies
View Related