Is IS_ROLEMEMBER available in SQL Server 2012 or 2008R2 - sql

Are these functions available in SQL Server 2012 or older?
select IS_ROLEMEMBER ('db_owner');
select IS_SRVROLEMEMBER ('sysadmin');
I can not find any compatibility information in the online documentation here: https://learn.microsoft.com/en-us/sql/t-sql/functions/is-rolemember-transact-sql?view=sql-server-ver15

Is_RoleMember was introduced in SQL Server 2012.
Is_SrvRoleMember was introduced in SQL Server 2005 itself.
You can see when a particular feature was introduced by going through below links. These changes are coming under Database Engine Enhancements => Database Engine Security Enhancements
What is New in SQL 2005
What is New in SQL 2012
To see all the historical information about SQL Server versions, below link is very helpful: https://www.sqlshack.com/history-sql-server-evolution-sql-server-features/

Related

What is the difference between MSSQL and TSQL?

MSSQL and T-SQL are often thrown around as interchangeable synonyms on the web.
I know that T-SQL is a flavor of SQL used in many Microsoft products. Is MS-SQL actually another flavor of Microsoft owned SQL or is it just an umbrella term used by the Microsoft’s marketing department to refer to their server database solutions?
As a side question, what flavor SQL, if any, does MS Access use?
MS SQL is simply a short version of the (complete) product name Microsoft SQL Server. (Similar to "MS Office", "MS Windows" or "MS Access").
T-SQL is the SQL dialect that the product Microsoft SQL Server is using - and is short for "Transact-SQL" (thanks Aaron for reminding me!)
I wouldn't call the dialect that Microsoft Access is using SQL. It's a query language that somehow resembles SQL
The MS SQL Stands for ( Microsoft SQL). This is the product of Microsoft which they released MS SQL 2005, 2008 and recently released 2012.
T- SQL stands for Transact SQL. This is the syntax of writing the expression in the sql database. You can write T- SQL statments in MS SQL Server Database
Link to Refer

Replication from SQL Server 2005 to SQL Server 2012

I was wondering if there are any problems with having a SQL Server 2012 replication publisher together with some SQL Server 2005 replication subscribers?
Does anybody have some documentation from Microsoft regarding this?
I'm asking because a colleague of mine keeps telling us that it will not work.
Does it also go the other way around? (2012 = Subscriber & 2005 = Publisher)
Thanks
Zarkos
Depends on the type of replication that you're using...
From MSDN:
A Subscriber to a transactional publication can be any version within two versions of the Publisher version. For example: a SQL
Server 2005 Publisher running can have SQL Server 2012 Subscribers;
and a SQL Server 2012 Publisher can have SQL Server 2005
Subscribers.
A Subscriber to a merge publication can be any version less than or equal to the Publisher version.

How to get star query optimization in SQL Server 2005

I have a star schema but SQL Server 2005 always uses the clustered indexes to access a table. What parameters do I have to set to enable this optimization.
According to http://blogs.msdn.com/sqlqueryprocessing/archive/2007/04/09/how-to-check-whether-the-final-query-plan-is-optimized-for-star-join.aspx and the DWH datasheet of SQL Server 2005 both claim, that SQL Server 2005 support this feature.
What edition do you use? IIRC star query optimization is ONLY in the enterprise version of SQL Server 2005.

T-SQL - create partition function and scheme - SQL Server 2008

I am creating partition function and schemes.
In SQL Server 2008, it only defines range partitioning and not list partitions.
Dont we have list partitioning in SQL Server?
I am using SQL Server 2008 Enterprise edition.
There is no List Partitioning in SQL Server 2008. But you can fake it into creating one using the LEFT clause.
Read up here:
http://www.sqlservercentral.com/articles/partition/64740/

SQL Server 2000 vs SQL Server 2008 Query Performance

I'm working with a client who had a SQL Server 2008 converted from a SQL Server 2000 DB and one of the queries has quite dramatically increased in time since it was on SQL Server 2000.
However, if I change the compatibility level to 2008 in the DB, the query goes like a rocket (40-50 times faster).
The query does use a number of UDFs.
My questions:
- are there issues with running SQL2000 compatibility in SQL Server 2008
- has SQL Server 2008 improved the performance when using UDFs?
There are some other things you might want to do after upgrading. See the "After upgrading..." section here: http://msdn.microsoft.com/en-us/library/bb933942.aspx