Tag Info

New answers tagged

1

You can derive this information easily by joining sys.tables.object_id = sys.objects.parent_object_id for those object types. DECLARE @sql NVARCHAR(MAX); SET @sql = N''; SELECT @sql = @sql + N' ALTER TABLE ' + QUOTENAME(s.name) + N'.' + QUOTENAME(t.name) + N' DROP CONSTRAINT ' + QUOTENAME(c.name) + ';' FROM sys.objects AS c INNER JOIN sys.tables AS t ...


1

I'm going to list a different option here, having come from a development background. At one point, we had developed a client/server application, where we wanted the DDL (for the most part) to be the same between the client and the server. The challenge was the client and the server used different database engines. So what we did was use XML. We defined all ...


4

The best way to support multiple database types is to optimize the sql statements for each on of them. Otherwise you will one day end up with huge performance problems on one or the other database types. Additionally to that it's unfair for your customers to tell them "I support Oracle, DB2, MSSQL, etc.) and not optimizing the SQL for each one of them. Why? ...


1

Test case. Open 2 sqlplus sessions, run the following in the first to set the test up: create table stall_table ( a number ); create or replace trigger stall_session before insert on stall_table begin DBMS_LOCK.sleep(10000); end; Then, execute in session 1: SQL> insert into stall_table values ( 1 ) ; Execute in session 2: SQL> create or ...


5

You can give VIEW DEFINITION at the object, schema or database level. GRANT VIEW DEFINITION ON dbo.objectname TO [user/role]; GRANT VIEW DEFINITION ON SCHEMA::schemaname TO [user/role]; GRANT VIEW DEFINITION ON DATABASE::databasename TO [user/role]; http://msdn.microsoft.com/en-us/library/ms173848.aspx



Top 50 recent answers are included