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

Is there a way to do this any more effeciantly?

--Setup Load Balancing for Mail servers
        DECLARE @FromName AS VARCHAR(300)
        DECLARE @SenderEmail AS VARCHAR(300)
        DECLARE @Replyto AS VARCHAR(300)
        DECLARE @ReplyName AS VARCHAR(300)
 
---- Create the variables for the random number generation

        SET @FromName = (SELECT FromName FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @SenderEmail = (SELECT SenderEmail FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @Replyto = (SELECT ReplyTo FROM dbo.MailServer WHERE MailServer = 'sendgrid')
        SET @ReplyName = (SELECT ReplyName FROM dbo.MailServer WHERE MailServer = 'sendgrid')
0
Free Tool: IP Lookup
LVL 9
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I have date format 2017-08-17 10:04:44.697 in my sql server table. I want to select rows for particular date irrespective of time. What date formate i need to use in my where condition for performance point of view?
0
Hi Experts,


I have a case when statement
when cce.CVA_StatusID is not null then cvs.StatusType else 'No Status' end as [Status]

Open in new window


and would like to do:
INNER JOIN  @SEV as sta on sta.stat = Status

But one can see this is not the correct way to do this.

Any idea would be great?  Maybe a CTE?  but would need help.

Thank You....
0
I can not send mail through the SMTP connection manager (send mail task). System.net.webexepction

attched file
www.png
0
Hello Experts

I have developed a package that works very well in development. I do 2 things
1. I publish it to the SSIS server
2. I call you through a job

In the execution of the job falls for a subject of permissions
This is the error
Error: 2017-08-12 13:53:28.56
   Code: 0xC0016016
   Source: DWH 
   Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Clave no v lida para utilizar en el estado especificado.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
End Error
err_DTS.txt
0
convert month name to month number in sql server 2012
Eg : Aug means current yearand month (201708)
0
Hi,

I am studying the pros and cons of multi site architecture of MS SQL, oracle, MySQL and sybase. I know about MySQL and I am focusing on MS SQL now.

other than AOG, anything else can be good for MS SQL on 2 x data center MS SQL configuration/topology ?
0
The logon account for the SQL Server service cannot be a local user account or LOCAL SERVICE.  You must configure the SQL Server service to use a valid domain account, NETWORK SERVICE, or LOCAL SYSTEM.
Im running Windows Server 2008 R2 and i have installed SQL Server 2008 R2.
I have changed the accounts from Network Service account to Domain account with admin rights and still overtime i restart the service and then re-run the checker it still fails.

Anyones help would be highly appreciated.

Ciao
0
What statement would you use to remove all rows from a table
0
I was trying to install MS SQl server 2008R2 on windows Server 2012R2.
But the installation was successfull with following error message.

What problem could i face in future ?

Error Message-----------------------
Note : PkgMgr.exe has been deprecated.Please update your scripts to use DISM.exe to install,COnfigure, and update features and packages
and packages for windows.

See http://go.microsoft.com/fwlink/?LinkID=195329 for more information.

Operation failed with 0x8007000B
---------------------------
0
Free Tool: Path Explorer
LVL 9
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

actually i am making a pharmacy maintenance project using sql server and i want to fire a trigger from dbo.SaleInfo to dbo.stockinfo using the foreign key in both tables MedID and when stock is decreamented it reduce the stock from dbo.stockinfo?
0
Hi,
I have created user and given permssion to  db_owner for Test database.
But user complaining user can't create stored procedure or View.
I have given grant using following command but still user can't create store procedure.
What iam missing

use [App_Test]
GRANT EXECUTE ON SCHEMA::[dbo] TO [user1]
GRANT EXECUTE ON DATABASE:: App_Test  TO [user1]

USE  [App_Test]
GRANT CREATE PROCEDURE TO [user1]    
GRANT SELECT, INSERT, UPDATE, DELETE, ALTER, EXECUTE, VIEW DEFINITION ON SCHEMA::dbo TO [user1]
0
Hi there,
   We have log shipping for 4 databases which are going well but however only Restore Jobs for two databases gets failed in DR environment occasionally. The error message says like this
Executed as user: xxxxxxxxx. The process could not be created for step 1 of job 0x867837754D077D4A9BFF608D000072BD (reason: 5).  The step failed.

I have configured the Job->Step->Advanced->output file to capture the error message but this error was not written in the output file as well. In fact this error doesn't seem to be happened at all as I can see the output file has only log which is written before the last run which was failed.

thanks
Deepak
0
Hi,
I have create user "qry" and create table Sales.
I need to give access this user only sales year 2017, i don't want to show 2016<= sales.
How to do that?
Best regards
0
I have a query that pulls records from the previous day. I would like the where clause to use the previous day's information. So in the example below, if I ran the query on 5/1/2017, I would want it to use " April of 2017" for the "MONTH" and if it was January 1st, 2018, I would want it to use the previous year for the GETDATE(). I only need this to happen on the first of the month since every other day it pulls the current month's information. Can someone assist?

SELECT blah FROM myTable
WHERE  YEAR(myDate) = YEAR(GETDATE()) 
	    AND MONTH(myDate) = MONTH(GETDATE()) 

Open in new window

0
I've inherited a linked server which drives our website. I recently discovered that not all of our replications to that linked server are complete. I'm missing sometimes thousands of records in some tables. I think what is happening is that some of the local publications never had subscriber jobs created so the snapshots are being created, but not moved to the linked server. When I try to create a new subscription job I get an error  that the "subscription to publication <xxxx> has expired or does not exist."

How do I even begin to resolve this? Google searches are only telling me how to create the subscription but doesn't really help resolve this specific issue.

I'll provide whatever additional information you need. The full error is here:
Date            6/28/2017 9:26:59 AM
Log            Job History (SQL12-ItemMaster-repl1_Cat_to_Opt-WIN-3EB9B225E5P-1069)

Step ID            2
Server            SQL12
Job Name            SQL12-ItemMaster-repl1_Cat_to_Opt-WIN-3EB9B225E5P-1069
Step Name            Run agent.
Duration            00:00:01
Sql Severity      0
Sql Message ID      0
Operator Emailed      
Operator Net sent      
Operator Paged      
Retries Attempted      0

Message
2017-06-28 14:26:59.919 Copyright (c) 2008 Microsoft Corporation
2017-06-28 14:26:59.919 Microsoft SQL Server Replication Agent: replmerg
2017-06-28 14:26:59.919
2017-06-28 14:26:59.919 The timestamps prepended to the output lines are expressed in terms of UTC time.
2017-06-28 14:26:59.919 User-specified agent parameter values:
                  -Publisher SQL12
                  -PublisherDB …
0
The Server (win 2008) name for one of our test Server was changed , however, the server hosted an SQL Database. with the change, it has resulted in us unable to connect to the SQL Database (sql 2008). the previous username does not work anymore and i even tried connecting with windows authentication and still nothing. is there anyway to resolve this?

Regards,
Grand
0
Hello Experts,
I am trying to debug a Stored Procedure and I get the following error as soon as I Start Debugging.  Any idea what is going on?

Error Message:  Unable to start T-SQL debugging. Could not attach to sql server process on XXX.  The object exporter specified was not found.

Thank you in advance!
0
I have many columns in my report and I want to dynamically sort the columns which the user needed to sort in ascending order. How could this be done?
0
U.S. Department of Agriculture and Acronis Access
LVL 4
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

I am using MS SQL Server 2008 as my Database and I created a Stored Procedure that looks like this.

    USE [DB_Question]
    GO
   
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER Procedure [dbo].[Check_ExamID]
    @ExamID NVARCHAR(MAX)
    as
    SELECT * FROM TBL_ExamTimer WHERE ExamID = @ExamID

and here is my PHP code that suppost to be the target is to display data in my PHP site by using some criteria also.

    <html>
    <head>
   
    </head>
    <body>
    <?php
   
          include('config.php');
          include('adodb/adodb.inc.php');
          $db = ADONewConnection($dbdriver);
          $db->Connect($dsn, $username, $password);
          
          $procedure = $db->prepareSp('Check_ExamID');
          if (!$procedure)
        die ('Invalid or inaccessible stored procedure name');
          
          $parameter1Name = '@ExamID';
          $ok = $db->inParameter($procedure,$parameter1Name,'1234');
          $result = $db->execute($procedure);
     
   
    ?>
    </body>
    </html>

I am trying to display data where `ExamID =@ExamID` or `1234` for param of `@ExamID`

My Target here is to use my stored procedure to select data in my table and return it back in my php file but nothings happening. TYSM
0
Hello,

is there any way to modify chart arrowheads in SSRS? The proposed ones (Triangle, Sharp triangle, Lines) are quite ugly... I'd like to display axes with thinner and smaller arrowheads.
0
When installing SQL 2008 server R2 SP3 update it fails on the instances, here is the boot strap error

Overall summary:
  Final result:                  The patch installer has failed to update the following instance: MICROPOWER. To determine the reason for failure, review the log files.
  Exit code (Decimal):           -2068024447
  Exit facility code:            1212
  Exit error code:               29569
  Exit message:                  The patch installer has failed to update the following instance: MICROPOWER. To determine the reason for failure, review the log files.
  Start time:                    2017-05-15 23:30:06
  End time:                      2017-05-15 23:32:16
  Requested action:              Patch

Instance MICROPOWER overall summary:
  Final result:                  The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
  Exit code (Decimal):           -2068024447
  Exit facility code:            1212
  Exit error code:               29569
  Exit message:                  The patch installer has failed to update the shared features. To determine the reason for failure, review the log files.
  Start time:                    2017-05-15 23:31:41
  End time:                      2017-05-15 23:32:13
  Requested action:              Patch
  Log with failure:              C:\Program Files\Microsoft SQL Server\100\Setup …
0
I've been wrestling with these expressions for a while. I just don't know how to put these two expressions into one tidy expressions (if it's even possible).

=CSTR(First(Fields!DaysToExpiration.Value, "Revoked"))

=Fields!IsHidden.Value = "False"

Any help would be appreciated. Thanks!
0
Hello, was wondering if a new column is created in a tablix to give status of other column groups in case a row in any of the column groups gets blank. Am trying to put in an expression in that column created but it always gives me a null or error sometimes. any idea whats the best way to handle this. What i would like for the column to report is if other column groups have an empty field then write "missing information" on the created column for that row.
0
We are migrating over our ERP system to a new version. As part of migrating we are changing over from SQL 2008 to SQL 2014. When we create a view to a table in SQL 2008 and create a view to the same table in SQL 2014 and run them side by side, SQL 2008 finished producing the results in nearly half the time. We also notice that SQL 2014, while producing the results will pause every few seconds.

Any ideas on what is causing SQL 2014 to be running this data much slower than 2008?

(This slowness was originally noticed when reconnecting numerous MS Access 2010 applications to views that were created in SQL. They now run much slower when connected to the SQL 2014 Views) I don't believe the way the SQL views are created is the reason for this slowness due to the fact that we can connect directly to a table in SQL from Access and 2008 will still produce the results nearly twice as fast as connecting to SQL 2014 from access.


Thanks for any help or ideas!
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.