Quantcast
Channel: SQL Server Database Engine forum
Viewing all 15264 articles
Browse latest View live

Double SQL backup

$
0
0

Hi,

Is it a problem to make a double SQL backup?

We make a backup with an online tool and also make a local backup.

Possibly when restoring a database from one of the both tools wil fail because the LSN does not follow up?

Kind Regards Ton


Help - SQL 2012 Protocol Setup - static port for an instance

$
0
0

I am looking for validation of a procedure, Sorry if this is rudimentary, but I inherited this issue because our DBA flew the coop, and I got stuck holding the reigns.

We have an SQL 2012 installation with many instances.   The default instance MSSQLSERVER has a TCP/IP protocol assignment for port 1433, the rest of the instances just have Dynamic ports assigned for TCP/IP.

We can connect just fine using the hostname\instancename with the default port of 1433

We have a vendor that is demanding a static port that connects to the specific instancename.

My inkling is to go to sql server configuration manager, drill down to SQL server network configuration, select protocols for {instancename}, select TCP/IP, IP addresses tab, and in the IP one setting change it:

FROM:

  • Active: yes
  • Enabled: no
  • IP address:  {ip address}
  • TCP Dynamic Ports:  0
  • TCP Port:  null

To:

  • Active: yes
  • Enabled: yes
  • IP address:  {ip address}
  • TCP Dynamic Ports:  null
  • TCP Port:  11433

I would like to know if this is 1) correct and 2) safe to do without impact to any other instances, some of these run very mission critical apps and I have to be sure I am not going to mess any of them up before making this change.   BTW... I will verify that the choose port is not in use by any other processes.

Thanks in advance,

John R

run ssis package from stored procedure the ssis package will load an excel file located on a another server

$
0
0

sz

Hello,

I am working with sql server 2005

I have a ssis package that will upload information from an excel file to a temp table on sql server.

The sql server and web server are not in a domain.

We are using virtual machines.

The excel file will be located on the web server.

I know about proxy and so on and how to execute the package from stored procedures

what are the steps to emulate a domain user account.

-how to create an account that will have access to the folder on the web server

--how to map this to a proxy

--how to create a prinicpal

Thank you

Microsoft SQL Server Error: 22022

$
0
0
When trying to run a maintenance job I receive the error "SQLServerAgent is not currently running so it cannot be notified of this action. (Microsoft SQL Server, Error: 22022)". The agent starts and then stops. What would cause this?

Filegroup Backup with Simple Recovery

$
0
0

We have a 1.5 TB database that is in the SIMPLE recovery model.  Every week only the critical tables in a single filegroup are backed up.  We don't have a Full backup available, nor do we have a filegroup backup available of the PRIMARY filegroup.  Is it possible to somehow restore only the Critical Filegroup backup? 

Thanks!

SQL Server 2012 Express: "Error executing SQL script.Database does not exist(2702)" when script invoked from InstallShield

$
0
0

I run InstallShield 2010 to install my application which uses SQL Server. InstallShield first connects to the SQL Server as SA and then runs a few SQL scripts. The 1st script checks if a specific database exists or not. If it does not exist it returns immediately, otherwise it updates a table.

I had no problems when I ran the application install using SQL Server 2005 and 2008 R2. But I recently upgraded successfully my SQL Server 2008 R2 express to SQL Server 2012 express. InstallShield still succeeds to connect but throws an error when trying to execute the 1st script.

The SQL script is as follows:

        IF NOT EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'myDatabase')
            return;

        UPDATE [myDatabase].dbo.myTable SET current_version =2

        GO

The error:

"Error executing SQL script xy, line 4. Database 'myDatabase' does not exist(2702)".

The database did not exist and so the script should have returned. Instead it seems that it tried to execute the next line and complained that the database does not exist.

This error only happens when running the SQL script from InstallShield. It does not happen when I run the script in SSMS, or when I run it from installshield on sql server 2005 and 2008 R2.

I searched all over and couldn't find anything about this problem. The syntax that this script uses has not changed in Sql Server 2012 as far as I can tell. Is there a known problem in SS 2012 that may be causing this error? Can it be related to the express edition? Has anyone encountered something similar? Any idea will be appreciated. Thanks.

Recent transactions missing from current transaction log backup

$
0
0

Hello all,

I've got a strange situation that I've had a hard time getting to the bottom of. The issue is that I have a web app that writes to a SQL 2008 (R1) database. If I query the database directly then all of the recent writes show up fine. However if I restore the database to a different server (starting with last full backup + last differential + any transaction log backups that have happened since then), I seem to be missing the most recent data written to the database.

The database is in full recovery mode and the transaction log backups are done hourly via a scheduled maintenance plan. During the restore I get no errors, and the restore indicates that it has restored log backup files up to well after the missing transactions have occurred.

Things I have done to troubleshoot include issuing a checkpoint manually before the log backup occurs. No change in behavior. I also queried the production database for the missing records using query hints like READCOMMITTED to make sure that they have actually been committed and it looks like they have.
The missing records will eventually show up in the restored database but when is a variable. Looks like they always do when the next differential is run.

The database is a small one, so it wouldn't surprise me if the whole thing was in memory. Still it seems like the committed transactions should go to the log when the transaction log backup is run...maybe I've been betrayed by the maintenance plan wizard?

All thoughts on this situation are welcome. Thanks in advance for reading!

SQLSERVER not starting automatically on system reboot

$
0
0

Hi

I have a windows service that sends emails to notification subscribers. It is set to automatic and it starts correctly on system bootup. But it somehow depends on sqlserver which is also set automatic but it doesn't get started on system reboot. When i manually start the sqlserver service, everything works fine.

My OS - windows 7 64 bit. sqlserver is MSSQLSERVER 2008. I am pulling out my hair because of this. Any help is appreciated.

Thanks.


cannot see local drive from maintanance plan

$
0
0

hi ,

i use to be able to see the drive from my maintenance plan now i couldn't see them.

The account use to startup the mssql server is a domain account. Where else can i check as i am not familiar with windows administration.

SQL server agent- agent Xps disabled

$
0
0

I followed the instruction suggested in this post:

Code Snippet

sp_configure 'show advanced options',1

go

reconfigure with override

go

sp_configure 'Agent XPs',1

go

reconfigure with override

go

sp_configure 'show advanced options',0

go

reconfigure with override

go


But it didn't work properly and SQLAgent service stops again:

log:

2013-12-11 11:49:32 - ? [100] Microsoft SQLServerAgent version 11.0.2218.0 (X64 unicode retail build) : Process ID 9440
2013-12-11 11:49:32 - ? [495] The SQL Server Agent startup service account is IT\SPAdmin.
2013-12-11 11:49:32 - ? [000] Configuration option 'Agent XPs' changed from 0 to 1. Run the RECONFIGURE statement to install. [SQLSTATE 01000] (Message 15457)
2013-12-11 11:49:32 - ? [101] SQL Server SPQC version 11.00.2218 (0 connection limit)
2013-12-11 11:49:32 - ? [102] SQL Server ODBC driver version 11.00.2218
2013-12-11 11:49:32 - ? [103] NetLib being used by driver is DBNETLIB; Local host server is 
2013-12-11 11:49:32 - ? [310] 4 processor(s) and 8088 MB RAM detected
2013-12-11 11:49:32 - ? [339] Local computer is SPQC running Windows NT 6.1 (7601) Service Pack 1
2013-12-11 11:49:32 - ? [432] There are 12 subsystems in the subsystems cache
2013-12-11 11:49:42 - ! [364] The Messenger service has not been started - NetSend notifications will not be sent
2013-12-11 11:49:42 - ? [129] SQLSERVERAGENT starting under Windows NT service control
2013-12-11 11:49:42 - ! [298] SQLServer Error: 22022, Usage:  EXECUTE xp_sqlagent_notify 'A', NULL, NULL, <alert_id>, <action type> [SQLSTATE 42000] 
2013-12-11 11:49:42 - ! [442] ConnConnectAndSetCryptoForXpstar failed (0).
2013-12-11 11:49:42 - ? [000] Configuration option 'Agent XPs' changed from 1 to 0. Run the RECONFIGURE statement to install. [SQLSTATE 01000] (Message 15457)
2013-12-11 11:49:42 - ? [098] SQLServerAgent terminated (normally)

Please help me to solve this issue.

Enterprise 2012 Evaluation

$
0
0

Hi guys, I'm thinking to download the trial version of Sql 2012 Enterprise. Anyone know if there are limitation compare the full licensed? I mean, can I develop this edition without any restriction?

Another issue for me is that, after having developed all my stuff ( packages, cubes, stored, etc) I think ( cause the price) to buy a licence for Business Intelligence and not Enterprise. That's could be a problem, I mean do you think eventually I need to migrate the data from an instance to another instance or I can keep the structure simply updating the version  of SQL?

Thank you

Unable to open physical file - Operating system error 5: 5(error not found) Microsoft SQL Server: Error 5120

$
0
0

I am trying to attach a database to SQL 2005. This database has not previously been attached. I have only just installed SQL.

 

I get the following message: Unable to open physical file "C:\ArrowSQL\Arr@Data\Arrow_data.mdf" Operating system error 5: "5(error not found)" (Microsoft SQL Server: Error 5120)".

 

I have loaded SQL and the database fiel and directory with the same user acccount which is a local adminstrator ont hsi machine. I have checked that I have read/write access to the file.

 

The machine runs Windows Vista Business. SQL has SP 2 loaded.

 

What causes this?

Requested memory for execution plan information

$
0
0

Hello,

May I have some information regarding the memory parameters that appear into the execution plan ? here is an example of what I see on a XML Execution plan:

"

MemoryGrantInfo / SerialRequiredMemory="1536" SerialDesiredMemory="2160" RequiredMemory="1536" DesiredMemory="2160" RequestedMemory="2160" GrantWaitTime="0" GrantedMemory="2160" MaxUsedMemory="0"
"

I have noticed that sometimes those informations are available, sometimes they aren't. Can you please explain me this ? And when this information are available (I mean during compile time ? execution time ? After the end of the execution ?)

Another point is that some execution of an execution plan requests 85Mb of memory and some others executions resquest 190Gb (yes, Giga Bytes!) of memory. I've captured thoses inforamtions whith the requested_memory_kb column on the sys.dm_exec_query_memory_grants DMV. Do you know what can justified such difference between two execution ?

Many thank's for your answer, any informations regarding this part (requested_memory) would be usefull.

Olivier MAITRE

Partitioning

$
0
0

Hi all

I am new to partitioning and it's something that I have started looking at.

Most of the explanations that I have seen for partitioning incudes the sentence "The data of partitioned tables and indexes is divided into units that can be spread across more than one filegroup in a database"

Does this mean that I will only see the benefit of partitioning if I have more that one filegroup in my database?

When my data is partitioned and I query the table, does SQL Server know which partition it needs to go to get the data?

Are there any performance downfalls with inserting/updating data in a partitioned table?

Thanks

Low SQL Server Memeory shown in the task manager

$
0
0

Hi Fellow.

I have two physical HP servers with 64GB ram. The SQL-DB1 is a primary production server and SQL-DB2 is a stand-by server. Both are configured on Always on High Availability. On both servers, I have configure the maximum and minimum memory utilized by SQL Engine are Given below

Min: 20480 MB (20GB)

Max: 30720 MB (30GB)

The problem is that in the task manager, The primary SQL-DB1 shows that the Sql engine is occouping 300MB RAM while the second sql engine shows that it has occupied 23 GB of RAM.

What is going on in this case I am not getting it. Can any body explain? I want to increase the RAM size of SQL-DB1 to at least 20 GB in the RAM permanently.



Azwar


What are the most important perfmon counters to tract to create a baseline for your servers in a Central Management Server?

$
0
0

I am currentlly collecting perfmon counters for my Central Management Server to create a base line.  Years ago, I had a manager that had me collecting the following counters
        "\LogicalDisk(*)\Avg. Disk Queue Length",
        "\LogicalDisk(*)\Avg. Disk Read Queue Length",
        "\LogicalDisk(*)\Avg. Disk Write Queue Length",
        "\LogicalDisk(*)\Current Disk Queue Length",
        "\LogicalDisk(*)\Disk Bytes/sec",
        "\Memory\Available MBytes",
        "\Memory\Pages/sec",
        "\Paging File(*)\% Usage",
        "\Paging File(*)\% Usage Peak",
        "\PhysicalDisk(*)\% Disk Time",
        "\PhysicalDisk(*)\Avg. Disk Queue Length",
        "\PhysicalDisk(*)\Avg. Disk sec/Read",
        "\PhysicalDisk(*)\Avg. Disk sec/Write",
        "\PhysicalDisk(*)\Disk Bytes/sec",
        "\PhysicalDisk(*)\Disk Reads/sec",
        "\PhysicalDisk(*)\Disk Transfers/sec",
        "\PhysicalDisk(*)\Disk Writes/sec",
        "\Processor(*)\% Idle Time",
        "\Processor(*)\% Interrupt Time",
        "\Processor(*)\% Privileged Time",
        "\Processor(*)\% Processor Time",
        "\Processor(*)\% User Time",
        "\System\Context Switches/sec",
        "\System\Processor Queue Length",
        "\System\Threads"

I have the Task Scheduler running every 5 minutes.  With all these counters, I am inserting a lot of rows for 33 servers.  I am currious, are any of these counters less important than others on this list?  Are all of these counters important to track?  Can I eliminate any of them?  What are the most important perfmon counters to tract to create a baseline for your servers in a Central Management Server? 


lcerni

Performance Related Stats Required

$
0
0
Dear Friends,
I am running 100 test/staging db's on 4 different vm's. I want to collect consolidated DB performance related information. Is their any option.

Regards.
Irfan Ahmad

remnants left after uninstalling 2012 enterprise

$
0
0

Hi.  Before I continue uninstalling things to overcome a data provider error I'm getting in vs2010, pls help me to understand what I should do about the remnants you see below under Notes.  These remained after I followed these steps to uninstall 2012.

  1. Stopping sql full text filter daemon,engine,server agent,ssas,ssis,ssrs, vss writer (server browser was already disabled)
  2. Uninstalling sql server browser for sql server 2012 (got a warning about other products depending on it but proceeded anyway)
  3. Using admin tools->computer mgt->local users and groups, saw one group called sqlservermsasusers$machine name$mssqlserver and deleted it. Seems to be the only grp specifically related to sql server.  Somehow related to being assigned the login acct for associated instance of ssas sql 2012 ssas according to description.
  4. Uninstalled ms sql server 2012 64 - a variety of prompts follow basically asking what you want uninstalled and what you don’t. I don’t see .net framework in the list.  Nor do I see vs 2010.  I chose all.

Notes: 

seeing lots of negative comments about uninstalling vs2010 at http://archive.msdn.microsoft.com/vs2010uninstall

after uninstalling sql server, getting out and coming back into progs and features, I still see2008 r2 mgt objects, 2012 data tier app framework, 2012 management objects, 2012 management objects x64, 2012 native client, 2012 t-sql language service, ms sql data tools – database projects – web installer entry point, ms sql server clr types, ms clr types for sql server 2012.

My SQL Server and SQL Agent services shutdown unexpectedly

$
0
0

My SQL Server and SQL Agent services shutdown unexpectedly. When I checked the event log, I found this error for database id = 26, but when I run the following sql, I don't see a database with id 26. I have databases up to id 25. What database could it be? I was able to restart both services successfully.

Error: SQL Server must shut down in order to recover a database (database ID 26). The database is either a user database that could not be shut down or a system database. Restart SQL Server. If the database fails to recover after another startup, repair or restore the database.

SQL: SELECT * FROM master..sysdatabases order by 2

Thanks.



SQL server 2012 Installation to put Data and Log on a separate drive

$
0
0

Anyone tell me how to separate the data and log files in separate drive.

Can I give separate path for them during the installation or I go ahead with default installation later I move the files to separate partitions. 

Please advise. 

Regards

Viewing all 15264 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>