Rudy: An MCITP Today. Rudy: An MCM Tomorrow?
Rudy Rodarte is thinking about taking an MCM immersion class given by the good folks over at http://www.sqlskills.com. Continue reading Rudy: An MCITP Today. Rudy: An MCM Tomorrow?
Browsing Tag
Rudy Rodarte is thinking about taking an MCM immersion class given by the good folks over at http://www.sqlskills.com. Continue reading Rudy: An MCITP Today. Rudy: An MCM Tomorrow?
Reset and verify IDENTITY values in SQL Server using DBCC. Continue reading Reset an Identity Column in SQL Server
Everyone is worried about their database size. Even though storage is relatively cheap, if your database is growing linearly or exponentially, you’re going to run into issues down the road. One quick way to check things out is to look at your table sizes. I looked all over the web and found Mitch Sellers’ blog with several great SQL Table Size scripts. Here are 2 of the good ones from the comments: EXEC sp_MSforeachtable @command1=”EXEC sp_spaceused ‘?'” This method is quick, but not very clean. You’ll get a separate result for each table, so you really cannot sort. Plus, I … Continue reading Determine Tables Sizes in SQL Server
Use SQL Server DMVs to find a table’s IDENTITY Column. The SQL Server DMVs sys.objects and sys.columns contain valuable information that can identify IDENTITY Columns. Continue reading Use SQL Server DMVs to find a table’s IDENTITY Column
Learn about line breaks when creating dynamic SQL. Continue reading Incorrect syntax near ‘GO’ when creating Dynamic SQL
The other day, I needed to pull some data from an Oracle server on our network. The oracle server was set up as a linked server on my SQL Server 2005 machine. For some reason, the query didn’t work. Now, when working with an oracle linked server, you have to include the linked server name, the schema name and the table name. Also, you can use an alias just like any SQL Server table. But, the key thing is to include the schema and table name. The query looks something like this: select col1 from [OracleServer]..[schema_name].[table_name] For some reason, the … Continue reading Querying an Oracle linked server fails
Recently, I had a request to calculate the distance between 2 GPS coordinates. Now, the system I am working with is SQL Server 2005. SQL Server 2008 gives us the geography data type, which is great and has a lot of powerful features. But, if you’re using SQL Server 2000 or 2005, you won’t have access to any spatial data types. Now, the table i was working with had the city name along with the Latitude and Longitude information. So, I went over to wikipedia and got the formula for calculating distance using great circles. I won’t go into the … Continue reading Great Circles in SQL Server 2005 and SQL Server 2000