I'm a bit new to administering a SQL Server and this seems like a pretty basic question, but I'm not sure how to phrase it for the searches. So I apologize for seeking an indulgence...
I have SQL Server 2005 Standard edition running on a server exposed to the Internet. A handful of clients have to connect to it via TCP/IP using SQL Server Studio and ODBC links. But my windows logs are chok-full of failure audits of what I presume to be your garden variety crackers trying default passwords -- several times a minute.
What's the best solution to this, and how would I go about implementing it? Restrict TCP/IP access to certain IP ranges? Is there a 'max login attempts' somewhere? The server uses SQL authentication (not windows) if that makes a difference.
We occasionally get the error Login Failure for 'Admin' (client: then IP address). The SQL 2005 server is set up to use windows authentication and no one uses an account called Admin. The people here use their windows logon to access the database. Any suggestions would be appreciated.
I have SQL 2005 installed in a virtual (ESX) environment with a separate DC. Every minute or so an event shows up in the Application Event Log that says:
Type: Failure Audit
User: dgtestdc1$
Computer: sql1
Source: MSSQLSERVER
Category: (4)
Event ID: 18456
Description:
Login failed for user 'dgtestdc1$'. [Client: <ip address>]
Q1: Any way to control which db loads when, and perhaps stop this error from happening? Again- when all is said and done, the report server functions, and I am able to access just fine.
Q2: What kind of recovery is being referred to? Given the message type- I assume it's nothing of concern- probably more to do with a system that doesn't run all the time.
Okay- so I get these two event messages each time I boot.
Below are two error message I see daily with each system boot- the services mentioned do "actually" function, and are running- as not 10 seconds after these messages are logged, the successfully loaded messages appear. It's almost as if report services tries to connect before the databases are up and running.
Basically the sequence (today) was:
1. 05:49:01 Failure Audit (MSSQL$SQLEXPRESS) 2. 05:49:01 Error (Report Server Windows Service (SQLEXPRESS) 3. 05:49:02 Recovery is complete. (EventID 3408 MSSQL$SQLEXPRESS) 4. 05:49:06 Starting up database 'ReportServer' 5. 05:49:09 Server Resumed execution (MSSQL$SQLEXPRESS)
I'm assuming based on the events that Report Server Service attempts to connect to the ReportServer database before it's actually started. Doesn't really explain the failure audit-
This is almost immediately followed by this (which I consider a no-brainer, considering the above):
2. Error:
Event Type: Error Event Source: Report Server Windows Service (SQLEXPRESS) Event Category: Management Event ID: 107 Date: 8/9/2007 Time: 05:49:01 User: N/A Computer: <MACHINENAME> Description: Report Server Windows Service (SQLEXPRESS) cannot connect to the report server database.
I have made a server security audit and specify from database audit specification to audit "select" on a certain user and on a certain table. I logged in by this user and made the select statement..when i run this query
"select * from sys.fn_get_audit_file('d:Auditaudit1*',null,null)"
It return a value at which time the query has done
after 15 minutes i repeated the same action, i run the audit query and the same result is showed off on the panel.is it suppose to return a list of values by how many times this user has made the select statement on that table ? for example at 5:00 pm then 6:00 pm and so on
I need help...here is the problem.Last weekend, the servers in our datacenter where moved around. After thismove, and maybe coincidental, 1 server is performing very poor. Afterrunning a trace with SQL Profiler, I saw the problem which was laterconfirmed with another tool for SQL server performance monitoring. It seemsthat all connections to the SQL server (between 200 - 400) are doing a login/ logout for each command that they process. For example, the user'sconnection will login, perform a SELECT, and then logout. This is not a..NET application. The client software was not changed, it is still thesame. The vendor has said that it is not supposed to do that, it issupposed to use 1 connection that log's on in the morning and logs off atthe end of the day or whenever the user exits. 1 user may have severalconnections to the database.At times, the server is processing over 250 login / logouts (avgeraged for30 second period). Has anyone seen this problem? I have the server inAUDIT FAILUREs only. The server has become very unresponsive, things thattook 3 seconds now take over 15 seconds.Any ideas???
Hi, I am used to using Access but I need to learn SQL for larger web sites. I normally build the database in Access visually, but how do you do this with SQL? I just installed SQL developer and I can't find the area that builds the database.
Hi, I m new to sql server... I want to know the difference b/w unicode class and character class.. Pls help... That is difference b/w varchar and nvarchar
I've a number of SQL DBs that are managed by a php browser front end. These were developed in php/html to a SQL 2000 DB.
The DB and tables have been recreated in SQL 2005, permissions are that of the owner (SA) and the php code has been adjusted accordingly. Although the reading of the data is okay, I cannot update nor insert data from the php script through to the SQL 2005 DB whereas it works perfectly fine through the same php script and SQL 2000.
Obviously, there's something I'm not seeing??? There are no noticable messages and the last transaction does show up in the php display.... closing the portal then reopening, the record is "gone" and the SQL 2005 DB remains untouched.
Hi, I am a DB2 DBA and plan to learn SQL Server for professional reasons. But I am not able to find the material to begin with. So I would be greatful if you guys can send me links to start with the architecture and other basics of SQL server. I just want to accquire additional skills so that it can help me in the future.
I am not sure is this the right forum to get solution to my question.
From where i can get sysbase basics. I am posting this query in this forum coz this forum and gurus in this forum had helped me in lot critical situtions.
I've recently gotten into the administration side of SQL and am muddling my way through it as best I can. We have a DB server with three or four databases on it. Maintenance routines do a full backup of each one nightly and weekly and put all sets into one backup (.bak) file.
I've never had to restore them, but I thought I'd put myself through a test run since this is unexplored territory for me and I would prefer not to have to learn in an emergency.
A scenario I can foresee is where I'd have to restore just one table, perhaps to a new location (i.e. not overwrite the live db, just bring up a copy of part of it elsewhere so I can do a data dump from some old data). But when I go to 'restore database' or 'restore file/filegroups' and select the file, it seems to really want to restore the full backup directly over top of the existing database. If I try to restore it to a new, non-existent database, I get an error about how 'logical file master is not a part of database 'new-backup'), and if I try to restore it to a new db that I've created, I get an error about how the databases don't match.
It seems to me that my problem is a philosophical one - perhaps I don't understand the nature of backups, but I feel like what I'm trying to do is pretty simple. I want to take the full backup of database A and restore it, in part (or in full if I have to) to new database B. What do I need to do to accomplish this?
Thanks for indulging me - this must be brain-dead stuff for most of you!
Hey everyone, sorry for the lame questions, but: 1) I have a transactional replication service set up. However, whenever we select a new table or column within a table to replication to the subscribers, the changes never seem to get picked up unless we make an actual change within some of the other data. Any idea why this is? Even after I've reinitialized snapshots, the new changes don't want to proprogate to teh subscribers until data is actually changed. 2) where do I need to go to manually stop and restart a a distribution agent to force these changes to be proprogated without having to change any data within the tables? Thanks
I've setup my stored procedure, but now what? I want to display the information (only one record it will return) on the page / NOT using a datagrid or list, just simple.....I guess using an asp:label????? Could someone tell me what I need to do!!!
Also, are there any proper resources out there that just show you right out of the box howto insert / update / delete with sp's?, show / view, just proper simple source code?
THANKS!
my code: // Creating the database connection SqlConnection objConn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_conn_main"]);
// Creating the stored procedure 4 the webpage // Instantiate a Sql Command SqlCommand webpage_view = new SqlCommand("stpr_webpage_view", objConn); // Declare that the T-SQL statement that will be executed is a stored procedure // Use a CommandType.Text to execute a T-SQL Query webpage_view.CommandType = CommandType.StoredProcedure; SqlParameter webpage_id_parm = webpage_view.Parameters.Add("@webpage_id", SqlDbType.Int); webpage_id_parm.Value = "1"; // Create a SqlDataAdapter to manage the connection and retrieve the data SqlDataAdapter da_1 = new SqlDataAdapter(); // Instantiate a Dataset that will hold the data retrieved from the database using the select command DataSet ds_webpage = new DataSet(); da_1.SelectCommand = webpage_view; // Retrieve the data into the dataset using the SqlDataAdapter.Fill command da_1.Fill( ds_webpage, "webpage_title" ); DataView dv2 = ds_webpage.Tables[0].DefaultView; if ( !this.IsPostBack ) { this.DataBind ( ); }
Im trying to justify to people in a meeting why we have to break down some large financial instrument tables in a new database design we are implementing.
They have currently broken the tables down into instruments1 & instruments2, containing approx 300 & 150 columns respectively (further columns will be added!). then they have a view that joins virtually all of these columns. I've asked for the tables to be broken down into more logical groups. they are saying that this will cost more overhead as their views will span more tables. i also complained about the width of the rows, but they claimed that sql 2005 will not have a problem as only 1/3 of the row will have any data at one point so will not cause an overhead. can someone give me some definate points on this relating to 2005 as I am fairly new to it.
can someone help me with the basic points why they should be split into more logical groups.
they are also intending on adding millions of records a year to this table and partioning it will different filegroups. Should you place the indexes for tables on different filegroups as well?
Is the intent of Microsoft to enforce a vertical presentation of the SSIS Control Flow, Data Flow etc? I like to work down and to the right and I am having problems with the connectors (precedent) or in DTS 2000 world Success or On Success implied. Is there away to connect from the lower center anchor point to the side of the next object in the flow? For some reason, I can't get a similiar look to DTS 2000 environment (going from the bottom middle of the object to the side anchor pint (small box) symbol to the left. It wants to anchor on the bottom right, left, or middle, if going horizontally. I must be missing something, here??
I am having no end of trouble with transactions in the package which i am building. I now just want to go back to basics and see if someone can tell me where i should set specific transaction options.
Firstly, my package runs a for each loop which loops through a directory of directories. In each of the sub directories there are 2 files. The first steps in the loop are to check if a folder has been processed previously, if so then it moves it to a specified directory. The reason that this is done first is that i cannot move the directory whilst it is being read in the foreach loop, so i pass the path to the next iteration of the loop. There is another file system move directory task outwith the foreach loop to deal with the last directory.
Once this has been done, i parse the file name of the xls file within the directory to get a serial number which is assigned to a variable.
The next step is where i envisage that the transactions should be implemented: I have a sequence container which contains 2 data flow tasks to be run in parallel. each of these reads data from a seperate work sheet in the xls file. and writes it to a database table. Each dataflow task consists of an excel source task, derived column task, look up task (used to derive an ID from the serial number stored in the variable), and an oledb destination.
Upon completion, if the sequence container fails i want to set the destination folder path to the qurantine location. If it succeeds i want to copy the csv file contained in the same directory to a seperate location and then set the out put folder to the archive location.
What i need to know is where do i set the transaction option if i want to roll back the data that has been inserted into the database if either data flow task fails?
Please somebody help, as this is not working at all.
We have an large SQL database being accessed by a C# application. Each hit on the database opens a connection then closes it when done. We are currently experiencing errors when more than 20 users access the database at one time. One of the things I am wondering is if we are using connection pooling. From BOL I am lead to believe connection pooling is off by default. Can I turn on connection pooling as a default in SQL Server or do I pass 'pooling=true' as a parameter on each connection string?
I'm trying to do something very basic here but I'm totally new to MS SQL Server Manager and MS SQL in general. I'm using the Database Designer in MS SQL Server Manager. I created two tables with the following properties: Schedule (ScheduleID as UniqueIdentifier PK, Time as dateTime) Course (CourseID as UniqueIdentifier PK, Name as VarChar(50)) I create a relationship by dragging the PK from the first table over to the second and I link on ScheduleID to CourseID columns (I'm not certain what type of relationship is created here N:N?). It appears to work, I can do a Select * and join the two tables to get a joined query. The problem starts when I try to populate the tables: a course will have a schedule. I can't seem to get the rows to populate across both tables. I try to select the pk from the first table and insert it into the second but it complians about it not being a uniqueidentifier. I know this is very basic but I can't seem to find this very basic tutorial anywhere. I come from the Oracle world of doing DB's so if you have some examples that relate across that would be great or better yet if you can point me to a good reference for doing M$ DB stuff that would be great. Thanks.
I have 3 'separate' but related processes that I am developing in SSIS. Each process shares a few global variables and connection objects. None of the processes depend on inputs or outputs from the other processes. However, there is a sequence order in which they are exectuted.
Should I develop these three process in the same package or 3 separate packages in the same solution?
From the point of view of sharing the same variables and connection objects, maybe just one package? If so, would it be advise to use the toolkit's 'Sequence Container' to ensure the order in which the 3 processes are run? I noticed that 'global variables' are limited to the scope of individual packages so it would appear that a variable can't be shared between packages in the same solution? I was also thinking that in terms of configuration settings, there might be an advantage of keeping everything in the same package. The only disadvantage I can think of in relation to keeping everything in the same package is that the design layout might look a bit cluttered.
I'm tending to think one package here but would welcome comments and suggestions from those that have experience of similar design scenerios.
I am writing a program where I will be calculating some values that need to be sent to an SQL Database row by row. I am new to SQL Database programming and I was wondering what I need to include in my program as far as declarations, and data adapter connections in order to accomplish this. Or is it enough to already be connected to my database via a manual data connection? I also need to know some of the basic commands for inserting a new row, and adding data under existing columns, prior to moving on to the next row and repeating the process. If you can point me to a basic example that demonstrates this, including how to properly close out my database, I would appreciate it. If you know of a good VB2008 SQL Database book that covers all the basic & some advanced SQL Database programming, I would be interested in that as well. For Example: Row# Name CalcA CalcB CalcC CalcD 1 ? ? ? ? ? 2 ? ? ? ? ? Etc€¦ Thanks. Techno Visual Studio Express 2008 user
I am using ODBC to connect SQL Server 2000 + SP4 server runnig on Windows 2003 standard edition Server +SP1. But, sporadically my application server connectivity to DB fails and i receive the following error messages
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (WrapperWrite()). [Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.) In D:de.cpp 702 Apr 12 2006 20:34:47 [Microsoft][ODBC SQL Server Driver]Communication link failure) In D:de.cpp 702 Apr 12 2006 20:34:47 20071017 08:23:10 TID (00000ff0) Sev (3) Err (0) Msg (Read failure. General SQL error.
Strange thing is that i receive this error only sporadically, Please Please advice !
I want to register into a table each time a user creates, modifies or deletes any object in a database. It's not possible to add a trigger to the sysobjects table. What can I do?
I enabled the C2 Audit option for my SQL server and it is working allright. i am trying to figure out how can i configure the audit to run for specific databases/tables only. I have several databases on the server but I just want to audit one table in one database for PCI compliance rules. Any recommendations?
Good morning, Im having a little problem with this report I need to generate, so I thought I would ask for some advice. I have 2 tables. The 1st is the actual table and the 2nd is the log table (Employee; Employee_log). the '_log' table is an image of the Employee table except it has 4 extra fields (recID, last_updated_employee_id, operation and operation_date) recid being the PK of the log table. I need to generate a report that contains some thing like the following:
Table_Name
Column_Name
Old_Value
New_Value
Employee_Modifier
Operation
Operation_Date
Employee
LastName
Reid
Blevins
Jessica Bluff
UPDATE
2/2/2008
Employee
FirstName
Bison
Blison
Jessica Bluff
UPDATE
2/1/2008
Employee
EmployeeID
1234
Jessica Bluff
INSERT
2/1/2008
Employee
EmployeeID
75
Bill Thompson
DELETE
1/28/2008
To do this, I compare the Employee table to the Employee_log table. If I find changes (the two columns do not equal), I add that columnName and the column value for the regular table(new_value) and the column value for the log table(old value). If anyone has a solution or some sql to help me out, it would be greatly appreciated. (A query that will give me each columnName with the value per row would help; Somehow possibly joining my Employee table with 'INFORMATION_SCHEMA.COLUMNS' ??) Thanks!
I wish to track changes made to a table, including login who made the change, time of change, etc, without having to change the existing table structure, stored procedures, application. If anyone has any strategies (with a brief explanation) or articles they could point me to, it would be very much appreciated.
My thinking is to set up a trigger to write both old and new data to a audit table but considering different strategies may be helpful.
I have tried to make my basic audit log do more, but i haven't gotten very far;
In my basic audit log, i record this information:
table type of change field modified old value new value db user date/time
This audit records everything, which is great, but it cannot relate information when i go back to analyze the changes; for example, when a "directory" record is added, a user's information may be entered into several different tables, such as:
name (different table) addresses (different table) phone numbers (different table)
If one wanted to look up the changes to addresses of a person in the directory based on the person's name, i could not do it with my existing audit log because the addresses would be in a different table than the name table and there is no relating data in the audit log to relate the address changes to a persons name;
What might be a solution? I have tried a few approaches and am at a loss;