Archivo de la categoría: SQL Server
SQL Query for Counting Records per Day
This SQL query will add up the record count per day based on a column called “Timestamp.” Transact SQL SELECT DATEPART(YEAR, Timestamp) AS ‘Year’, DATEPART(MONTH, Timestamp) AS ‘Month’, DATEPART(DAY, Timestamp) AS ‘Day’, COUNT(*) AS ‘Visits’FROM tblVisitsGROUP BY DATEPART(DAY, Timestamp), DATEPART(MONTH, Timestamp), DATEPART(YEAR, Timestamp)ORDER BY ‘Year’, ‘Month’, ‘Day’ Results The results of this query will appear… Leer más »
Fixing a SQL Server That Wont Start Due To Max Memory Being Set Too Low
I recently came up against a SQL Server instance that wouldnt start, after going through the event log the reason it was having problems was that it had been set to a max memory of 10mb. At this point I was unable to change the max memory setting because I couldnt bring the instance online.… Leer más »
CREATE SYNONYM ( join multiple databases in tableau sql server)
CREATE SYNONYM [dbo].[tbl1] FOR [db1].[dbo].[tbl1] The above code, if run on db2, would create an object tbl1 which would behave as a table under the dbo schema in db2, but would actually reference [db1].[dbo].[tbl1]. If you are on 2000, then no, it’s fully qualified names or nothing, I’m afraid. Nota: –>Ubicarse en la base donde… Leer más »
SQL Server–HOW-TO: quickly retrieve accurate row count for table fast sql count
Rate This martijnh1 15 Jul 2010 1:24 PM 8 Recently, I’ve been involved in a very interesting project in which we need to perform operations on a table containing 3,000,000,000+ rows. For some tooling, I needed a quick and reliable way to count the number of rows contained within this table. Performing a simple SELECT… Leer más »
Suggested Max Memory Settings for SQL Server 2005/2008
Suggested Max Memory Settings for SQL Server 2005/2008 Posted on October 29, 2009 by Glenn Berry https://sqlserverperformance.wordpress.com/2009/10/29/suggested-max-memory-settings-for-sql-server-20052008/ It is pretty important to make sure you set the Max Server memory setting for SQL Server 2005/2008 to something besides the default setting (which allows SQL Server to use as much memory as it wants, subject to… Leer más »
SQL Home Database Administration HDDs, SSDs and Database Considerations
https://www.simple-talk.com/sql/database-administration/hdds,-ssds-and-database-considerations/ A technical journal and community hub from Red Gate Join Simple-Talk Sign in Home SQL .NET Cloud SysAdmin Opinion Books Blogs Forums SQL Home Database Administration HDDs, SSDs and Database Considerations Av rating: Total votes: 33 Total comments: 5 send to a friend printer friendly version HDDs, SSDs and Database Considerations 09 January 2013… Leer más »
Database Price
http://www.microsoft.com/sql/howtobuy/default.mspx Note: The retail price for Microsoft SQL Server 2005 Developer Edition is $49.95. Microsoft SQL Server 2005 Developer Edition may be installed and used by one user to design, develop, test, and demonstrate your programs. SQL Server 2005 Pricing Comparison: Retail versus Example Pricing Processor License Server plus User/Device CALs … Leer más »
CBT SQL 2005
Version de SQL SELECT @@VERSION
How to search all columns of all tables in a database for a keyword?
While browsing the SQL Server newsgroups, every once in a while, I see a request for a script that can search all the columns of all the tables in a given database for a specific keyword. I never took such posts seriously. But then recently, one of my network administrators was troubleshooting a problem with… Leer más »