How to calculate size of a folder located on different machine(Remote) in sql server 2008?
DECLARE @TenantId UNIQUEIDENTIFIER ='A79ED820-2E5E-4A9D-B930-B7597DC97081'
DECLARE @BusinessName VARCHAR(200)
declare @line varchar(255) =''
declare @path varchar(255)=''
declare @command varchar(255)=''
DECLARE @folderSizeGB decimal (16,8) = 0
DECLARE @AttachmentDiscSpaceUsed decimal (16,8) = 0
-- Code to calculate folder size in GB BEGINs
IF OBJECT_ID('tempdb..#temp') IS NOT NULL
drop table #temp
create table #temp (line varchar(255))
--set @path = '\\ewp-dev18\\c$\\Attachments\\' + CONVERT(varchar(50),@tenantId)
set @path = '-S ewp-dev18 -E -i ewp-dev18\\c$\\Attachments\\' + CONVERT(varchar(50),@tenantId)
set @command = 'dir "' + @path +'"'
insert into #temp
exec master.dbo.xp_cmdshell @command
select
@line=
ltrim(replace(substring(line, charindex(')', line)+1,
len(line)), ',', ''))
from #temp where line like '%File(s)%bytes'
SET @line=
(Case WHEN @line IS NULL or @line ='' THEN '0' ELSE @line END)
set @folderSizeGB = Cast(Replace(@line,'bytes', '') as decimal)/1073741824
if (@folderSizeGB is null )
set @folderSizeGB =0
SET @AttachmentDiscSpaceUsed = @folderSizeGB
SET @path=''
SET @command=''
SET @line=0
-- Drop #temp table
IF OBJECT_ID('tempdb..#temp') IS NOT NULL
drop table #temp
-- Code to calculate folder size in GB ENDs
hello RSingh,
Once again thanks for your cooperation,
I applied the script you posted, but it is not giving me the size of the folder which is located at a remote machine. Please note the " I need to calculate the size of the folder which is located at a remote machine".and when i applied its path in your script,
it raises "Access is denied" error message.
My path is - '\\ewp-dev18\c$\Attachments'
EXEC getFileProperties '\\ewp-dev18\c$\Attachments'
and this folder does not have any sub folders, it contains only some txt files, image files or some doc files. so no issue of sub folder.
and about my remote server 'ewp-dev18', i have all access and rights, but still raising "Access is denied". why?
do i need to pass any login credential with it ???
Similar Messages
-
I am using Excel source which uses Microsoft ACE 12.0 OLE DB provider, this only allows the first 255 columns to be imported and not the rest.
I need to export all the columns into the table .
Any pointers to this is greatly appreciatedIf you can use third-party solutions, check the commercial COZYROC Excel adapters:
Excel Connection Plus Manager
Excel Source Plus
Excel Destination Plus
Excel Task
The enhanced components can be used both under 32bit and 64bit modes and doesn't exhibit the 255 columns limitation.
SSIS Tasks Components Scripts Services | http://www.cozyroc.com/ -
How to Configure Remote Connections To SQL Server 2008 R2 Express
Post written June 10, 2010 and pertains to:
SQL Server 2008 R2 Express on both my server and local machines: SQLX_SRV,
SQLX_LOC
SQL Server 2008 R2 Management Studio on both my server and local machines:
MS_SRV, MS_LOC
Windows Server 2008 R2 Enterprise installed on a Hyper-V VPS: WS
SQL Server Configuration Manager on both my server and local machines:
CMGR_SRV, CMGR_LOC
Server Manager: SMGR
I am connecting to my hosting server via Remote Desktop Connection: RDC
I installed SQLX_SRV and MS_SRV on my hosting server and SQLX_LOC and MS_LOC on my local development machine. I am able to use MS_LOC to connect to SQLX_LOC and to use MS_SRV to connect to SQLX_SRV. However I am not able to use MS_LOC to connect
with SQLX_SRV. Here's what I have done so far:
SMGR -> Configuration -> Windows Firewall to turn off the Windows Firewall for Domain, Private and Public profiles. Obviously I'll change this later, but until I can connect I want to remove as many variables as possible.
CMGR_SRV -> SQL Server Services to confirm that both SQL Server (SQLEXPRESS) and SQL Server Browser services were running.
CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS to ENABLE the Shared Memory, Named Pipes, and TCP/IP protocols and DISABLE the deprecated VIA protocol.
CMGR_SRV -> SQL Server Network Configuration -> Protocols for SQLEXPRESS -> double click TCP/IP to open the TCP/IP properties dialogue. On the Protocol tab Enabled: Yes, Keep Alive: 30000, changed Listen All to No. I've tried it both
ways, but I've got six IP addresses on my server and I wanted to configure SQLEXPRESS to listen to only the first and primary IP. On the IP Addresses tab went to IPALL and cleared the TCP Dynamic Ports field and entered 1433 in the TCP Port field.
For my first and primary IP Address I made sure that Enabled was Yes, I cleared the TCP Dynamic Ports field, and entered 1433 in the TCP Port field. For all other IP Addresses Enabled was set to No and I cleared both the TCP Dynamic Ports and TCP Port
fields.
CMGR_SRV -> SQL Server Services -> SQL Server (SQLEXPRESS) right click and Restart. This of course stopped and restarted my instance of SQLX_SRV enabling the TCP/IP configuration in the previous step to take effect.
On my server, SQLX_SRV is the only instance of SQL Server running and so it's easy to hard wire it to the default port 1433.
The instance name for both SQLX_SRV and SQLX_LOC is the default "SQLEXPRESS". My server machine name is "SERVER1" on the EnglishBrains.com domain. So the proper local name (local within the context of my remote server as connected via RDC) for
my instance of SQLX_SRV would be:
SERVER1\SQLEXPRESS
Note the use of a backslash NOT a forward slash.
Of course to connect remotely from my development machine, which is not on the same domain as my hosting server, I would need to specify the domain as well, so the SQL Server name becomes:
SERVER1.EnglishBrains.com\SQLEXPRESS
I must also use SQL Server Authentication. Before I can use such a remote connection, however, there are still several configuration steps required. So on my server (connected via RDC) I used MS_SRV to connect to SQLX_SRV using SERVER1\SQLEXPRESS
for the server name and Windows Authentication. Once connected I performed the following steps:
MS_SRV -> right click the connected parent SERVER1\SQLEXPRESS instance node at the top -> Properties -> Security -> Server authentication: select "SQL Server and Windows Authentication mode". This will enable connections using either type
of authentication.
Next, leaving the Server Properties dialogue open, Connections -> check "Allow remote connections to this server" box.
Click OK to save these changes and close the Server Properties dialogue.
MS_SRV -> Security -> right click Logins and select "New Login...", the Login - New dialogue opens.
On the General page Enter a name for your new login
Select SQL Server Authorization
Enter and confirm a password
Uncheck Enforce password expiration
Select the default Database and Language
On the ServerRoles page Public will be checked, also check SysAdmin. This is probably not a good idea and I'll uncheck this as soon as I can connect to the SQLX_SRV.
On the User Mapping page select the databases you want your new Login to access and enter the Default Schema of "dbo".
At the bottom of the User Mapping page you'll see the Database Roles table. Public will be selected by default. Also select db_Owner. Again this is probably not a good idea, and I'll refine this once I can connect.
On the Status page confirm that "Grant" is checked under "Permission to connect to database engine" and "Enable" is checked under "Login".
Click OK to save all changes and close the Login - New dialogue.
With these steps completed you should now be able to use MS_SRV to connect to SQLX_SRV using SQL Server Authentication by supplying the name and password for your new Login. I tried this and it worked fine. Next I tried to use this same login
remotely, that is I went to my local development machine and used MS_LOC to try and connect to SQLX_SRV by using
SERVER1.EnglishBrains.com\SQLEXPRESS
and opting for SQL Server Authentication and supplying the name and password of my new login.
THIS DID NOT WORK?? Instead I get the following error message:
Cannot connect to SERVER1.EnglishBrains.com\SQLEXPRESS.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
For help, click:
http://www.microsoft.com/products/ee/transform.aspx?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1
If you follow the suggested help link, you are told:
The SQL Server client cannot connect to the server. This error could be caused by one of the following reasons:
A specified SQL Server instance name is not valid.
The TCP, or named pipes protocols are not enabled.
The firewall on the server has refused the connection.
The SQL Server Browser service (sqlbrowser) is not started.
WRONG on all 4 counts! The instance name IS valid. Both TCP/IP and Named Pipes protocols are enabled. The firewall has been shut down, so it is not relevant. Finally the SQL Server Browser IS started.
The next thing I tried was to circumvent discovery by the SQL Browser service by using the following syntax to specify the IP address and port directly when specifying the SQL Server name.
tcp:68.71.134.186,1433
Using this in the Server Name field I was able to use MS_SRV to successfully connect to SQLX_SRV (using SQL Server Authentication of course) with or without the SQL Browser service running.
However when I tried to connect from MS_LOC to SQLX_SRV using this same login (WITH SQL Browser service running just for good measure) it does not work?? I get the following error message:
Cannot connect to tcp:68.71.134.186,1433.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider:
TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=10060&LinkId=20476
If you follow the help link you are told:
"The SQL Server client cannot connect to the server. This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections."
However, the firewall has been shut down and the server HAS been configured to accept remote connections!
I confirmed that i could indeed Ping to 68.71.134.186 and running NetStat -a |find /i "listening" on the server shows that the server is indeed listening at 68.71.134.186 Port 1433 -- which is why I was able to connect to SQLX_SRV using MS_SRV with
tcp:68.71.134.186,1433 .
IN SUMMARY: Even though I can connect to my SQLEXPRESS instance multiple ways from the server itself, I cannot connect remotely from my development machine!
If anyone can help me figure out why I would be very, very grateful!My two cents to help you out on c# code example to configure the remote sql server express.
Hope it helps. It works, but you have to be extra carefull to read it all and setup the server configuration and netsh commands; also the port fowarding on the router.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace sqlremoteconnection
class Program
static void Main(string[] args)
// this is the local sql server connection
// 192.168.1.101\SQLEXPRESS
// now, the configuration for remote access:
// activate SQL SERVER BROWSER - set it to start "automatic"; then START UP
// SQL Server Configuration Manager
// --> SQL SERVER BROWSER -> properties -> Service -> Start Mode -> automatic -> apply
// --> Log On -> Start -> Ok
// netsh firewall set portopening protocol = TCP port = 1433 name = SQLPort mode = ENABLE scope = all profile = CURRENT
// netsh firewall set portopening protocol = UDP port = 1434 name = SQLPort mode = ENABLE scope = all profile = CURRENT
// netsh advfirewall firewall add rule name = SQLPort dir = in protocol = tcp action = allow localport = 1433 remoteip = any profile = PUBLIC
// netsh advfirewall firewall add rule name = SQLPort dir = in protocol = udp action = allow localport = 1434 remoteip = any profile = PUBLIC
// VERY IMPORTANT FOR REMOTE ACCESS: you have to add the rules on port fowarding
// on the router!!!
// TCP: 1433
// UDP: 1434
// or just a personal port like TCP 31433/UDP 31434
// read carefully the netsh commands above
// server name: 123.132.24.177\SQLEXPRESS
// server name: anyurl.myftp.org\SQLEXPRESS,1433 <<-- regular port
// server name: anyurl.myftp.org\SQLEXPRESS
// server name: anyurl.myftp.org\SQLEXPRESS,31433 <<-- WOW different PORT here!!!
SqlConnection myConnection = new SqlConnection(
"user id=sa;" +
"password=password_goes_here!;" +
"server=anyurl.myftp.org\\SQLEXPRESS,31433;" +
//"Trusted_Connection=no;" +
"database=database_name_here; " +
"connection timeout=30");
try
myConnection.Open();
catch (Exception e)
Console.WriteLine(e.ToString());
try
SqlDataReader myReader = null;
SqlCommand myCommand = new SqlCommand("select * from mytable", myConnection);
myReader = myCommand.ExecuteReader();
while (myReader.Read())
Console.WriteLine(myReader["tab01_name"].ToString());
Console.WriteLine(myReader["tab01_age"].ToString());
catch (Exception e)
Console.WriteLine(e.ToString());
try
myConnection.Close();
catch (Exception e)
Console.WriteLine(e.ToString());
Adelino Araujo -
How to delete the Folder from sql server 2008
Hi all,
I was trying to delete the folder from sql server 2008 with the below script
DECLARE @path VARCHAR(256) -- path for backup files
DECLARE @cmd VARCHAR(8000)
DECLARE @folderName VARCHAR(256) -- filename for backup
SET @folderName = + (CONVERT(varchar(10), GETDATE()-7, 112)) -- 7 days back date folder name
SET @path = 'I:\Backup_Test\' + @folderName -- Folder path
SET @cmd = 'del ' + @path -- Delete
EXEC master..xp_cmdshell @cmd
--Print @cmd
This is not working it was asking the Confirmation (I:\Backup_Test\20100629\*, Are you sure (Y/N)? ) what will i do to the delete the folder.
Thanks,
Prasad R.I would notice you that T-SQL does not play well to do things like that. Do not you want using .net language to delete folders?
Old method is
declare @HR int, @CFOLDER varchar(255),@FSO int
set @CFOLDER='D:\folder\'
EXEC @HR = sp_OACreate 'Scripting.FileSystemObject', @FSO OUT
EXEC @HR = sp_OAMethod @FSO, null, 'DeleteFolder', @CFOLDER
Now regarding to your second question please examine xp_fileexist system stored procedure
CREATE FUNCTION dbo.fn_file_exists(@filename VARCHAR(300))
RETURNS INT
AS
BEGIN
DECLARE @file_exists AS INT
EXEC master..xp_fileexist @filename, @file_exists OUTPUT
RETURN @file_exists
END
GO
-- test
SELECT dbo.fn_file_exists('c:\a.txt')
Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/ -
Hi,
I have to implement the following scenario in SSIS but don't know how to do since I never worked with SSIS before. Please help me.
I have 20 different text files in a single folder and 20 different tables corresponding to each text file in SQL Server 2008 R2 Database. I need to extract the data from each text file and
load the data into corresponding table in Sql Server Database. Please guide me in how many ways I can do this and which is the best way to implement this job. Actually I have to automate this job. Few files are in same format(with same column names
and datatypes) where others are not.
1. Do I need to create 20 different projects ?
or
Can I implement this in only one project by having 20 packages?
or
Can I do this in one project with only one package?
Thanks in advance.As I said I don't know how to use object data type, I just given a shot as below. I know the following code has errors can you please correct it for me.
Public
Sub Main()
' Add your code here
Dim f1
As FileStream
Dim s1
As StreamReader
Dim date1
As
Object
Dim rline
As
String
Dim Filelist(1)
As
String
Dim FileName
As
String
Dim i
As
Integer
i = 1
date1 =
Filelist(0) =
"XYZ"
Filelist(1) =
"123"
For
Each FileName
In Filelist
f1 = File.OpenRead(FileName)
s1 = File.OpenText(FileName)
rline = s1.ReadLine
While
Not rline
Is
Nothing
If Left(rline, 4) =
"DATE"
Then
date1 (i)= Mid(rline, 7, 8)
i = i + 1
Exit
While
End
If
rline = s1.ReadLine
End
While
Next
Dts.Variables(
"date").Value = date1(1)
Dts.Variables(
"date1").Value = date1(2)
Dts.TaskResult = ScriptResults.Success
End
Sub -
How to install SQL SERVER 2008 r2 in window 7 home premimum 64bit
how to install SQL SERVER 2008 r2 in home premimum 64bit os. can any say that weather it will support or not in window 7 home premimum os.
my server log file:
Final result: SQL Server installation failed.
To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Exit code (Decimal): -2068052700
Exit facility code: 1212
Exit error code: 1316
Exit message: SQL Server installation
failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Start time: 2014-03-27 00:52:25
End time: 2014-03-27
00:56:09
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL
Server\100\Setup Bootstrap\Log\20140327_005035\SSCRuntime_Cpu32_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1
Machine Properties:
Machine name: SEVALAL-PC
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance
Instance ID Feature Language
Edition Version Clustered
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER
Database Engine Services 1033 Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER
SQL Server Replication 1033 Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER
Full-Text Search 1033 Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSAS10_50.MSSQLSERVER
Analysis Services 1033 Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSRS10_50.MSSQLSERVER
Reporting Services 1033 Standard Edition 10.50.1600.1 No
Sql Server 2008 SEVALAL MSSQL10.SEVALAL
Database Engine Services 1033 Express Edition 10.3.5500.0
No
Sql Server 2008 SEVALAL MSSQL10.SEVALAL
SQL Server Replication 1033 Express Edition 10.3.5500.0
No
Sql Server 2008 R2
Client Tools Connectivity 1033
10.50.1600.1 No
Sql Server 2008 R2
Client Tools Backwards Compatibility 1033
10.50.1600.1 No
Sql Server 2008 R2
Client Tools SDK 1033
10.50.1600.1 No
Package properties:
Description: SQL Server Database Services
2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: G:\01.SQL Server 2008 R2 FullVersion\x64\setup\
Installation edition: STANDARD
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: False
AGTSVCACCOUNT: <empty>
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup
Bootstrap\Log\20140327_005035\ConfigurationFile.ini
CUSOURCE:
ENABLERANU: False
ENU: True
ERRORREPORTING: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: IS,SSMS,ADV_SSMS,OCS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL
Server\
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft
SQL Server
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT AUTHORITY\SYSTEM
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE:
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: <empty>
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: <empty>
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: <empty>
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: True
TCPENABLED: 0
UIMODE: Normal
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup
Bootstrap\Log\20140327_005035\ConfigurationFile.ini
Detailed results:
Feature: Integration
Services
Status: Failed:
see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Management
Tools - Complete
Status: Failed:
see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Management
Tools - Basic
Status: Failed:
see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Microsoft Sync
Framework
Status: Failed:
see logs for details
MSI status: Passed
Configuration status: Passedmy summary log file information:
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Exit code (Decimal): -2068052700
Exit facility code: 1212
Exit error code: 1316
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then rerun SQL Server Setup.
Start time: 2014-03-27 00:52:25
End time: 2014-03-27 00:56:09
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140327_005035\SSCRuntime_Cpu32_1.log
Exception help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=10.50.1600.1
Machine Properties:
Machine name: SEVALAL-PC
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID Feature
Language Edition Version Clustered
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER Database Engine Services 1033
Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER SQL Server Replication 1033
Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSSQL10_50.MSSQLSERVER Full-Text Search 1033
Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSAS10_50.MSSQLSERVER Analysis Services 1033
Standard Edition 10.50.1600.1 No
Sql Server 2008 R2 MSSQLSERVER MSRS10_50.MSSQLSERVER Reporting Services 1033
Standard Edition 10.50.1600.1 No
Sql Server 2008 SEVALAL MSSQL10.SEVALAL Database Engine Services 1033
Express Edition 10.3.5500.0 No
Sql Server 2008 SEVALAL MSSQL10.SEVALAL SQL Server Replication 1033
Express Edition 10.3.5500.0 No
Sql Server 2008 R2 Client Tools Connectivity
1033 10.50.1600.1 No
Sql Server 2008 R2 Client Tools Backwards Compatibility
1033 10.50.1600.1 No
Sql Server 2008 R2 Client Tools SDK
1033 10.50.1600.1 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
SPLevel: 0
Installation location: G:\01.SQL Server 2008 R2 FullVersion\x64\setup\
Installation edition: STANDARD
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: False
AGTSVCACCOUNT: <empty>
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Manual
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140327_005035\ConfigurationFile.ini
CUSOURCE:
ENABLERANU: False
ENU: True
ERRORREPORTING: True
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: IS,SSMS,ADV_SSMS,OCS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: *****
HELP: False
IACCEPTSQLSERVERLICENSETERMS: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: C:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server
INSTANCEID: MSSQLSERVER
INSTANCENAME: MSSQLSERVER
ISSVCACCOUNT: NT AUTHORITY\SYSTEM
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE:
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: <empty>
RSINSTALLMODE: FilesOnlyMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: <empty>
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: <empty>
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: True
TCPENABLED: 0
UIMODE: Normal
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140327_005035\ConfigurationFile.ini
Detailed results:
Feature: Integration Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Management Tools - Complete
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Management Tools - Basic
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Feature: Microsoft Sync Framework
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140327_005035\SystemConfigurationCheck_Report.htm -
How to restore SQL Server 2008 database to SQL Server Express 2012
How to restore SQL Server 2008 database to SQL Server Express 2012.
I BACKED UP a SQL Server 2008 database from work, which runs the enterprise version of 2008, and I tried to RESTORE it to my new 64-Bit home PC which is running the new SQL Server Express 2012 64-Bit (Advanced Edition).
But if fails. I get the following message text.
Can anyone help me please. I thought restoring a 2008 database to the later version 2012 would be possible.
Here is the error message. Thanks.
TITLE: Microsoft SQL Server Management Studio
Restore of database failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)
ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the backup, or use a
backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)ADDITIONAL INFORMATION:
System.Data.SqlClient.SqlError: The database was backed up on a server running version 8.00.2039. That version is incompatible with this server, which is running version 11.00.3128. Either restore the database on a server that supports the
backup, or use a backup that is compatible with this server. (Microsoft.SqlServer.SmoExtended)
Are you sure your database is SQL server 2008 from error message it seems your SQL server version is 2000.I guess you have multiple versions of SQL server.
AFAIK you cannot restore backup of SQL server 2000 to 2012 directly .Restore it first to SQL 2008/2008R2 or 2005 then take backup again of new database created and then you would be able to restore it on 2012.Its kind of intermediate way
Also make sure your DB size is less than 10 G as max DB size supported by Express edition is 10 G and if your DB size is more than 10 G restore will fail.
You are also trying to restore enterprise DB backup on express edition so you will loose enterprise features on express edition
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
How can we find the most usage and lowest usage of table in Sql Server by T-SQL
how can we find the most usage and lowest usage of table in Sql Server by T-SQL
The table has time stamp column
StartedOn datetime
EndedOn datetimeThe Below query has been used , but the textdata column doesnot include the name of the table ServiceLog.
SELECT
FROM
databasename,
duration
fn_trace_gettable('F:\Program
Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Log\log_148.trc',
default)
WHERE
DATABASENAME='ZTCFUTURE'
AND TEXTDATA
IS
NOT
NULL
--AND TEXTDATA LIKE 'SERVICE%'
order
by cpu
desc; -
How to export data with column headers in sql server 2008 with bcp command?
Hi all,
I want know "how to export data with column headers in sql server 2008 with bcp command", I know how to import data with import and export wizard. when i
am trying to import data with bcp command data has been copied but column names are not came.
I am using the below query:-
EXEC master..xp_cmdshell
'BCP "SELECT * FROM [tempdb].[dbo].[VBAS_ErrorLog] " QUERYOUT "D:\Temp\SQLServer.log" -c -t , -T -S SERVER-A'
Thanks,
SAAD.Hi All,
I have done as per your suggestion but here i have face the below problem, in print statment it give correct query, in EXEC ( EXEC master..xp_cmdshell @BCPCMD) it was displayed error message like below
DECLARE @BCPCMD
nvarchar(4000)
DECLARE @BCPCMD1
nvarchar(4000)
DECLARE @BCPCMD2
nvarchar(4000)
DECLARE @SQLEXPRESS
varchar(50)
DECLARE @filepath
nvarchar(150),@SQLServer
varchar(50)
SET @filepath
= N'"D:\Temp\LDH_SQLErrorlog_'+CAST(YEAR(GETDATE())
as varchar(4))
+RIGHT('00'+CAST(MONTH(GETDATE())
as varchar(2)),2)
+RIGHT('00'+CAST(DAY(GETDATE())
as varchar(2)),2)+'.log" '
Set @SQLServer
=(SELECT
@@SERVERNAME)
SELECT @BCPCMD1
= '''BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT '
SELECT @BCPCMD2
= '-c -t , -T -S '
+ @SQLServer +
SET @BCPCMD
= @BCPCMD1+ @filepath
+ @BCPCMD2
Print @BCPCMD
-- Print out below
'BCP "SELECT
* FROM [tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername'
EXEC
master..xp_cmdshell
@BCPCMD
''BCP' is not recognized as an internal or external command,
operable program or batch file.
NULL
if i copy the print ourt put like below and excecute the CMD it was working fine, could you please suggest me what is the problem in above query.
EXEC
master..xp_cmdshell
'BCP "SELECT * FROM
[tempdb].[dbo].[wErrorLog] " QUERYOUT "D:\Temp\LDH_SQLErrorlog_20130313.log" -c -t , -T -S servername '
Thanks, SAAD. -
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000
Post Author: ltkin
CA Forum: WebIntelligence Reporting
Hi,
How to build a report in web Intelligence using Store procedure under Microsoft SQL Server 2000 ?
Regards,Hi ltkin,
Unfortunately, it is not possible in Xir2 to create Webi reports from stored procedures.
Webi reports can only be created from Universe. So in Business Objects XIR3 we can create a special universe that enables Web Intelligence user's to access stored procedures residing in the database. This is the only way that Web Intelligence user's can access stored procedures.
Please let me know if the above information helps.
Regards,
Pavan -
I have used SSRS a lot years ago with Sql Server 2000 and Sql Server 2005. I have written external assemblies, ... But now I have to do this with Sql Server 2008 (R2 -- which I realize I am way behind the times already but ...) in sql server 2000 and
2005 there was a tab for datasource to the left of the tab for design which was to the left of the preview tab. How do I get to the datasource window in sql server 2008 (r2) ?
I see that datasource explorer. But where can I get to the datasource window to edit my queries and so forth for sql server 2008 (R2)?
Thanks
Rich PI think I found the answer to my question --- just right-click on the the Data Sources or Datasets for editing connections and dataset queries. I'm guessing it gets even fancier with Sql Svr 2012 - 2014. Man, that's the one thing
about coding platforms -- you let it go for a few years and come back, and everything has changed (well, a lot of things). Now I need to figure out how to add an external assembly to SSRS 2008 (R2).
Rich P -
How can i look up a EJB residing in different machine from client side?
hai ,
How can i look up a EJB residing in different machine from client side?
this is my code...........i don't know what should i use as Initial Context Factory...................i am using a sun appserver 8............
package com.parx.lms.lmsdelegate;
import com.parx.lms.exception.LMSException;
import javax.naming.Context;
import javax .ejb.CreateException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.rmi.PortableRemoteObject;
import java.rmi.RemoteException;
import com.parx.lms.controller.*;
import com.parx.lms.vo.UserVo;
import com.parx.lms.exception.BusinessException;
import java.util.Hashtable;
import java.lang.*;
public class LmsDelegate{
private final static String JNDI_NAME="LmsBean";
private static String url="http://localhost:4848";
public static Lms lms = null;
public void getController() throws CreateException,
NamingException,RemoteException{
if(lms == null){
Hashtable h=new Hashtable();
h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************");
h.put(Context.PROVIDER_URL,url);
System.out.println("Before Loading Context in Delegate");
Context ctx=new InitialContext(h);
System.out.println("Loaded Context in Delegate");
Object obj=ctx.lookup(JNDI_NAME);
System.out.println("Loaded Object in Delegate");
System.out.println("Before Loading Home in Delegate");
LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
System.out.println("Loaded Home in Delegate");
lms = home.create();
System.out.println("Loaded remote in Delegate");
public void addUserDelegate(UserVo vo) throws BusinessException{
try{
getController();
System.out.println("Before calling the addUser of Session");
lms.addUser(vo);
}catch(CreateException e){
System.out.println("Create Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
}catch(NamingException e){
System.out.println("Naming Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
catch(RemoteException e){
System.out.println("Remote Exception in Delegate due to--->"+e);
e.printStackTrace();
throw new BusinessException(e);
}catch(LMSException e){
System.out.println("duplicate user name--->"+e);
e.printStackTrace();
throw new BusinessException(e);
pls help me..........h.put(Context.INITIAL_CONTEXT_FACTORY," ********what should i use here???????*************************")
Each app server provides their own jndi factory class. For ex for weblogic it is weblogic.jndi.WLInitialContextFactory. SInce you are using sun app server, check if there are any examples to find out or the docs.
private static String url="http://localhost:4848
Since the client is in a different machine the localhost is not going to work here. provide the url or the machine name of the system in which ur sunapp server is running. In addition u will need to have the stubs of the remote interfaces in ur client machine. -
How to stop SQL Server 2008 R2 generating SQLDump.mdmp files constantly?
Something went wrong with local SQL Server 2008 R2 and it constantly generates SQLDump.mdmp files. It generated 40Gb(!) of SQLDump.mdmp this morning. Server rebooted, but didn't help.
Any ideas what happened with SQL Server and how to stop SQLDump.mdmp files generation?
SharePoint 2007 - 2010 Tips & Tricks Portal | Microsoft MVP |
My Blog about Information Management |
My twitterMemory Dumps are generated automatically by the SQL Server under various circumstances - most of which indicate potential problems in the Instance or the machine. Some that I can recall right now are:
Database Corruption
Non-yielding scheduler
Non-yielding resource monitor
AV (Access Violation)
There can be several other reasons as well. SQL Server generates the dumps, so that these dumps can be analyzed to find out potential problems in the SQL Server.
IMHO, rather than trying to find out ways to stop the dumps from being generated, please try to find out potential problems in the Instance or the machine and fix that. This will stop the dump generation anyway.
In case you need any assistance in analyzing the Dumps, please feel free to engage Microsoft Support.
Suhas De
Please mark solved if your question is completely answered; vote it as helpful to help others find a solution quicker.
This posting is provided "AS IS" with no warranties, and confers no rights.
My Blog: http://blogs.msdn.com/b/suhde -
How to connect sql server 2008 r2 sp2 with vs2013 ultimate?
how to connect sql server 2008 r2 sp2 with visual studio 2013 ultimate?
Hi Shahzad,
>>how to connect sql server 2008 r2 sp2 with visual studio 2013 ultimate?
Based on your issue, if you wan to connect the sql server 2008 r2 sp2 from VS2013 IDE. I suggest you can try the Ammar and darnold924's suggestion to check your issue.
In addition, I suggest you can also refer the following steps to connect the sql server 2008 r2 sp2 with visual studio 2013 ultimate.
Step1: I suggest you can go to VIEW->SQL Server Object Explorer->Right click SQL Server->Add SQL Server.
Step2: After you connect the SQL Server 2008 r2 sp2 fine, I suggest you can go to VIEW->Server Explorer-> right click the Data Connection->Add Connection.
And then you can create the connect string in the Add Connection dialog box.
Hope it help you!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to change backend databases sql server 2008 R2 to Sql server 2012 datacenter
Hi
i have current sharepoint 2010 form has backend database is sql server 2008 R2 on windows server 2008 R2 Enterprise
and this form has
1 application server
1 Search server (index server)
1 wfe server ( all web applications are running)
1 databse server
here how i change this form back end to new windows server 2012 and sql server 2012 datacenter
adilInformation on SQL Aliases (using cliconfg.exe):
http://sqlandme.com/2011/05/05/create-sql-server-alias-cliconfg-exe/
You need to migrate content back into the database prior to migration:
http://technet.microsoft.com/en-us/library/ff628255(v=office.14).aspx
http://technet.microsoft.com/en-us/library/ff628257(v=office.14).aspx
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.
Maybe you are looking for
-
Simple problem - when attempting to burn iPhoto images to a CD for outside use, using Finder, when I load a blank CD I get an error message "This disc cannot be used because it is not recognized". This is a new problem for me. Am using Sony 1x-40x CD
-
After a updated my apple tv to OS 5
after i updated my apple tv to os 5 all channels are missing!!!!! youtube,flicker,etc.... what should i do now
-
CDE font issue on Solaris 10 1/06
Greetings, For some reason I get the following error when CDE applications load up: Warning: Cannot convert string "-dt-interface user-medium-r-normal-m*-*-*-*-*-*-*-*-*" to type FontStruct Warning: Missing charsets in String to FontSet conversion Wa
-
Licence required for Business Package download ?
Hi, I like to download the "Business Package for Employee Self-Service (mySAP ERP 2004)" for the integration to the SAP Enterprise Portal. I found it here: https://www.sdn.sap.com/irj/sdn/developerareas/contentportfolio But instead of a download link
-
Handling First_rows in Web Logic
Dear ALL, The First_rows hint in a query in oracle gives data in first come first server basis . Is there any way to handle java result set to act in sync with first_rows so that first few are processed not needing to wait for query completion. It se