Schema

January 6, 2012 Leave a comment

use db

go

DROP SCHEMA [dim]
GO

To move an object into a schema use,

alter schema schema_name transfer schema.object;

for example,

alter schema dimension transfer dbo.customer;

Categories: GENERAL

Included Columns

January 6, 2012 Leave a comment

 

CREATE NONCLUSTERED INDEX [MIDX_include]
ON [dbo].[Logs] ([event_code])
INCLUDE ([parent_log_id],[session_id],[value],[datetime])
GO

 

Categories: GENERAL

Sharepoint

December 31, 2011 Leave a comment
  1. Windows Server 2008 x64 is required!  http://www.microsoft.com/download/en/details.aspx?id=8371 This is a link to download a free 60 day trial of windows server 2008. Be sure to chose the x64 option. 
  2. Check disk space amount you will need at least 50 GB just for the installation.
  3. Windows Server 2008 x64 service pack 2 must be installed prior to starting the prerec installation. http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17669 This is a link to download a free version.

Installations need to be on Windows Server 2008 64 bit servers and need about 50GB of diskspace.

ServerManager>Roles>ApplicationServer and Webserver(IIS) intall >ASP, CGI, IIS Manager 6.0.

Steps. (pre-reqs: Install MS Office and Silverlight)

1.Install SQL Server 2008 R2 64 bit with SSRS in Sharepoint Integration Mode.

2. Install Sharepoint Server.

-run prereq

-install sharepoint

-run wizard

-PLS Turn on and set to automatic for Application Manager in Services.

3. Install Sharepoint Designer.

SharePoint 3.0 error: cannot connect to configuration database

December 21, 2011 Leave a comment

http://support.microsoft.com/kb/823287 tells you:

This behavior occurs if one of the following conditions is true:

  • The SQL database is not running.
  • Internet Information Services (IIS) is configured to run in IIS 5.0 isolation mode.
  • The account that is used by application pool does not have the required permissions to the SQL Server database.
  • Network connectivity has been lost between the Windows SharePoint Services server and the Microsoft SQL Server server
These are great tips, useful and helpful, but what happens when none of that works? You know that SQL Server is working, IIS is not running in isolation mode, and there is conductivity between  Windows SharePoint Services server and the Microsoft SQL Server server and you still get that error. You can try one or both of the following restart IIS using the IIS Manager and/or update SharePoint using the SharePoint Products and Technologies Configuration Wizard. Both of these are located in the Administrative Tools window of Windows Server.

 

Categories: GENERAL

Collation

October 20, 2011 Leave a comment

Check collation with the following

SELECT * FROM fn_helpcollations() –Find details on all collations

SELECT   DATABASEPROPERTYEX('ADVENTUREWORKS','COLLATION') DBcollation
SELECT * FROM SYS.DATABASES --SEE DATABASE COLLATION details
If cross server/database queries are on different collations use
Collate Database_Default
Collation is used for sorting of data and applies to character data types. 
Collation is configurable at the server level, database level and column level. 
NB. There is no concept of Table level collation. 
Categories: GENERAL

SQL Server: User Options

USE [master]
GO
ALTER DATABASE [ABC] SET  SINGLE_USER WITH ROLLBACK IMMEDIATE
GO
USE [master]
GO
ALTER DATABASE [ABC] SET  RESTRICTED_USER WITH ROLLBACK IMMEDIATE
GO
USE [master]
GO
ALTER DATABASE [ABC] SET  MULTI_USER WITH ROLLBACK IMMEDIATE
GO
Categories: GENERAL

SQL Server: DBCC

 
exec sp_MSforeachDB 'DBCC CHECKDB (?) WITH ALL_ERRORMSGS, NO_INFOMSGS'
or

select 'dbcc checkdb ('  + name + ') WITH ALL_ERRORMSGS, NO_INFOMSGS'  from sys.sysdatabases
where name not in ('temp')

To list all the dbcc commands for reference.
DBCC help('?')
go
Categories: GENERAL
Follow

Get every new post delivered to your Inbox.