hello - i have this problem:
i am able to use bulk insert script like
"bulk insert demodb..table1
from 'c:filename.ext' with (formatfile = 'c:cp.fmt')"
to import a binary file into sql server.
table1 has 4 columns, noted column is number 2, type image, here's my format file:
8.0
1
1 SQLIMAGE 0 100184 "" 2 logo ""
i import only the binary file.
however when trying to do the same using bcp with the same format file, it just says
"starting copy..." and goes to sleep !
any idea what i should do?
i created a temp table with just an IMAGE column and then the bcp method works, but i rather need it with my current setup - table with 4 columns
When our rep distribution services time-out (several times a day) some dba's just restart the service while others restart the rep job which starts the service. Are there any differences between these two methods? Does restarting the service inherit any changes made to the job's attributes?
We have SQL 2000 (SP2) , Our SQL server agent showing green light as started from EM , It is succussfully restarting from NT Services too . But When I open the properties of the jobs from EM its gives error message SQL DMO error " SQl Agent is starting , try later " . And in EM Next run Date & Time not available .
MDDB database is accessable & in Log file its recovered fully
I set up DB mirror between a primary (SQL1) and a mirror (SQL2); no witness. I have a problem when I issue command:
alter database DBmirrorTest Set Partner = N'TCP://SQL2.mycom.com:5022'; go
The error message is:
The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy of the database log.
I have the steps below prior to the command. (Note that both servers' service accounts use the same domain account. The domain account I login to do db mirror setup is a member of the local admin group.)
1. backup database DBmirrorTest on SQL1
2. backup database log
3. copy db and log backup files to SQL2
4. restore db with norecovery
5. restore log with norecovery
6. create endpoints on both SQL1 and SQL2
CREATE ENDPOINT [Mirroring]
STATE=STARTED
AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)
FOR DATA_MIRRORING (ROLE = PARTNER)
7. enable mirror on mirror server SQL2
:connect SQL2
alter database DBmirrorTest
Set Partner = N'TCP://SQL1.mycom.com:5022';
go
8. Enable mirror on primary server SQL1
:connect SQL1
alter database DBmirrorTest
Set Partner = N'TCP://SQL2.mycom.com:5022';
go
This is where I got the error.
The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy
Hi! I did: alter database mydb set single_user with rollback immediate; exec sp_detach_db @dbname='mydb', @keepfulltextindexfile='true';
then I tried to copy files to new location on other drives, same server but got >>Cannot copy <myfile>: Access is denied Make sure the disk is not full or write-protected and that the file is not currently in use<<
I also tried rename of file without success. I also tried with db service stoppet (not preferred) without success.
How to find out, which process locks the files? Best regards
if i have a given database (a model) and i want to copy this database in the same database instance. Is it ok to copy the mdf and ldf file and attach the files with a new database name in the same instance.
I am attempting to use the copy wizard to copy databases from SQL Server 2005 to SQL Server 2008 R2 w/ FP1.
The copy fails with a login failure to SQL Server 2005. I have a user id & password under Windows for both servers. I have a user id and password under SQL security with the called for admin security rights.
The 2005 server has two instances, 20 databases, two dozen maintenance plans, and over a hundred users. I really would like to use the utility so I don't have to recreate everything manually.
Before implementing memory based bulk copy insert with IRowsetFastLoad interface of SQL Server 2005 OLE DB provider, I want to know some considerations.
- performance : compared with T-SQL's "BULK INSERT ..." and bcp utility
- SQL Server's resource usage : when running memory based bulk copy, server resource's influence
- server side action(behavior) : when server is busy, delayed-update means IRowsetFastLoad::Commit(true) method can insert right after?
- row-count : The rowcount limitation can be inserted by IRowsetFastLoad::InsertRow() method before IRowsetFastLoad::Commit
I've read frequently how stored procedures we create shouldn't be named withsp_ since SQL Server will first check the master db before the current dbwhen trying to find the sp to execute. I always nodded and thought how Iwas glad I hadn't done that. For some reason it never clicked that UDFbehavior could be the same.I have several UDFs that start fn_... When I reference a UDF as dbo.fn_...does SQL Server check the master db for these and only upon not finding themcheck the current db? If so, is there a performance hit for this?TIA,John
I'm quite new to this forum. I've a fair experience in Databases and Programming. Now that I want to take a stride into Data Mining and Warehousing. Experts please suggest me where I can start from and any learning path ?
I am just starting out on SSIS, and have the following business challenge that I would like to solve utilizing SSIS. There are two SQL Server data stores, one would be the source, and other would be the destination. I need to grab some data from store 1, and insert that data into store 2. Here are my questions:
1) Before i move the data to store 2, i have to check some criterias by callin some sps, and then the end result would need to be inserted into the destination database. Can anyone tell me how would i setup the control flow, to accomodate that in SSIS?
2) Can someone email me a sample package that does something similar?
I just need a starting point so i can build the design of my package. Basically i need to call three sps during the process to move data. First one will compile a list of all the records to process. Second one, will pick those up, make some calls to set some other parameters, and then finally insert it into some staging tables. Third one should simply pick up the data from staging tables, to a replica of those tables in the actual destination db. I would really appreciate if I can get some response to this post soon. Also, I would appreciate if you can point me in the right direction in terms of how to design this using SSIS. Basically i need a starting point control flow design(rough) to understand what control flow items would be used in this case. Thanks.
The SQLAgent service was modified to login as a domain account. SQLAgent would not start. I made sure that the account was in the Admin group on the server, I setup the account as a System Administrator in SQL. I made sure that the network protocols in Client Network Utiliity and Server Network Utility where the same as other servers using the domain account. The message I'm getting is...
SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start).
I modified the properties for SQLAgent back to login as local account and I still get the same problem.
When my system re-boots SQLServerAgent will no longer start. The following message is sent to the NT Event Log:
(Event ID 103) "SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start)."
Following this message are two messages from MSSQLServer that read:
(Event ID 19020) "RPC Net-Library listening on: ncalrpc:USBGRSYSTST1[WMSG0000009A.00000001]."
So is this a timing issues? Is MSSQLServer taking too long to completely start before SQLServerAgent is started? If so, is there a way (without hacking through the registry) to make the SQLServerAgent service dependant on the MSSQLServer service?
This startup issue did not exist until an application was installed on the machine that also has several services that auto-start. I noticed that many of these new services are starting at the same time the MSSQLServer service is starting.
For three months I have be starting the SQL Agent using the following bat file
EXEC XP_CMDSHELL 'NET START SQLSERVERAGENT'.
Starting this week the agent is not starting. This is the error message
10/26/00 6:25:36 PM - ! [000] Password verification of the 'SQLAgentCmdExec' proxy account failed (reason: A required privilege is not held by the client)
I've installed sql server 7.0 on winnt. Later i've changed my system name. Due to this SQL SERVER is not running and i'm getting the following error. "Your SQL Server installation is either corrupt or has been tampered with (unkown package id). Please rerun setup.". I've changed my system name back to the original one and sql server is running again.
Is there any way to change my system name and sql server running??
I am using MS SQL 6.5 SP5, NT4.0. running Tivoli Service Desk. Two of the four agents on the Applications server were not running so I recycled the server and now NONE of the agents are coming up. Generally the agents show up on the application server control panel but they have not started. The status of the server is 'initializing' and the Watchdog has started but only the 'dispatcher'started. I have hard booted the aps server and recycled the aps and db servers both. I know that there is a way to suspend the agents but that has not been done and the 'resume' button is not available to use. I tried restarting the dispatcher but it didn't do anything. I have also gone into 'config' on the control panel and it shows that '4' agents are set to start up.
We run a Web version also so I have my help desk analysts using it but they cannot refer back to tickets that they have just opened, etc.
ANY SUGGESTIONS - I have been waiting on Tivoli to call me back for almost an hour and a half.
My SQL server is not sarting, Its giving me an error 2140 - An internal Windows NT error occured. I checked the Microsoft site found an article ran all the options to check if it works but invain.
I am stuck, its a production DB i have to get it up and running in the next hour
SQL 2000 was run in Windows NT4 under non-system account. If this account belongs Administrator's group then SQL Server starts successfully otherwise the error message "NETLIB SuperSocket info: Failed to get Exclusive port use(MSAFD Tcpip [TCP/IP]) : Error 10013. " is displayed. Could you please help me to solve the problem.
The SQLAgent service was modified to login as a domain account. SQLAgent would not start. I made sure that the account was in the Admin group on the server, I setup the account as a System Administrator in SQL. I made sure that the network protocols in Client Network Utiliity and Server Network Utility where the same as other servers using the domain account. The message I'm getting is...
SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start).
I modified the properties for SQLAgent back to login as local account and I still get the same problem.
wanted to start the sql server agent and i got this error : An Error 1069 - (The service did not start due to logon faliure ) occured wile performing this service operation on SQLServerAgent servcice.
I feel extremly happy today and let me share with this wonderful forum why.
SQL is awesome and I'm really learning that theres alot of resources out there and coding is not that hard once you understand what your doing. Just took awhile for things to sink in. I still have a long ways to go but I'm really enjoying using sql. I practically live in our SQL Server 2000 at work and I'm learning more and more about it everyday.
Thank YOu so much guys I really appreciate all the help you've given me Now I'm gonna study for the sql cert
I am unable to get SQL Agent service to run under the same domain name that my SQL Server service is running under. It will start and continue to run when Server and Agent are both ran under the Local Account. But once the services are switched over to the domain account, the Server starts, but the Agent fails. The domain user has administrative rights on the server, along with admin rights to the SQL instance.
Here is the event log.
Event Type: Error Event Source: SQLSERVERAGENT Event Category: Service Control Event ID: 103 Date: 3/28/2007 User: N/A Computer: SQL2 Description: SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to the SQL Server as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).
Any help would be greatly appreciated or links to threads with answers.
I can't get a script to run that's supposed to generate a QueryParameters dialogue to take inputs and then run the query - forexample, the following.. . .and fl.flow_name = [[TRUE][FLOW NAME][@?]].. . .generates SQL Query Analyzer exceptions about "Incorrect syntax near'FLOW NAME'.Suggestions?
Hello,if there are tables with names starting with a # I canīt look into them,e.g. by doing "select * from tempdb.sys.tables". What is the reason for suchtables, who creates them and how I can see their content?thanks and regardsMark
hi. i'm starting out with SQL server integration with visual studio.i used the data connection wizard on adding a new connection to my sql server. but i have no idea on how to open/access it like the usual way wherein i use:
SqlConnection myConnection = new SqlConnection(connectionstring); myConnection.Open();
/*queries*/
how do i go about doing these things with the new connection that i made via the connection wizard? thanks in advance
OK, I've been looking and maybe there is an answer to this somewhere, but I haven't seen it.
I've got a database that has as its status "Shutdown, Normal". All the other DBs on my machine are "Normal" as status. The problem is that the one that is shutdown is the one I really need to be executing in. How do I start it?
I have a maintenance plan on SQL2000, that is backing up the database.
It is under Management/SQL Server Agent. When I try to start the job, I got an error, saying: Error 22022 SQLServerAgent is not currently running so it cannot be notified of this action.
But, when I try to start the SQL Server Agent (in Services), it stops directly with the following information: The SQLAgent$Sharepoint service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service.
When I try to start it from the SQL Server Service Manager: no reaction at all!