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

We have a sql cluster using 2008R2. When running on one node of the cluster, our SSRS reports are fine. When running on the other node, the reports are extremely slow. For example, we have a 350 page report that the first node can print to pdf in about 30 seconds. The same report take at least an hour on the second node. As a test, I installed sql server and SSRS on my laptop. I can print the same large report also in under a minute.
So what could be happening on the second server that slows printing down so much? It doesn't matter whether we are printing to paper, pdf, etc. Also, it happens with any of our reports. It is not limited to this one large one. It also happens whether there are images  on the report or not.
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'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
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
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
sql server 11.0.2100

query is  



DECLARE  @FromBrCode INT =1001
DECLARE @ToBrCode INT =1637
DECLARE @Cdate DATE= '31-mar-2017'

SELECT a.PrdCd, a.Name, sum(b.Balance4) as Balance
FROM D009021 a, D010014 b
WHERE a.PrdCd=ltrim(rtrim(substring(b.PrdAcctId,1,8)))
AND substring(b.PrdAcctId,9,24)='000000000000000000000000'
AND a.LBrCode=b.LBrCode
AND a.LBrCode BETWEEN @FromBrCode AND @ToBrCode
AND b.CblDate=
(SELECT max(c.CblDate) FROM D010014 c
WHERE c.PrdAcctId=b.PrdAcctId
AND c.LBrCode=b.LBrCode
AND c.CblDate<=@Cdate)
GROUP BY a.PrdCd, a.Name
HAVING sum(b.Balance4)<>0
ORDER BY a.PrdCd

Open in new window


1.  this particular query taking too much time to complete execution
2. same problem in diffrent sql server
3. no table lock found , processor and memory usage normal while query running
4. normal "select top 1000 rows" working and showing output instantly in both table (D009021 , D010014)
5. reindex and rebuild done in both tables but problem not resolved (D009021 , D010014)
6. same query is working if we reduce number of branch
(
DECLARE  @FromBrCode INT =1001
DECLARE @ToBrCode INT =1001
)


7> same query is working if we replace any one variable and use value directly


AND a.LBrCode BETWEEN @FromBrCode AND @ToBrCode


changed to


AND a.LBrCode BETWEEN 1001 AND @ToBrCode


8> same query is working and giving output within 2 mins if we add "OPTION (RECOMPILE)" at end


9> tried to clean cache query execution plan and optimized new one but problem not resolved


10> found query estimate plan and actual execution plan is different please check screen shot


screenshot1.pngscreenshot2.png  
thanks in advance for any help.
0
HELLO...

We have an MSSQL-2008 based application.  One of our tables, the "AR_CUST" table...and, in particular, the "AR_CUST.TAX_CODE" field, has seen some very strange and inappropriate updates as of late.  In fact, in a number of instances, we are seeing "NULLs" in this field, where we *KNOW* there was valid data previously.

So, our quick question...is there any way, that we can "trap" who/what is being updated to, into this field?  Perhaps some sophisticated form of a SQL Trace...or any other method, that anyone can recommend, that is *easy* to implement for troubleshooting purposes?  We just need to get to the bottom, of why/how this (and some other) fields, are getting updated, and when.

Please help...we'd appreciate it!...Thanks!...Mark
0
With VBA, in MS Access 2013, I need to be able to read a MS SQL Server database diagram. I am working with a .accdb
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.