Archive for the ‘SQL Server’ Category
Thursday, March 13th, 2008
To be able to backup databases to a network share, the MSSQLSERVER service needs access to the location on the network.
For this you need to change the SQL services service account.
Before doing this you'll need to give that user extra permissions, to accomplish this you can add the user to ...
Posted in SQL Server, Windows Server 2003 | No Comments »
Wednesday, August 15th, 2007
To transfer sql server jobs from sql server 2000 to sql server 2005 you can use SQL Server Business Intelligence Development Studio.
1. Click file -> new -> project to create a new Integration Services Project
2. Click view -> toolbox so you can see an overview of all the items
3. From ...
Posted in SQL Server | No Comments »
Wednesday, July 25th, 2007
Perform this query to change the logical filename of both the data and logfile of you database.
USE MASTER
GO
ALTER DATABASE MyDatabase
MODIFY FILE
(NAME = <DBFileName_DATA>, NEWNAME='NewDBFileName_Data')
GO
ALTER DATABASE MyDatabase
MODIFY FILE
(NAME = DBFileName_Log, NEWNAME='NewDBFileName_Log')
GO
Posted in SQL Server | No Comments »
Wednesday, July 25th, 2007
By using the stored procedure MSforeachtable it's possible to perform the ALTER SCHEMA sql statement for all tables in a given database.
To change the schema for all tables this would look like:
exec sp_MSforeachtable "ALTER SCHEMA new_schema TRANSFER ? PRINT '? modified' "
Which would look like this if you want to ...
Posted in SQL Server | No Comments »