Andrew Jackson
Forum Replies Created
-
AuthorPosts
-
March 16, 2016 at 12:03 pm in reply to: Deleting a Transaction Log File in SQL Server #1695 Score: 0
Yes, you can delete a log file but it is recommended that the file that you want to delete must be empty. You can delete a transaction log file with the help of SQL Server Management Studio also.
There are several benefits of a database snapshot in SQL Server. Here I have discussed some of them:
1. The database snapshots can be used in reporting services.
2. Works as a safeguards against administrative error.
3. Also can be used in managing the test database.
4. Can be used as mirror database that you can use for maintaining for availability purposes.Some limitations are like:
1. Snapshots are read-only.
2. specifications of the database snapshot files are not changeable.
3. You cannot attach or detach database snapshots.
To know more please go this one it may be helpful to you https://msdn.microsoft.com/en-us/library/ms175158.aspxFebruary 27, 2016 at 1:13 pm in reply to: How to convert SQL Server database to MS Access? #1381 Score: 0To export SQL Server Database to MS Access
- Right click the database name in SQL Server.
- Select Tasks >> Export data
- Press Next
- From Choose a Destination screen. Use the Destination drop down to select MS Access.
February 25, 2016 at 1:16 pm in reply to: SQL Server error cannot open database requested by the login #1192 Score: 0This error generally happens when users configured an asp.net application to IIS, and IIS tries to gain access (login) with improper permission.
To fix this error
- Open SQL Server Management Studio >> Security >> Logins (right click on the user) >> Properties
- On Login Properties window, click on User Mapping from the left pane.
- Under Users Mapped to this login: select the database and from the lower screen (Database role membership for: Database) check db_owner role and click ok
February 18, 2016 at 1:20 pm in reply to: How to change the database location in SQL Server? #1117 Score: 0To change the path of an existing database
- Issue an ALTER DATABASE … MODIFY FILE command
- Stop the SQL service
- Move the database files to a new location
- Restart the service
February 13, 2016 at 1:07 pm in reply to: How to Recover SQL Server Database from SUSPECT Mode #1105 Score: 0First of all make sure that you do not detach suspected database
Then execute the following query:EXEC sp_resetstatus 'DatabaseName'; ALTER DATABASE DatabaseName SET EMERGENCY DBCC checkdb('DatabaseName') ALTER DATABASE DatabaseName SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB ('DatabaseName', REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE DatabaseName SET MULTI_USER
February 4, 2016 at 1:18 pm in reply to: How to change the database location in SQL Server? #1096 Score: 0Open SQL Server Management Studio and right click on the SQL Server Instance. From popup menu, click on properties
From server properties dialog box, select a database setting, then change the default database location and click ok.
You need to restart the SQL Server Services to come change into effectJanuary 29, 2016 at 12:23 pm in reply to: How Can I Check Free Space in My SQL Server Database? #1067 Score: 0You can also use FILEPROPERTY to check for free space in a SQL Server database
USE AdventureWorks GO SELECT DB_NAME() AS DbName, name AS FileName, size/128.0 AS CurrentSizeMB, size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS INT)/128.0 AS FreeSpaceMB FROM sys.database_files;
This will show how much space is used by SQL Server database and then you can calculate free space
January 18, 2016 at 1:20 pm in reply to: How do I open Microsoft SQL Server Management Studio? #1047 Score: 0- Click Start button
- Click on the “Run” option and run the following command:
ssms.exe
hope this will help you out
To change the name of the physical file you have to take the SQL Server database Offline
- Open SQL Server Management Studio
- Right-click on Database which you want to rename
- Click on Tasks
- Then select Take Offline
Change the name of the physical files at the OS level and then Bring the database Online.
Execute the following script to rename the database
USE master; GO EXEC sp_dboption MyDatabase, 'Single User', True GO EXEC sp_renamedb ' MyDatabase', ' MyDatabaseNew’ GO EXEC sp_dboption MyDatabase, 'Single User', False GO
December 19, 2015 at 1:30 pm in reply to: How to Check Active Transaction in SQL Server? #1006 Score: 0The
select @@TRANCOUNT
will help you to check active transactions in SQL ServerDecember 19, 2015 at 12:17 pm in reply to: How to enable and disable trigger in SQL server #1005 Score: 0To disable / enable selective triggers…
ALTER TABLE tableName DISABLE TRIGGER triggername ALTER TABLE tableName ENABLE TRIGGER triggername
To disable / enable all triggers…
ALTER TABLE tableName DISABLE TRIGGER ALL ALTER TABLE tableName ENABLE TRIGGER ALL
December 12, 2015 at 12:49 pm in reply to: How to Create a Full Database Backup in SQL Server ? #998 Score: 0Thanks Stephen West for the script, it helps me a lot, but I also want to know can i create a backup of the database from SQL Server Management Studio
December 10, 2015 at 12:17 pm in reply to: How to fix ”Named Pipes Provider, error: 40” in SQL Server #993 Score: 0Just enabled TCP/IP, VIA, Named Pipes in SQL Server Configuration manager
December 9, 2015 at 6:35 am in reply to: How to move multiple NSF files to single NSF file? #987 Score: 0Thanks Lincoln,
I had gone through the demo version and yes there is a separate option to “Remove Duplicate Folders”,
Now I am eagerly looking forward to using this utility.December 8, 2015 at 10:03 am in reply to: How to move multiple NSF files to single NSF file? #985 Score: 0Hi Lincoln,
Can the utility, which is mentioned by you, prevent duplicity? Since my account inbox contains duplicate mails & information and I don’t require it to repeat in a single file. Thus, I want a solution for the same.December 7, 2015 at 6:21 am in reply to: How to move multiple NSF files to single NSF file? #981 Score: 0Hi buddy,
I have been working for my enterprise since last 2-3 years and we are using Lotus Notes database to store all the account related information.
As the mail client I am using creates the archive account to months, hence many NSF files had been created of my account having different folders. This situation leads to cumbersome task to access the data in those files by opening them one by one which is very time consuming.
Secondly, the search options can’t be used efficiently if there are many files of the same user account which is different for inbox, calendars, events etc.
So, is there a solution to combine all my NSF Archive Database to a single file. I am in dire need to have a solution as it will ease my work.December 2, 2015 at 6:24 am in reply to: how to remove secondary transaction log file? #965 Score: 0Use the DBCC SHRINKFILE with the EMPTYFILE argument command
dbcc ShrinkFile ('logical_file_name', EmptyFile)
November 24, 2015 at 8:15 am in reply to: Move table form one database to another database in SQL #917 Score: 0Try this:
SELECT * INTO DestinationDB..MyDestinationTable FROM SourceDB..MySourceTable
It will not copy constraints, defaults or indexes.
-
AuthorPosts