Microsoft SQL Server 2008

49K

Solutions

17K

Contributors

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the  Always On technologies and support for unstructured data types.

Share tech news, updates, or what's on your mind.

Sign up to Post

SQLcmd suddenly not working on SQL2008R2 server and throws the below mentioned error.

this app cant run on your PC.

Please suggest one solution to fix it.
0
Keep up with what's happening at Experts Exchange!
LVL 12
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

What is the syntax to restore a SQL Server .mdf file from the Command Prompt?
0
Good evening,

We are having an issue with our SQL Server Express 2008R2 installation on our new server.  We currently have a server running SBS2011, along with SQL Server Express 2008R2.  Since support for SBS2011 is ending soon, we have purchased a new server, which currently has Server 2016 Standard and SQL Server Express 2008R2 installed.  I am currently testing the new server for functionality in a test environment, and we are unfortunately having an issue.  

We currently utilize an Access Database to track all of our patient information, along with SQL Server for authentication and reporting of the Access Database.  In order to move the database to the new server, I have backed up the database on the SBS2011 server.  I then installed SQL Server on new server (2016 Standard), and then restored the database.  When opening the Access Database file, it should query the SQL Server for permissions via Active Directory and SQL Server.  I have the authentication on the database set as mixed mode.  I have verified the credentials exist in SQL.  I am able to connect successfully from a workstation using the Microsoft Kerberos Configuration Manager for SQL Server tool as well.

I have attached screenshots of the errors that I am receiving and would greatly appreciate any input to assist in resolving this issue.

Thanks for the help.

Error 1Error 2Error 3
0
After updating a user account in Active Directory, to change the user name, SharePoint Foundation 2010 still shows the old user name. This version of SharePoint does not have the User  Profile synchronization tools that the regular SharePoint 2010 platform has. There is no option to change the name manually, either as an administrator or as a user on their own profile. I have tried some of the solutions for doing the update using PowerShell and other techniques, but I am not having luck with any of the workarounds. How is this normally done in SharePoint Foundation 2010?
0
Hello Experts,

I’m trying to filter a drop down list based on another dropdown list using SQL/vbscript/hta. I have it working sort of thanks to Experts Exchange where I can populate the dropdowns from the database.

Now, I need to do two things:

1. Filter the dropdown lists
2. Send the values to a text file

The query in the code below shows the data like this:

ARA_PERSON_ID               ARA_TYPE_DESC                     INVOICE_TERM_DESC
0000000                                Student - Credit                       2004 Fall Reporting Term
0000000                                Student - Credit                       2004 Spring Reporting Term
0000000                                Student - Credit                       2005 Intersession Reporting
0000000                                Student - Credit                       2009 Fall Reporting
0000000                                Student - Credit                       2012 Fall Reporting
0000000                                Student - Credit                       2013 Fall Reporting
0000000                                Student - Credit                       2013 Spring Reporting
0000000                                Student - Credit                       2016 Spring Reporting
0000000                                Student - Credit Free               2003 Fall Reporting Term
0000000                                Student - Credit Free               2004 Spring Reporting Term
0000000                                Student - Credit Free               2006 Fall Reporting Term


 But I need it to show like this:
0
what are the cautions we need take in SQL Server 2012 std( windows cluster 2012) and  Node1, Node2 are in cluster

as sql server 2012 sp4 patch upgrade we unable to install because of some installer files are missing, we tired to fix, but it is not working and  we are decided to go for SQL server Repair option on Node1

Pls let me know, what steps do i need to do..with a caution..on Node1

Pls note, once if it successful patched on sp4 on node2, after repair, then we will plan on node2.

Pls suggest. Thanks
0
Hi there. We currently have SQL Server 2008 R2 running on a single server/DC (small office setting), and we just purchased a new server box, and want to move everything over to it (including SQL Server). Unfortunately, the installation media with the licence on it is missing - is there a way to find the licence that the old server with SQL 2008 R2 is using? To clarify, SQL was installed separately, so should have its own licence. I looked through the registry, but the "Productcode" registry key didn't have the correct format (wasen't aaaa-bbbbb-ccccc-ddddd-eeee).
Thanks.
0
I have a full backup every weekend, and every 30 min transaction log backup. Today I found out one transaction log backup fail last night but after 30 min, the transaction log backup runs again, it succeeded, then continue to run succeeded.

I want to know if I should go ahead to run a full backup to ignore the failed transaction log backup, no need to wait to weekend. My reason is I cannot restore all the logs if something happened now. I have to use last week's full backup + all the transaction logs before next weekend full backup. Since one of the transaction log failed, I am not able to restore to point in time, Am I right?
0
Hi Experts,
I have used following sql query for Month start date and End date
Month start date

DATEADD(month, DATEDIFF(month, 0, GETDATE()), 0)

Month End date

convert(varchar,Dateadd(dd,-1, Convert( char(8) , Current_timestamp, 112 )), 120)
My questions is , every 1 st of month no transaction is avilable, users need to
see Last month transaction when it's come 1 st of month,
But 2nd day need to change form start month to end month.
Any idea how to do that

PS: this is doing in the View
0
VMware vCenter 5.5 web login  coming Empty inventory Error reflecting is : "Could not connect to one or more vCenter Server systems: https://xxx.xxx.xxx.xxx:443/sdk"

VC 5.5 is running on windows 2008 and database is Sql2008  running on other server [both are vm running on esxi same host]
Telnet is Fine
DB Test is Fine
Services are fine
But Noting visible under vc inventory.
Did Server reboot and issue got fixed but repeated again after 4 days.

Pls help to locate if issue is with Network/DB/SSL or VC itself


Not able to locate much detail to apply appropriate fix
-2618423BBF69F68A.jpg
-351E50B996600DC9.jpg
-218B3348C6B2659B.jpg
-7057366E756B0F4D.jpg
0
Cloud Class® Course: Microsoft Exchange Server
LVL 12
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

I am looking for a software solution that will enable me to archive user data to another local location (NAS drive), i need to be able to specify that if data is over 2 years old it moves the data from live source A to Archive target B but retains NTFS Permissions on folders and sub-folders alike.

I have tried google but I am not seeing a suitable solution, if anyone has suggestions i would greatly appreciate it.

I know Robo-Copy is an option but my scripting skill are not great.
0
Hello Experts,
I am trying to display a table rows horizontally by TKT_Id.  I have two tables, TKT_DETAILS and FIELD_DETAILS.  Please see the details below.

TKT_DETAILS
TKT_Id
Field_Id
Field_Value

There are about 750 different fields numbered as 1 thru 750.  Each row contains only 1 field.  There are 750 rows for every single record vertically.

FIELD_DETAILS
Field_Id
Field_Name

This table contains Field Names of the every Field_Ids.

Because it is very difficult to read vertically, I am trying to create a view to show them all 750 fields in a single row as below.

Tkt_Id, Field_Name_1,  Field_Name_2,  Field_Name_3,  Field_Name_4,  Field_Name_5...  Field_Name_750
    1             001                     002                     003                     004                      005            ...             750

Plesae let me know how to do it without using PIVOT.  Thank you in advance for your time and help!
0
Hello Experts,
Currently I have a view as below (look Current).  I am trying to make it more dynamic, and trying to convert it to as below (look Future).  Please let me know how can we make it possible.  Thank you in advance.

Thank you!



Current
------------

USE ITN
SELECT DISTINCT            
   TKT_ID       
  ,CAST(MAX( CASE FIELD_ID WHEN 1  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_1
  ,CAST(MAX( CASE FIELD_ID WHEN 2  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_2
  ,CAST(MAX( CASE FIELD_ID WHEN 3  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_3
  ,CAST(MAX( CASE FIELD_ID WHEN 4  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_4
  ,CAST(MAX( CASE FIELD_ID WHEN 5  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_5
  ,CAST(MAX( CASE FIELD_ID WHEN 6  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_6
  ,CAST(MAX( CASE FIELD_ID WHEN 7  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_7
  ,CAST(MAX( CASE FIELD_ID WHEN 8  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) FIELD_8
FROM TKT_DETAILS (nolock)



Future
-------------


USE ITN
SELECT DISTINCT            
   TKT_ID       
  ,CAST(MAX( CASE FIELD_ID WHEN 1  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) SELECT FIELD_1 FROM FIELD_DETAILS
  ,CAST(MAX( CASE FIELD_ID WHEN 2  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) SELECT FIELD_2 FROM FIELD_DETAILS
  ,CAST(MAX( CASE FIELD_ID WHEN 3  THEN FIELD_VALUE END  ) AS VARCHAR(100) ) SELECT FIELD_3 FROM FIELD_DETAILS
  ,CAST(MAX( CASE FIELD_ID WHEN 4  THEN …
0
I am getting this error; 'Could not find stored procedure 'UP_UPDATE_LOG.'' on two different servers with two separate instances of SQL. One instance is 2008r2, and the other is 2016.

I am logged in as SA for the following steps
     1)  I tried to execute the sp, but I get the error; 'Could not find stored procedure 'UP_UPDATE_LOG.''
          a. I even tried this with; execute dbname.dbo.UP_UPDATE_LOG
     2)  I tried to create the sp, and I get this error;  There is already an object named 'UP_LOG_UPDATE' in the database.
     3)  I tried to drop the sp, and I get; Cannot drop the procedure 'UP_UPDATE_LOG,' because it does not exist or you do not have permission.
     4)  I tried to alter the sp, and I get; Commands completed successfully.
     5)  So I tried steps 1 to 3 and got the same errors as before


Any suggestions of what is going on and how to fix this issue?  and this looks like it is only happening to this one stored procedure.

Thank you,

Rich
1
I have 100 MSSQL database servers. I wan to do mass installation on these 100 servers b y network. The MSSQL server I want to install is MSSQL 2016 enterprise.  Is there a way to do that automatically? and how?
0
Thank you all in advance for taking a look!

The sql below sends an email update in the form of a table. Each row in the table provides detail for a particular transaction. I would like to include a count of the rows in the body.

Any suggestions would be much appreciated!



DECLARE @xml NVARCHAR(MAX)
DECLARE @body NVARCHAR(MAX)
Declare @email NVARchar(4000)





SET @xml = CAST(( SELECT email AS 'td','', Created as 'td','', LOC AS 'td'
FROM  
stbl_Provider_test_6_25
Where Created > ' 2018-4-1'
and email = 'joe@aol.com'
order by created desc






FOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))



SET @body ='<html><body><H3>
Email Update
</H3>
<table border = 1> 
<tr>
<th> email </th> <th> Created </th> <th> Location </th></tr>'    

 
SET @body = @body + @xml +'</table></body></html>'


EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'ACE DB Admin', -- replace with your SQL Database Mail Profile 
@body = @body,
@body_format ='HTML',
@recipients = 'joe@aol.com', -- replace with your email address
@subject = 'E-mail in Tabular Format';

Open in new window

0
SELECT   COUNT(*) as total_items, "Category" =  
      CASE  
         WHEN NR_R < 1645 THEN 'less costly'
         WHEN NR_R > 1645 AND PKG_NR_R < 1700 THEN 'ok costly'  
         WHEN NR_R > 1800 THEN 'high costly'          
         ELSE 'not listed to sell'  
      END  
   
FROM SCHEMA1.TABLE_1
GROUP BY  NR_R
GO

above query working fine.

But i am trying to transpose data to look in column view where each category shows in the below column format.



less costly  ok costly  high costly
23                 50             77

SELECT   SUM (CASE WHEN NR_R < 1645 THEN 1 ELSE 0) as "less costly"
         SUM (CASE WHEN NR_R > 1645 and WHEN PKG_NR_R < 1700 THEN 1 ELSE 0) as "more costly"
         SUM (CASE WHEN NR_R > 1800 THEN 1 ELSE 0) as "most costly"
         ELSE 'not listed to sell'  
           
FROM SCHEMA1.TABLE_1

GROUP BY  NR_R
GO
i tried as above says incorrect syntax with )

Please advise
0
Created an SSRS 2014 report by joining 2 table ,related by CS_ID filtered by year . Notes column is in 2nd table and for each year it is unique . I am able to display data in a tablix. Issue I am facing is ,when some of the rows  are having notes (value of which is same for all rows). How to display that note on  bottom of a report on  a textbox  ? Currently I use another dataset to do this .  I want to do away with this. But I feel there is  way to set a report variable on expression of a column ( I use status column) of the row which has that  note column value. SetValue() does not seem to work . Ensured that report variable is not ready only.
0
Hi Everyone,

How to setup software upgrade group (SUGs)? Can you show me how to configure in SCCM console or GPO push down the windows updates & security to the clients.

How to retrieve full software report for SCCM

Tks.

Lcuky
0
Cloud Class® Course: SQL Server Core 2016
LVL 12
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

I set my sql server to sql server mixed mode authentication

Question
I add this Windows account, for example domain name\johnsmith to SQL server login
If I want to log into SQL server by this Windows account like domain name\johnsmith on SQL authentication, not on Windows authentication
Can I do that?

My SQL server is SQL 2012
0
Logon Login failed for user . Reason: Attempting to use an NT account name with SQL Server Authentication.

I have a Windows domain account like gooled\solarexpert that is set as sysadmin on mssql database, connect to Solarwind application.  The application connection is not successful. I check the database log, it is "....Reason: Attempting to use an NT account name with SQL Server Authentication."

I use this account gooled\solarexpert  on other database with same setting, it's no issue to connect. Most are nnncet5ed successfully, only few of them is with this error message.

Any advice?

I have tried almost all suggestions posted from web about this error, it still doesn't work.

My server is mssql 2012
0
As part of our failover process in SQL Server 2008 R2 we need to change the registry on our sharepoint servers so they are pointed to the right SQL box on the mirror. This has worked fine until we created 2 vm sharepoint boxes.  The step that changes the registry is in a text doc for each sharepoint box and is accessed using  Operating System (CmdExec) with 'regini -m \\SHP01 d:\scripts\SwitchToAppN1_SHP01.txt '  . With the VMs  the command is regini -m \\VMPRDWEBAPP01 d:\scripts\SwitchToAppN1_VMPRDWEBAPP01.txt. Error is
Executed as user: ########. REGINI: SetValueKey (CLSQLN1\Applications) failed (5)  REGINI: Failed to load from file 'd:\scripts\SwitchToAppN1_VMPRDWEBAPP01.txt' (5).  Process Exit Code 1.  The step failed.

Searches said this has to The problem was w ith permissions on the remote server.  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg so we have added permission to the reg key for the user/svc-account but are still getting the error.

Any help would be appreciated.
0
Hi,
    We are facing some strange issues on our SQL server 2008 R2 environment where suddenly SQL Agent job which was executing DTS packages weren't returning any error or successful status . When we checked in back-end the file which were supposed to get processed by DTS weren't processed. we haven't changed any configuration change or package upgrade done. the same package was copied to other environment which ran successfully.
To test whether DTS tool are having any issue we created some test package which was executed properly without any issues.
 No error logs are getting logged either on SQL Agent Job-->Steps-->Advanced->Error log file or on package logging as well.
Even running the DTSRUN command on command prompt doesn't show up anything.

Any help would be much appreciated!!
0
I have a tempdb, I set tempdb (tempdb.mdf) initial size too large 40 GB some time ago, now it reachs to 40 GB. I want to reduce the initial size, but it cannot allow me to do that. Even I shrinkfile it, it cannot help much. I don't want to keep running out of disk space and add disk space. I want to reset the initial size to min like 0124GB

Any advice? I want to reset the initial size to something a low number like 1024 from 40GB.

I am running MSSQL 2012
0
ms sql management studio how to query select stored proc by passign inputs graphically without writing query.

one of my colleague passed inputs in one cool graphical option in ms sql management studio
not exactly sure how he was able to do it
please advise
0

Microsoft SQL Server 2008

49K

Solutions

17K

Contributors

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the  Always On technologies and support for unstructured data types.